diff --git a/providers/src/snowflake/v00.00.00000/provider.yaml b/providers/src/snowflake/v00.00.00000/provider.yaml index fb1f4a56..f6f38dd3 100644 --- a/providers/src/snowflake/v00.00.00000/provider.yaml +++ b/providers/src/snowflake/v00.00.00000/provider.yaml @@ -10,369 +10,150 @@ providerServices: $ref: snowflake/v00.00.00000/services/account.yaml title: Snowflake Account API version: v00.00.00000 - description: The Snowflake Account API is a REST API that you can use to access, - update, and perform certain actions on Account resource in Snowflake. - alert: - id: alert:v00.00.00000 - name: alert + description: >- + The Snowflake REST API surface for the account service, combining the + vendor spec(s): account.yaml, managed-account.yaml. + apps: + id: apps:v00.00.00000 + name: apps preferred: true service: - $ref: snowflake/v00.00.00000/services/alert.yaml - title: Snowflake Alert API + $ref: snowflake/v00.00.00000/services/apps.yaml + title: Snowflake Apps API version: v00.00.00000 - description: The Snowflake Alert API is a REST API that you can use to access, - update, and perform certain actions on Alert resource in a Snowflake database. - api_integration: - id: api_integration:v00.00.00000 - name: api_integration + description: >- + The Snowflake REST API surface for the apps service, combining the vendor + spec(s): artifact-repository.yaml, image-repository.yaml, notebook.yaml, + service.yaml, streamlit.yaml. + cortex: + id: cortex:v00.00.00000 + name: cortex preferred: true service: - $ref: snowflake/v00.00.00000/services/api-integration.yaml - title: Snowflake API Integration API + $ref: snowflake/v00.00.00000/services/cortex.yaml + title: Snowflake Cortex API version: v00.00.00000 - description: The Snowflake API Integration API is a REST API that you can use - to access, update, and perform certain actions on API Integration resource in - a Snowflake database. - catalog_integration: - id: catalog_integration:v00.00.00000 - name: catalog_integration + description: >- + The Snowflake REST API surface for the cortex service, combining the + vendor spec(s): cortex-analyst.yaml, cortex-generic-anthropic.yaml, + cortex-generic-openai.yaml, cortex-inference.yaml, + cortex-search-service.yaml. + databases: + id: databases:v00.00.00000 + name: databases preferred: true service: - $ref: snowflake/v00.00.00000/services/catalog-integration.yaml - title: Snowflake Catalog Integration API + $ref: snowflake/v00.00.00000/services/databases.yaml + title: Snowflake Databases API version: v00.00.00000 - description: The Snowflake Catalog Integration API is a REST API that you can - use to access, update, and perform certain actions on Catalog Integration resource - in a Snowflake database. - compute_pool: - id: compute_pool:v00.00.00000 - name: compute_pool + description: >- + The Snowflake REST API surface for the databases service, combining the + vendor spec(s): database.yaml, schema.yaml. + functions: + id: functions:v00.00.00000 + name: functions preferred: true service: - $ref: snowflake/v00.00.00000/services/compute-pool.yaml - title: Snowflake Compute Pools API + $ref: snowflake/v00.00.00000/services/functions.yaml + title: Snowflake Functions API version: v00.00.00000 - description: The Snowflake Compute Pools API is a REST API that you can use to - access, update, and perform common actions on Compute Pool resources. - cortex_analyst: - id: cortex_analyst:v00.00.00000 - name: cortex_analyst + description: >- + The Snowflake REST API surface for the functions service, combining the + vendor spec(s): function.yaml, procedure.yaml, user-defined-function.yaml. + grants: + id: grants:v00.00.00000 + name: grants preferred: true service: - $ref: snowflake/v00.00.00000/services/cortex-analyst.yaml - title: Cortex Analyst API + $ref: snowflake/v00.00.00000/services/grants.yaml + title: Snowflake Grants API version: v00.00.00000 - description: The Snowflake Cortex Analyst API is a REST API that allows end user - to chat with their data leveraging semantic models to generate SQL queries. - cortex_inference: - id: cortex_inference:v00.00.00000 - name: cortex_inference + description: >- + The Snowflake REST API surface for the grants service, combining the + vendor spec(s): grant.yaml. + integrations: + id: integrations:v00.00.00000 + name: integrations preferred: true service: - $ref: snowflake/v00.00.00000/services/cortex-inference.yaml - title: Cortex Inference API + $ref: snowflake/v00.00.00000/services/integrations.yaml + title: Snowflake Integrations API version: v00.00.00000 - description: OpenAPI 3.0 specification for the Cortex REST API - cortex_search_service: - id: cortex_search_service:v00.00.00000 - name: cortex_search_service + description: >- + The Snowflake REST API surface for the integrations service, combining the + vendor spec(s): api-integration.yaml, catalog-integration.yaml, + external-volume.yaml, notification-integration.yaml. + pipelines: + id: pipelines:v00.00.00000 + name: pipelines preferred: true service: - $ref: snowflake/v00.00.00000/services/cortex-search-service.yaml - title: Cortex Search REST API + $ref: snowflake/v00.00.00000/services/pipelines.yaml + title: Snowflake Pipelines API version: v00.00.00000 - description: OpenAPI 3.0 specification for the Cortex Search REST API - database_role: - id: database_role:v00.00.00000 - name: database_role + description: >- + The Snowflake REST API surface for the pipelines service, combining the + vendor spec(s): alert.yaml, pipe.yaml, sequence.yaml, stage.yaml, + task.yaml. + roles: + id: roles:v00.00.00000 + name: roles preferred: true service: - $ref: snowflake/v00.00.00000/services/database-role.yaml - title: Snowflake Database Role API + $ref: snowflake/v00.00.00000/services/roles.yaml + title: Snowflake Roles API version: v00.00.00000 - description: The Snowflake Database Role API is a REST API that you can use to - access, update, and perform certain actions on Database Role resource in a Snowflake - database. - database: - id: database:v00.00.00000 - name: database + description: >- + The Snowflake REST API surface for the roles service, combining the vendor + spec(s): database-role.yaml, role.yaml, user.yaml. + security: + id: security:v00.00.00000 + name: security preferred: true service: - $ref: snowflake/v00.00.00000/services/database.yaml - title: Snowflake Database API + $ref: snowflake/v00.00.00000/services/security.yaml + title: Snowflake Security API version: v00.00.00000 - description: The Snowflake Database API is a REST API that you can use to access, - update, and perform certain actions on Database resource in Snowflake. - dynamic_table: - id: dynamic_table:v00.00.00000 - name: dynamic_table - preferred: true - service: - $ref: snowflake/v00.00.00000/services/dynamic-table.yaml - title: Snowflake Dynamic Table API - version: v00.00.00000 - description: The Snowflake Dynamic Table API is a REST API that you can use to - access, update, and perform certain actions on Dynamic Tables resource in a - Snowflake database. - event_table: - id: event_table:v00.00.00000 - name: event_table - preferred: true - service: - $ref: snowflake/v00.00.00000/services/event-table.yaml - title: Snowflake Event Table API - version: v00.00.00000 - description: The Snowflake Event Table API is a REST API that you can use to access, - update, and perform certain actions on Event Table resource in a Snowflake database. - external_volume: - id: external_volume:v00.00.00000 - name: external_volume - preferred: true - service: - $ref: snowflake/v00.00.00000/services/external-volume.yaml - title: Snowflake External Volume API - version: v00.00.00000 - description: The Snowflake External Volume API is a REST API that you can use - to access, update, and perform certain actions on External Volume resource in - a Snowflake database. - function: - id: function:v00.00.00000 - name: function - preferred: true - service: - $ref: snowflake/v00.00.00000/services/function.yaml - title: Snowflake Function API - version: v00.00.00000 - description: The Snowflake Function API is a REST API that allows caller to create, - execute and drop functions in a Snowflake database. - grant: - id: grant:v00.00.00000 - name: grant - preferred: true - service: - $ref: snowflake/v00.00.00000/services/grant.yaml - title: Snowflake Grant API - version: v00.00.00000 - description: The Snowflake Grant API is a REST API that you can use to show or - manage privileges that have been provided to users and roles in a Snowflake - database. - iceberg_table: - id: iceberg_table:v00.00.00000 - name: iceberg_table - preferred: true - service: - $ref: snowflake/v00.00.00000/services/iceberg-table.yaml - title: Snowflake Iceberg Table API - version: v00.00.00000 - description: The Snowflake Iceberg Table API is a REST API that you can use to - access, update, and perform certain actions on Iceberg Table resource in a Snowflake - database. - image_repository: - id: image_repository:v00.00.00000 - name: image_repository - preferred: true - service: - $ref: snowflake/v00.00.00000/services/image-repository.yaml - title: Snowflake Image Repository API - version: v00.00.00000 - description: The Snowflake Image Repository API is a REST API that you can use - to access, update, and perform common actions on Image Repository resource in - Snowflake. - managed_account: - id: managed_account:v00.00.00000 - name: managed_account - preferred: true - service: - $ref: snowflake/v00.00.00000/services/managed-account.yaml - title: Snowflake Managed Account API - version: v00.00.00000 - description: The Snowflake Managed Account API is a REST API that you can use - to access, update, and perform certain actions on Managed Account resource in - Snowflake. - network_policy: - id: network_policy:v00.00.00000 - name: network_policy - preferred: true - service: - $ref: snowflake/v00.00.00000/services/network-policy.yaml - title: Snowflake Network Policy API - version: v00.00.00000 - description: The Snowflake Network Policy API is a REST API that you can use to - access, update, and perform certain actions on Network Policy resource in a - Snowflake database. - notebook: - id: notebook:v00.00.00000 - name: notebook - preferred: true - service: - $ref: snowflake/v00.00.00000/services/notebook.yaml - title: Snowflake Notebook API - version: v00.00.00000 - description: The Snowflake Notebook API is a REST API that you can use to access, - update, and perform certain actions on Notebook resource in a Snowflake database. - notification_integration: - id: notification_integration:v00.00.00000 - name: notification_integration - preferred: true - service: - $ref: snowflake/v00.00.00000/services/notification-integration.yaml - title: Snowflake Notification Integration API - version: v00.00.00000 - description: The Snowflake Notification Integration API is a REST API that you - can use to access, update, and perform certain actions on Notification Integration - resource in a Snowflake database. - pipe: - id: pipe:v00.00.00000 - name: pipe - preferred: true - service: - $ref: snowflake/v00.00.00000/services/pipe.yaml - title: Snowflake Pipe API - version: v00.00.00000 - description: The Snowflake Pipe API is a REST API that you can use to access, - update, and perform certain actions on Pipe resource in a Snowflake database. - procedure: - id: procedure:v00.00.00000 - name: procedure - preferred: true - service: - $ref: snowflake/v00.00.00000/services/procedure.yaml - title: Snowflake Procedure API - version: v00.00.00000 - description: The Snowflake Procedure API is a REST API that you can use to access, - update, and perform certain actions on Procedure resource in a Snowflake database. - result: - id: result:v00.00.00000 - name: result - preferred: true - service: - $ref: snowflake/v00.00.00000/services/result.yaml - title: Snowflake Result API - version: v00.00.00000 - description: The Snowflake Result API is a REST API that you can use to check - request status and fetch request response. - role: - id: role:v00.00.00000 - name: role - preferred: true - service: - $ref: snowflake/v00.00.00000/services/role.yaml - title: Snowflake Role API - version: v00.00.00000 - description: The Snowflake Role API is a REST API that you can use to access, - update, and perform certain actions on Role resource in a Snowflake database. - schema: - id: schema:v00.00.00000 - name: schema - preferred: true - service: - $ref: snowflake/v00.00.00000/services/schema.yaml - title: Snowflake Schema API - version: v00.00.00000 - description: The Snowflake Schema API is a REST API that you can use to access, - update, and perform certain actions on a Snowflake schema. - service: - id: service:v00.00.00000 - name: service - preferred: true - service: - $ref: snowflake/v00.00.00000/services/service.yaml - title: Snowflake Services API - version: v00.00.00000 - description: The Snowflake Services API is a REST API that you can use to access, - update, and perform certain actions on Services resource in a Snowflake database. + description: >- + The Snowflake REST API surface for the security service, combining the + vendor spec(s): network-policy.yaml, network-rule.yaml, + password-policy.yaml, secret.yaml, tag.yaml. sqlapi: id: sqlapi:v00.00.00000 name: sqlapi preferred: true service: $ref: snowflake/v00.00.00000/services/sqlapi.yaml - title: Snowflake SQL API - version: v00.00.00000 - description: 'The Snowflake SQL API is a REST API that you can use to access and - update data in a Snowflake database. ' - stage: - id: stage:v00.00.00000 - name: stage - preferred: true - service: - $ref: snowflake/v00.00.00000/services/stage.yaml - title: Snowflake Stage API - version: v00.00.00000 - description: The Snowflake Stage API is a REST API that you can use to access, - update, and perform certain actions on stage resources in a Snowflake database. - streams: - id: streams:v00.00.00000 - name: streams - preferred: true - service: - $ref: snowflake/v00.00.00000/services/streams.yaml - title: Snowflake Stream API - version: v00.00.00000 - description: The Snowflake Stream API is a REST API that you can use to access, - update, and perform certain actions on Stream resource in a Snowflake database. - table: - id: table:v00.00.00000 - name: table - preferred: true - service: - $ref: snowflake/v00.00.00000/services/table.yaml - title: Snowflake Table API - version: v00.00.00000 - description: The Snowflake Table API is a REST API that you can use to access, - update, and perform certain actions on Tables resource in a Snowflake database. - task: - id: task:v00.00.00000 - name: task - preferred: true - service: - $ref: snowflake/v00.00.00000/services/task.yaml - title: Snowflake Task API - version: v00.00.00000 - description: The Snowflake Task API is a REST API that you can use to access, - update, and perform certain actions on task resources in a Snowflake database. - user_defined_function: - id: user_defined_function:v00.00.00000 - name: user_defined_function - preferred: true - service: - $ref: snowflake/v00.00.00000/services/user-defined-function.yaml - title: Snowflake User Defined Function API - version: v00.00.00000 - description: The Snowflake User Defined Function API is a REST API that you can - use to access, update, and perform certain actions on User Defined Function - resource in a Snowflake database. - user: - id: user:v00.00.00000 - name: user - preferred: true - service: - $ref: snowflake/v00.00.00000/services/user.yaml - title: Snowflake User API + title: Snowflake Sqlapi API version: v00.00.00000 - description: The Snowflake User API is a REST API that you can use to access, - update, and perform certain action on Users in a Snowflake database. - view: - id: view:v00.00.00000 - name: view + description: >- + The Snowflake REST API surface for the sqlapi service, combining the + vendor spec(s): result.yaml, sqlapi.yaml. + tables: + id: tables:v00.00.00000 + name: tables preferred: true service: - $ref: snowflake/v00.00.00000/services/view.yaml - title: Snowflake View API + $ref: snowflake/v00.00.00000/services/tables.yaml + title: Snowflake Tables API version: v00.00.00000 - description: The Snowflake View API is a REST API that you can use to access, - update, and perform certain actions on View resource in a Snowflake database. - warehouse: - id: warehouse:v00.00.00000 - name: warehouse + description: >- + The Snowflake REST API surface for the tables service, combining the + vendor spec(s): dynamic-table.yaml, event-table.yaml, iceberg-table.yaml, + stream.yaml, table.yaml, view.yaml. + warehouses: + id: warehouses:v00.00.00000 + name: warehouses preferred: true service: - $ref: snowflake/v00.00.00000/services/warehouse.yaml - title: Snowflake Warehouse API + $ref: snowflake/v00.00.00000/services/warehouses.yaml + title: Snowflake Warehouses API version: v00.00.00000 - description: The Snowflake Warehouse API is a REST API that you can use to access, - customize and manage virtual warehouse in a Snowflake account. + description: >- + The Snowflake REST API surface for the warehouses service, combining the + vendor spec(s): compute-pool.yaml, warehouse.yaml. config: auth: type: bearer credentialsenvvar: SNOWFLAKE_PAT + snake_case_aliases: true diff --git a/providers/src/snowflake/v00.00.00000/services/account.yaml b/providers/src/snowflake/v00.00.00000/services/account.yaml index 22fd058c..23a615a3 100644 --- a/providers/src/snowflake/v00.00.00000/services/account.yaml +++ b/providers/src/snowflake/v00.00.00000/services/account.yaml @@ -1,16 +1,14 @@ openapi: 3.0.0 servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) info: version: 0.0.1 title: Snowflake Account API - description: The Snowflake Account API is a REST API that you can use to access, - update, and perform certain actions on Account resource in Snowflake. + description: 'The Snowflake REST API surface for the account service, combining the vendor spec(s): account.yaml, managed-account.yaml.' contact: name: Snowflake, Inc. url: https://snowflake.com @@ -20,17 +18,17 @@ paths: get: summary: List accounts. tags: - - account + - account description: Lists the accessible accounts. operationId: listAccounts parameters: - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/showLimit' - - name: history - in: query - description: Optionally includes dropped accounts that have not yet been purged. - schema: - type: boolean + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/showLimit' + - name: history + in: query + description: Optionally includes dropped accounts that have not yet been purged. + schema: + type: boolean responses: '200': description: Successful request. @@ -40,9 +38,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Account' + $ref: '#/components/schemas/ListAccountsResponse' '202': $ref: '#/components/responses/202SuccessAcceptedResponse' '400': @@ -72,9 +68,8 @@ paths: post: summary: Create an account. tags: - - account - description: Creates a account. You must provide the full account definition - when creating a account. + - account + description: Creates a account. You must provide the full account definition when creating a account. operationId: createAccount requestBody: required: true @@ -115,22 +110,18 @@ paths: delete: summary: Delete an account. tags: - - account - description: Deletes the specified account. If you enable the `ifExists` parameter, - the operation succeeds even if the account does not exist. Otherwise, a 404 - failure is returned if the account does not exist. if the drop is unsuccessful. + - account + description: Deletes the specified account. If you enable the `ifExists` parameter, the operation succeeds even if the account does not exist. Otherwise, a 404 failure is returned if the account does not exist. if the drop is unsuccessful. operationId: deleteAccount parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: gracePeriodInDays - in: query - description: "Specifies the number of days during which the account can be\ - \ restored (\u201Cundropped\u201D). The minimum is 3 days and the maximum\ - \ is 90 days." - schema: - type: integer - required: true + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: gracePeriodInDays + in: query + description: Specifies the number of days during which the account can be restored (“undropped”). The minimum is 3 days and the maximum is 90 days. + schema: + type: integer + required: true responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -164,12 +155,135 @@ paths: post: summary: Restore an account. tags: - - account - description: Restores a dropped account that has not yet been permanently deleted - (a dropped account that is within its grace period). + - account + description: Restores a dropped account that has not yet been permanently deleted (a dropped account that is within its grace period). operationId: UndropAccount parameters: - - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/managed-accounts: + get: + summary: List managed accounts. + tags: + - managed-account + description: Lists the accessible managed accounts. + operationId: listManagedAccounts + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListManagedAccountsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a managed accounts. + tags: + - managed-account + description: Creates a managed account. You must provide the full managed account definition when creating a managed account. + operationId: createManagedAccount + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ManagedAccount' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/managed-accounts/{name}: + delete: + summary: Delete a managed account. + tags: + - managed-account + description: Removes a managed account, including all objects created in the account, and immediately restricts access to the account. Currently used by data providers to create reader accounts for their consumers. For more details, see Manage reader accounts. + operationId: deleteManagedAccount + parameters: + - $ref: '#/components/parameters/name' responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -214,21 +328,13 @@ components: description: User-defined name that identifies an account within the organization. region_group: type: string - description: Region group where the account is located. Note - This column - is only displayed for organizations that span multiple region groups. + description: Region group where the account is located. Note - This column is only displayed for organizations that span multiple region groups. region: type: string - description: Snowflake Region where the account is located. A Snowflake - Region is a distinct location within a cloud platform region that is isolated - from other Snowflake Regions. A Snowflake Region can be either multi-tenant - or single-tenant (for a Virtual Private Snowflake account). + description: Snowflake Region where the account is located. A Snowflake Region is a distinct location within a cloud platform region that is isolated from other Snowflake Regions. A Snowflake Region can be either multi-tenant or single-tenant (for a Virtual Private Snowflake account). edition: type: string - description: Snowflake Edition of the account. - enum: - - STANDARD - - ENTERPRISE - - BUSINESS_CRITICAL + description: Snowflake Edition of the account. Possible values to use when creating an account include STANDARD, ENTERPRISE, and BUSINESS_CRITICAL. created_on: type: string format: date-time @@ -237,8 +343,7 @@ components: account_url: type: string readOnly: true - description: Preferred Snowflake account URL that includes the values of - organization_name and account_name. + description: Preferred Snowflake account URL that includes the values of organization_name and account_name. account_locator: type: string readOnly: true @@ -246,14 +351,12 @@ components: account_locator_url: type: string readOnly: true - description: Legacy Snowflake account URL syntax that includes the region_name - and account_locator. + description: Legacy Snowflake account URL syntax that includes the region_name and account_locator. managed_accounts: type: integer readOnly: true format: int64 - description: Indicates how many managed accounts have been created by the - account. + description: Indicates how many managed accounts have been created by the account. consumption_billing_entity_name: type: string readOnly: true @@ -269,18 +372,14 @@ components: old_account_url: type: string readOnly: true - description: If the original account URL was saved when the account was - renamed, provides the original URL. If the original account URL was dropped, - the value is NULL even if the account was renamed + description: If the original account URL was saved when the account was renamed, provides the original URL. If the original account URL was dropped, the value is NULL even if the account was renamed comment: type: string - description: Optional comment in which to store information related to the - account. + description: Optional comment in which to store information related to the account. is_org_admin: type: boolean readOnly: true - description: Indicates whether the ORGADMIN role is enabled in an account. - If TRUE, the role is enabled. + description: Indicates whether the ORGADMIN role is enabled in an account. If TRUE, the role is enabled. retention_time: type: integer readOnly: true @@ -296,8 +395,7 @@ components: format: date-time readOnly: true nullable: true - description: Date and time when the account is scheduled to be permanently - deleted. Accounts are deleted within one hour after the scheduled time. + description: Date and time when the account is scheduled to be permanently deleted. Accounts are deleted within one hour after the scheduled time. restored_on: type: string format: date-time @@ -308,46 +406,32 @@ components: type: string format: date-time readOnly: true - description: If the original account URL was saved when the account was - renamed, provides the date and time when the original account URL was - saved. + description: If the original account URL was saved when the account was renamed, provides the date and time when the original account URL was saved. account_old_url_last_used: type: string format: date-time readOnly: true - description: If the original account URL was saved when the account was - renamed, indicates the last time the account was accessed using the original - URL. + description: If the original account URL was saved when the account was renamed, indicates the last time the account was accessed using the original URL. organization_old_url: type: string readOnly: true - description: "If the account\u2019s organization was changed in a way that\ - \ created a new account URL and the original account URL was saved, provides\ - \ the original account URL. If the original account URL was dropped, the\ - \ value is NULL even if the organization changed." + description: If the account’s organization was changed in a way that created a new account URL and the original account URL was saved, provides the original account URL. If the original account URL was dropped, the value is NULL even if the organization changed. organization_old_url_saved_on: type: string readOnly: true format: date-time - description: "If the account\u2019s organization was changed in a way that\ - \ created a new account URL and the original account URL was saved, provides\ - \ the date and time when the original account URL was saved." + description: If the account’s organization was changed in a way that created a new account URL and the original account URL was saved, provides the date and time when the original account URL was saved. organization_old_url_last_used: type: string readOnly: true format: date-time - description: "If the account\u2019s organization was changed in a way that\ - \ created a new account URL and the original account URL was saved, indicates\ - \ the last time the account was accessed using the original account URL." + description: If the account’s organization was changed in a way that created a new account URL and the original account URL was saved, indicates the last time the account was accessed using the original account URL. organization_URL_expiration_on: type: string format: date-time readOnly: true nullable: true - description: "If the account\u2019s organization was changed in a way that\ - \ created a new account URL and the original account URL was saved, provides\ - \ the date and time when the original account URL will be dropped. Dropped\ - \ URLs cannot be used to access the account." + description: If the account’s organization was changed in a way that created a new account URL and the original account URL was saved, provides the date and time when the original account URL will be dropped. Dropped URLs cannot be used to access the account. moved_on: type: string format: date-time @@ -357,13 +441,11 @@ components: is_events_account: type: boolean readOnly: true - description: Indicates whether an account is an events account. For more - information, see Set up logging and event sharing for an application. + description: Indicates whether an account is an events account. For more information, see Set up logging and event sharing for an application. moved_to_organization: type: string readOnly: true - description: If the account was moved to a different organization, provides - the name of that organization. + description: If the account was moved to a different organization, provides the name of that organization. admin_name: type: string description: Name of the account administrator. @@ -398,8 +480,7 @@ components: nullable: true must_change_password: type: boolean - description: Indicates whether the account administrator must change the - password at the next login. + description: Indicates whether the account administrator must change the password at the next login. default: false writeOnly: true polaris: @@ -408,15 +489,13 @@ components: default: false writeOnly: true required: - - name - - admin_name - - email - - edition + - name + - admin_name + - email + - edition Identifier: type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ example: TEST_NAME ErrorResponse: @@ -430,9 +509,7 @@ components: description: Error code. error_code: type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. request_id: type: string description: Unique request ID. @@ -461,38 +538,27 @@ components: description: Message returned by the server resultHandler: type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. example: code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. PointOfTime: type: object description: Point of time. required: - - point_of_time_type + - point_of_time_type properties: point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp reference: type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at discriminator: propertyName: point_of_time_type mapping: @@ -501,40 +567,90 @@ components: statement: PointOfTimeStatement PointOfTimeTimestamp: description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' properties: timestamp: type: string - description: Timestamp of the point of time. + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms + description: Point of time identified by an offset in reference to the current time properties: offset: type: string - description: 'Offset from the point of time. Example: `1 year`' + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement PointOfTimeStatement: description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' properties: statement: type: string - description: Statement of the point of time. + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. + description: Snowflake parameter defined at the system, account, user, session, or object level. type: object required: - - name + - name properties: name: type: string @@ -547,8 +663,7 @@ components: description: Default parameter value. dataType: type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. level: type: string description: Level at which parameter is defined. @@ -564,8 +679,7 @@ components: description: Sample snowflake parameter. TargetLag: type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. + description: Specifies the schedule for periodically refreshing the dynamic table. properties: type: description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. @@ -577,69 +691,129 @@ components: DOWNSTREAM: DownstreamLag UserDefinedLag: description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' properties: seconds: type: integer format: int64 description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string example: seconds: 3600 required: - - seconds + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag DownstreamLag: description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + ManagedAccount: + type: object + description: Snowflake account object. + properties: + name: + $ref: '#/components/schemas/Identifier' + description: Name of the account. + cloud: + type: string + readOnly: true + description: Cloud in which the managed account is located. For reader accounts, this is always the same as the cloud for the provider account. + region: + type: string + readOnly: true + description: Region in which the managed account is located. For reader accounts, this is always the same as the region for the provider account. + locator: + type: string + readOnly: true + description: Legacy identifier for the account. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time the account was created. + url: + type: string + readOnly: true + description: Account URL that is used to connect to the account, in the account name format. The account identifier in this format follows the pattern -. + account_locator_url: + type: string + readOnly: true + description: Account URL that is used to connect to the account, in the legacy account locator format. + comment: + type: string + description: Optional comment in which to store information related to the account. + admin_name: + type: string + description: Name of the account administrator. + writeOnly: true + nullable: true + admin_password: + type: string + description: Password for the account administrator. + writeOnly: true + nullable: true + format: password + account_type: + type: string + description: Type of the account. + enum: + - READER + default: READER + required: + - name + - admin_name + - admin_password + - account_type + ListAccountsResponse: + type: object + properties: + accounts: + type: array + items: + $ref: '#/components/schemas/Account' + ListManagedAccountsResponse: + type: object + properties: + managed_accounts: + type: array + items: + $ref: '#/components/schemas/ManagedAccount' securitySchemes: KeyPair: type: http scheme: bearer bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. ExternalOAuth: type: http scheme: bearer bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. SnowflakeOAuth: type: oauth2 flows: implicit: authorizationUrl: /oauth/authorize scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' application: name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. required: true in: path schema: @@ -653,65 +827,41 @@ components: schema: example: TEST_NAME $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) createMode: name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. in: query schema: type: string enum: - - errorIfExists - - orReplace - - ifNotExists + - errorIfExists + - orReplace + - ifNotExists example: ifNotExists default: errorIfExists mode: name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. in: query schema: type: string enum: - - restrict - - cascade + - restrict + - cascade example: restrict ifExists: name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. in: query schema: type: boolean @@ -719,33 +869,28 @@ components: default: false like: name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. in: query schema: type: string example: test_% pattern: name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. + description: Parameter that filters the command output by a regular expression pattern. in: query schema: type: string example: .*data_0.* startsWith: name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. in: query schema: type: string example: test rootOnly: name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). + description: Parameter to filter the command output to return only root resources (resources with no predecessors). in: query schema: type: boolean @@ -753,8 +898,7 @@ components: default: false showLimit: name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. + description: Parameter to limit the maximum number of rows returned by a command. in: query schema: type: integer @@ -763,16 +907,14 @@ components: maximum: 10000 fromName: name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. in: query schema: type: string example: from_test copyGrants: name: copyGrants - description: Query parameter to enable copy grants when creating the object. + description: Parameter to enable copy grants when creating the object. in: query schema: type: boolean @@ -801,26 +943,24 @@ components: schema: type: string enum: - - application/json + - application/json accept: name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. + description: Type of data format accepted by the resource. Currently supports `application/json`. in: header schema: type: string enum: - - application/json + - application/json x-snowflake-authorization-token-type: name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. in: header schema: type: string enum: - - KEYPAIR_JWT - - OAUTH + - KEYPAIR_JWT + - OAUTH x-sfc-session: name: X-Sfc-Session description: Token for the current Snowflake session. @@ -830,6 +970,30 @@ components: type: string description: Snowflake session token. example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) headers: X-Snowflake-Request-ID: description: Unique ID of the API request. @@ -837,15 +1001,10 @@ components: type: string format: uuid Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). schema: type: string - example: ; rel="first",; - rel="next",; - rel="last" + example: ; rel="first",; rel="next",; rel="last" responses: 200SuccessResponse: description: Successful request. @@ -870,8 +1029,7 @@ components: Location: schema: type: string - description: Relative path for checking request status or getting the - result, if available. + description: Relative path for checking request status or getting the result, if available. X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' description: Successfully accepted the request, but it is not completed yet. @@ -880,10 +1038,7 @@ components: schema: $ref: '#/components/schemas/SuccessAcceptedResponse' 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -892,10 +1047,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -904,8 +1056,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -914,8 +1065,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -924,9 +1074,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -935,8 +1083,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -945,10 +1092,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -957,9 +1101,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -968,10 +1110,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -980,8 +1119,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -990,9 +1128,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1001,9 +1137,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1012,9 +1146,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1024,46 +1156,107 @@ components: $ref: '#/components/schemas/ErrorResponse' x-stackQL-resources: accounts: + id: snowflake.account.accounts + name: accounts + title: Accounts methods: - list_accounts: + list: operation: $ref: '#/paths/~1api~1v2~1accounts/get' response: mediaType: application/json openAPIDocKey: '200' - create_account: + objectKey: $.accounts + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListAccountsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"accounts\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive operation: $ref: '#/paths/~1api~1v2~1accounts/post' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' - delete_account: + delete: operation: $ref: '#/paths/~1api~1v2~1accounts~1{name}/delete' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' - undrop_account: + undrop: operation: $ref: '#/paths/~1api~1v2~1accounts~1{name}:undrop/post' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/accounts/methods/list_accounts' + - $ref: '#/components/x-stackQL-resources/accounts/methods/list' insert: - - $ref: '#/components/x-stackQL-resources/accounts/methods/create_account' + - $ref: '#/components/x-stackQL-resources/accounts/methods/create' update: [] delete: - - $ref: '#/components/x-stackQL-resources/accounts/methods/delete_account' + - $ref: '#/components/x-stackQL-resources/accounts/methods/delete' + replace: [] + managed_accounts: + id: snowflake.account.managed_accounts + name: managed_accounts + title: Managed Accounts + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1managed-accounts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.managed_accounts + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListManagedAccountsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"managed_accounts\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1managed-accounts/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1managed-accounts~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/delete' replace: [] - id: snowflake.account.accounts - name: accounts - title: Accounts security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] tags: -- name: account + - name: account + - name: managed-account diff --git a/providers/src/snowflake/v00.00.00000/services/alert.yaml b/providers/src/snowflake/v00.00.00000/services/alert.yaml deleted file mode 100644 index b15920a3..00000000 --- a/providers/src/snowflake/v00.00.00000/services/alert.yaml +++ /dev/null @@ -1,1081 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Alert API - description: The Snowflake Alert API is a REST API that you can use to access, update, - and perform certain actions on Alert resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/alerts: - get: - summary: List alerts - tags: - - alert - description: List alerts - operationId: listAlerts - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Alert' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create an alert - tags: - - alert - description: Create an alert - operationId: createAlert - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Alert' - /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}: - get: - summary: Fetch an alert - tags: - - alert - description: Fetch an alert - operationId: fetchAlert - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/Alert' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete an alert - tags: - - alert - description: Delete an alert - operationId: deleteAlert - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}:clone: - post: - summary: Create a new alert by cloning from the specified resource - tags: - - alert - description: Create a new alert by cloning from the specified resource - operationId: cloneAlert - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: targetDatabase - description: Database of the newly created resource. Defaults to the source's - database - in: query - required: true - schema: - type: string - - name: targetSchema - description: Schema of the newly created resource. Defaults to the source's - schema - in: query - required: true - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AlertClone' - /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}:execute: - post: - summary: Execute an alert - tags: - - alert - description: Execute an alert - operationId: executeAlert - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Alert: - type: object - description: A Snowflake alert - properties: - name: - type: string - description: Name of the alert - comment: - type: string - description: user comment associated to an object in the dictionary - schedule: - $ref: '#/components/schemas/Schedule' - description: The schedule the alert runs under - warehouse: - type: string - description: The warehouse the alert runs in - condition: - type: string - description: The SQL statement that must be evaluated to determine whether - to trigger the alert - action: - type: string - description: The SQL statement to execute when the alert is triggered - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the alert was created. - database_name: - type: string - readOnly: true - description: Database in which the alert is stored - schema_name: - type: string - readOnly: true - description: Schema in which the alert is stored - owner: - type: string - readOnly: true - description: Role that owns the alert - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the alert - state: - type: string - readOnly: true - description: The current state of the alert - required: - - name - - schedule - - condition - - action - Schedule: - type: object - properties: - schedule_type: - type: string - description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE - required: - - schedule_type - discriminator: - propertyName: schedule_type - mapping: - CRON_TYPE: CronSchedule - SCHEDULE_TYPE: MinutesSchedule - CronSchedule: - type: object - allOf: - - $ref: '#/components/schemas/Schedule' - properties: - cron_expr: - type: string - description: A cron expression for the scheduled execution. - timezone: - type: string - description: The time zone for the schedule. - required: - - cron_expr - - timezone - MinutesSchedule: - type: object - allOf: - - $ref: '#/components/schemas/Schedule' - properties: - minutes: - type: integer - required: - - minutes - AlertClone: - type: object - properties: - name: - type: string - description: Name of the alert - point_of_time: - $ref: '#/components/schemas/PointOfTime' - description: 'Type of the point of time. Possible values include: - - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - - - `offset`: Interval relative to ''now.'' Example: `1 day`. - - - `statement`: ID of a query statement to use as the reference point for - Time - Travel. - - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. - - ' - required: - - name - PointOfTime: - type: object - properties: - point_of_time_type: - type: string - description: 'Type of the point of time. Possible values include: timestamp, - offset, statement' - reference: - type: string - enum: - - at - - before - x-enum-varnames: - - AT - - BEFORE - description: Relation to the point of time. Currently, the API supports - `at` and `before` - required: - - point_of_time_type - - reference - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - required: - - timestamp - PointOfTimeOffset: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - offset: - type: string - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - required: - - offset - PointOfTimeStatement: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - required: - - statement - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - alerts: - methods: - list_alerts: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_alert: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_alert: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_alert: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - clone_alert: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - execute_alert: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}:execute/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/alerts/methods/list_alerts' - - $ref: '#/components/x-stackQL-resources/alerts/methods/fetch_alert' - insert: - - $ref: '#/components/x-stackQL-resources/alerts/methods/create_alert' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/alerts/methods/delete_alert' - replace: [] - id: snowflake.alert.alerts - name: alerts - title: Alerts -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/api-integration.yaml b/providers/src/snowflake/v00.00.00000/services/api-integration.yaml deleted file mode 100644 index 559c2244..00000000 --- a/providers/src/snowflake/v00.00.00000/services/api-integration.yaml +++ /dev/null @@ -1,1049 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake API Integration API - description: The Snowflake API Integration API is a REST API that you can use to - access, update, and perform certain actions on API Integration resource in a Snowflake - database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/api-integrations: - get: - summary: List API integrations - tags: - - api-integration - description: List API integrations - operationId: listAPIIntegrations - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ApiIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create an API integration - tags: - - api-integration - description: Create an API integration - operationId: createAPIIntegration - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ApiIntegration' - /api/v2/api-integrations/{name}: - get: - summary: Fetch an API integration - tags: - - api-integration - description: Fetch an API integration - operationId: fetchAPIIntegration - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/ApiIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create an (or alter an existing) API integration - tags: - - api-integration - description: Create an (or alter an existing) API integration. Note that API_KEY - is not currently altered by this operation and is supported for a newly-created - object only. Unsetting API_BLOCKED_PREFIXES is also unsupported. - operationId: createOrAlterAPIIntegration - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ApiIntegration' - delete: - summary: Delete an API integration - tags: - - api-integration - description: Delete an API integration - operationId: deleteAPIIntegration - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - ApiIntegration: - type: object - description: A Snowflake API integration object. - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the API integration. - api_hook: - $ref: '#/components/schemas/ApiHook' - api_allowed_prefixes: - type: array - items: - type: string - description: A comma-separated list of endpoints and resources that Snowflake - can access. - api_blocked_prefixes: - type: array - items: - type: string - description: A comma-separated list of endpoints and resources that are - not allowed to be called from Snowflake. - nullable: true - enabled: - type: boolean - description: Whether the API integration is enabled. - comment: - type: string - description: Comment for the API integration. - nullable: true - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the API integration was created. - required: - - name - - api_hook - - api_allowed_prefixes - - enabled - ApiHook: - type: object - properties: - type: - type: string - enum: - - AWS - - AZURE - - GC - - GIT - description: Type of ApiHook, can be AWS, AZURE, GC or GIT. - required: - - type - discriminator: - propertyName: type - mapping: - AWS: AwsHook - AZURE: AzureHook - GC: GoogleCloudHook - GIT: GitHook - AwsHook: - type: object - allOf: - - $ref: '#/components/schemas/ApiHook' - properties: - api_provider: - type: string - enum: - - AWS_API_GATEWAY - - AWS_PRIVATE_API_GATEWAY - - AWS_GOV_API_GATEWAY - - AWS_GOV_PRIVATE_API_GATEWAY - api_aws_role_arn: - type: string - description: The ARN (Amazon resource name) of the IAM role. - api_key: - $ref: '#/components/schemas/ApiKey' - required: - - api_provider - - api_aws_role_arn - AzureHook: - type: object - allOf: - - $ref: '#/components/schemas/ApiHook' - properties: - api_provider: - type: string - enum: - - AZURE_API_MANAGEMENT - - AZURE_PRIVATE_API_MANAGEMENT - azure_tenant_id: - type: string - description: The ID of the Office 365 tenant that all Azure API Management - instances belong to. - azure_ad_application_id: - type: string - description: The application ID of the Azure Active Directory application. - api_key: - $ref: '#/components/schemas/ApiKey' - required: - - api_provider - - azure_tenant_id - - azure_ad_application_id - GoogleCloudHook: - type: object - allOf: - - $ref: '#/components/schemas/ApiHook' - properties: - api_provider: - type: string - enum: - - GOOGLE_API_GATEWAY - google_audience: - type: string - description: Used as an audience claim when generating the JTW (JSON Web - Token) to authenticate to the Google API Gateway. - api_key: - $ref: '#/components/schemas/ApiKey' - required: - - api_provider - - google_audience - GitHook: - type: object - allOf: - - $ref: '#/components/schemas/ApiHook' - properties: - allow_any_secret: - type: boolean - default: false - description: Whether to allow any Snowflake secret when accessing the Git - repository. This setting is ignored if allowed_authentication_secrets - is present. - allowed_authentication_secrets: - type: array - items: - type: string - description: A comma-separated list of fully-qualified Snowflake secret - names that UDF or procedure handler code can use when accessing the Git - repository. - nullable: true - allowed_api_authentication_integrations: - type: array - items: - type: string - description: A comma-separated list of Snowflake security integration names - that UDF or procedure handler code can use when accessing the Git repository. - If empty, allow no integrations. - nullable: true - ApiKey: - type: string - description: An alphanumeric string that is used to identify API clients and - control access to the API, also called a subscription key. - nullable: true - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - api_integrations: - methods: - list_api_integrations: - operation: - $ref: '#/paths/~1api~1v2~1api-integrations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_api_integration: - operation: - $ref: '#/paths/~1api~1v2~1api-integrations/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_api_integration: - operation: - $ref: '#/paths/~1api~1v2~1api-integrations~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_api_integration: - operation: - $ref: '#/paths/~1api~1v2~1api-integrations~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_api_integration: - operation: - $ref: '#/paths/~1api~1v2~1api-integrations~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/api_integrations/methods/list_api_integrations' - - $ref: '#/components/x-stackQL-resources/api_integrations/methods/fetch_api_integration' - insert: - - $ref: '#/components/x-stackQL-resources/api_integrations/methods/create_api_integration' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/api_integrations/methods/delete_api_integration' - replace: - - $ref: '#/components/x-stackQL-resources/api_integrations/methods/create_or_alter_api_integration' - id: snowflake.api_integration.api_integrations - name: api_integrations - title: Api Integrations -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/apps.yaml b/providers/src/snowflake/v00.00.00000/services/apps.yaml new file mode 100644 index 00000000..8ba711b6 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/apps.yaml @@ -0,0 +1,4523 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Apps API + description: 'The Snowflake REST API surface for the apps service, combining the vendor spec(s): artifact-repository.yaml, image-repository.yaml, notebook.yaml, service.yaml, streamlit.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases/{database_name}/schemas/{schema_name}/artifact-repositories: + get: + summary: List artifact repositories + tags: + - artifact-repository + description: List artifact repositories + operationId: listArtifactRepositories + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListArtifactRepositoriesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create an artifact repository + tags: + - artifact-repository + description: Create an artifact repository + operationId: createArtifactRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactRepository' + /api/v2/databases/{database_name}/schemas/{schema_name}/artifact-repositories/{name}: + get: + summary: Fetch an artifact repository + tags: + - artifact-repository + description: Fetch an artifact repository + operationId: fetchArtifactRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactRepository' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete an artifact repository + tags: + - artifact-repository + description: Delete an artifact repository + operationId: deleteArtifactRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/artifact-repositories/{name}:rename: + post: + summary: Changes the name of an artifact repository + tags: + - artifact-repository + description: Changes the name of an artifact repository + operationId: renameArtifactRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories: + get: + summary: Lists image repositories. + tags: + - image-repository + description: Lists the image repositories under a specified database and schema. + operationId: listImageRepositories + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListImageRepositoriesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Creates an image repository in the specified database and schema. + tags: + - image-repository + description: Creates an image repository in the specified database, schema, and create mode. The `createMode` query parameter specifies what action to take based on whether the repository already exists. See the ImageRepository component definition for what is required to be provided in the request body. + operationId: createImageRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ImageRepository' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories/{name}: + get: + summary: Fetches an image repository. + tags: + - image-repository + description: Fetches a named image repository in a specified database and schema. + operationId: fetchImageRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ImageRepository' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Deletes an image repository. + tags: + - image-repository + description: Deletes an image repository with the given name. If you enable the `ifExists` query parameter, the operation succeeds even if the object does not exist. Otherwise, a 404 failure is returned if the object does not exist. + operationId: deleteImageRepository + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories/{name}/images: + get: + summary: List images in the image repository. + tags: + - image-repository + description: List images in the given image repository. + operationId: listImagesInRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListImagesInRepositoryResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks: + get: + summary: List notebooks + tags: + - notebook + description: List notebooks + operationId: listNotebooks + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListNotebooksResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a notebook + tags: + - notebook + description: Create a notebook + operationId: createNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}: + get: + summary: Fetch a notebook + tags: + - notebook + description: Fetch a notebook + operationId: fetchNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Notebook' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a notebook + tags: + - notebook + description: Delete a notebook + operationId: deleteNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:execute: + post: + summary: Execute a Notebook + tags: + - notebook + description: Execute a Notebook + operationId: executeNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/asyncExec' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:rename: + post: + summary: Changes the name of the notebook to new name. + tags: + - notebook + description: Changes the name of the notebook to new name. The new identifier must be unique for the schema. + operationId: renameNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:add-live-version: + post: + summary: Adds a LIVE version to the notebook + tags: + - notebook + description: Adds a LIVE version to the notebook + operationId: addLiveVersionNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - name: fromLast + description: Sets the LIVE version to the LAST version of the notebook + in: query + required: false + schema: + type: boolean + - name: comment + description: Sets a comment for the notebook or version of the notebook + in: query + required: false + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:commit: + post: + summary: Commits the LIVE version of the notebook + tags: + - notebook + description: If a Git connection is set up for the notebook, commits the LIVE version of the notebook to the Git repository + operationId: commitNotebook + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - name: version + description: live version of the alias + in: query + required: false + schema: + type: string + - name: comment + description: Sets a comment for the notebook or version of the notebook + in: query + required: false + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services: + get: + summary: List services + tags: + - service + description: Lists the services under the database and schema. + operationId: listServices + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServicesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a service + tags: + - service + description: Create a service, with standard create modifiers as query parameters. See the Service component definition for what is required to be provided in the request body. + operationId: createService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: createMode + description: 'Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.' + in: query + schema: + type: string + enum: + - errorIfExists + - ifNotExists + example: errorIfExists + default: errorIfExists + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Service' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services:execute-job: + post: + summary: Execute a job service + tags: + - service + description: Create and execute a job service. See the JobService component definition for what is required to be provided in the request body. + operationId: executeJobService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/JobService' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}: + get: + description: Fetch a service. + tags: + - service + operationId: fetchService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Service' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a service + tags: + - service + description: Delete a service with the given name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. + operationId: deleteService + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/logs: + get: + description: Fetch the logs for a given service. + tags: + - service + operationId: fetchServiceLogs + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: instanceId + description: ID of the service instance, starting with 0. + required: true + schema: + type: integer + - in: query + name: containerName + description: Container name as specified in the service specification file. + required: true + schema: + type: string + - in: query + name: numLines + schema: + type: integer + description: Number of trailing log lines to retrieve. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: object + properties: + system$get_service_logs: + type: string + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/status: + get: + deprecated: true + description: Fetch the status for a given service. Deprecated - use listServiceContainers instead. + tags: + - service + operationId: fetchServiceStatus + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: timeout + schema: + type: integer + description: Number of seconds to wait for the service to reach a steady state (for example, READY) before returning the status. If the service does not reach a steady state within the specified time, Snowflake returns the current state. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: object + properties: + system$get_service_status: + type: string + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/containers: + get: + description: List all the containers of the service + tags: + - service + operationId: listServiceContainers + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServiceContainersResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/instances: + get: + description: List all the instances of the service + tags: + - service + operationId: listServiceInstances + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServiceInstancesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/roles: + get: + description: List all the service roles of the service + tags: + - service + operationId: listServiceRoles + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServiceRolesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{service}/roles/{name}/grants-of: + get: + description: List all the grants of the service role + tags: + - service + operationId: listServiceRoleGrantsOf + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/service' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServiceRoleGrantsOfResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{service}/roles/{name}/grants: + get: + description: List all the grants given to the service role + tags: + - service + operationId: listServiceRoleGrantsTo + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/service' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListServiceRoleGrantsToResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}:resume: + post: + description: Resume a service. + tags: + - service + operationId: resumeService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}:suspend: + post: + description: Suspend a service. + tags: + - service + operationId: suspendService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/endpoints: + get: + summary: List the endpoints in a service. + description: Lists the endpoints in a Snowpark Container Services service (or a job service). + tags: + - service + operationId: showServiceEndpoints + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ShowServiceEndpointsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits: + get: + summary: List Streamlits + tags: + - streamlit + description: List Streamlits in a schema. Supports filtering with pattern matching. + operationId: listStreamlits + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: Successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListStreamlitsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a Streamlit + tags: + - streamlit + description: Create a new Streamlit application, or replace an existing one. Supports CREATE, CREATE OR REPLACE, and CREATE IF NOT EXISTS modes. + operationId: createStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Streamlit' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}: + get: + summary: Fetch a Streamlit + tags: + - streamlit + description: Fetch detailed information about a specific Streamlit by name, including metadata, configuration, and version details. + operationId: fetchStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: Successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Streamlit' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a Streamlit + tags: + - streamlit + description: Delete a Streamlit. The Streamlit can be restored using undrop within the retention period. + operationId: deleteStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:undrop: + post: + summary: Undrop a Streamlit + tags: + - streamlit + description: Restore a previously deleted Streamlit within the retention period. + operationId: undropStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:rename: + post: + summary: Rename a Streamlit + tags: + - streamlit + description: Rename a Streamlit to a new name, optionally in a different database or schema. + operationId: renameStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + $ref: '#/components/schemas/Identifier' + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:add-live-version: + post: + summary: Add live version + tags: + - streamlit + description: Add a live version to the Streamlit, making a specific version active for users. + operationId: addLiveVersionStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - name: fromLast + in: query + required: false + description: Set the LIVE version to the LAST version of the Streamlit. + schema: + type: boolean + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/AddLiveVersionStreamlitRequest' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:commit: + post: + summary: Commit live version + tags: + - streamlit + description: If a Git connection is set up, commit the LIVE version of the Streamlit to the Git repository. + operationId: commitStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitStreamlitRequest' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:add-version: + post: + summary: Add version from source + tags: + - streamlit + description: Add a new version to the Streamlit by copying files from a specified stage location. + operationId: addVersionStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddVersionStreamlitRequest' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:add-version-from-git: + post: + summary: Add version from Git + tags: + - streamlit + description: Add a new version to the Streamlit using a Git reference URI. The URI can point to either a tag or a commit. + operationId: addVersionFromGitStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddVersionFromGitStreamlitRequest' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:abort: + post: + summary: Abort live version + tags: + - streamlit + description: Abort the live version of the Streamlit, discarding uncommitted changes if a Git connection is configured. + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + operationId: abortStreamlit + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:pull: + post: + summary: Pull from Git + tags: + - streamlit + description: Pull the latest changes from the Git repository for a Streamlit with Git integration. + operationId: pullStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streamlits/{name}:push: + post: + summary: Push to Git + tags: + - streamlit + description: Push committed changes from the Streamlit back to its connected Git repository. + operationId: pushStreamlit + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StreamlitPushOptions' + /api/v2/databases/{database_name}/schemas/{schema_name}/artifact-repositories/{artifact_repository_name}: + parameters: [] + put: + summary: Create or update an artifact repository + tags: + - artifact-repository + description: Create or update an artifact repository + operationId: createOrAlterArtifactRepository + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: artifact_repository_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactRepository' + /api/v2/databases/{database_name}/schemas/{schema_name}/services/{service_name}: + parameters: [] + put: + summary: Create a (or alter an existing) service. + tags: + - service + description: Create a (or alter an existing) service. Even if the operation is just an alter, the full property set must be provided. + operationId: createOrAlterService + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: service_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Service' + responses: + '200': + description: Successful request + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + ArtifactRepository: + type: object + description: A Snowflake artifact repository + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the artifact repository + type: + type: string + enum: + - PIP + description: Specifies the type of the repository. The only current supported option is ‘PIP’. + comment: + type: string + description: user comment associated to an object in the dictionary + api_integration: + type: string + description: Link to an integration object + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the artifact repository was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the artifact repository is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the artifact repository is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the artifact repository + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the artifact repository + required: + - name + - type + - api_integration + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Image: + type: object + description: A image in a Snowflake image repository. + properties: + created_on: + type: string + description: Date and time when the image was uploaded to the image repository. + readOnly: true + image_name: + type: string + description: Image name. + readOnly: true + tags: + type: string + description: Image tags. + readOnly: true + digest: + type: string + description: SHA256 digest of the image. + readOnly: true + image_path: + type: string + description: Image path (database_name/schema_name/repository_name/image_name:image_tag). + readOnly: true + ImageRepository: + type: object + description: A Snowflake image repository. + properties: + name: + $ref: '#/components/schemas/Identifier' + database_name: + $ref: '#/components/schemas/Identifier' + readOnly: true + schema_name: + $ref: '#/components/schemas/Identifier' + readOnly: true + created_on: + type: string + description: Time the image repository was created. + format: date-time + readOnly: true + repository_url: + type: string + description: Current URL of the image repository. + readOnly: true + owner: + type: string + description: Identifier for the current owner of the image repository. + readOnly: true + owner_role_type: + type: string + description: Role type of the image repository owner. + readOnly: true + example: + name: image_repository_name + database_name: test_db + schema_name: test_schema + created_on: '2024-06-18T01:01:01.111111' + repository_url: https://www.snowflake.com + owner: IMAGE_ADMIN + owner_role_type: ADMIN + required: + - name + Notebook: + type: object + description: A Snowflake notebook + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the notebook + version: + type: string + description: User specified version alias + fromLocation: + type: string + description: Location to copy the file from. This must be a Snowflake stage location. + main_file: + type: string + description: Name + path of the file for the Notebook + comment: + type: string + description: user comment associated to an object in the dictionary + default_version: + type: string + description: The default version name of a file based entity. + query_warehouse: + type: string + description: Warehouse against which the queries issued by the Streamlit app are run against + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the notebook was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the notebook is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the notebook is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the notebook + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the notebook + url_id: + type: string + readOnly: true + description: Unique ID associated with the notebook object. + title: + type: string + readOnly: true + description: User facing title of the Streamlit app or an Organization Profile + default_packages: + type: string + readOnly: true + description: Default packages of the notebook + user_packages: + type: string + readOnly: true + description: User packages of the notebook + runtime_name: + type: string + readOnly: true + description: The runtime to run the Streamlit or Notebook on. If this is not set, the warehouse is assumed + compute_pool: + type: string + readOnly: true + description: Compute pool name where the snowservice runs + import_urls: + type: array + items: + type: string + readOnly: true + description: List of urls + external_access_integrations: + type: array + items: + type: string + readOnly: true + description: List of external access integrations attached to this function + external_access_secrets: + type: string + readOnly: true + description: Secrets to be used with this function for external access + idle_auto_shutdown_time_seconds: + type: integer + format: int64 + readOnly: true + description: Sets the time in seconds for when to shutdown an idle Notebook. + default_version_details: + $ref: '#/components/schemas/VersionDetails' + readOnly: true + last_version_details: + $ref: '#/components/schemas/VersionDetails' + readOnly: true + live_version_location_uri: + type: string + readOnly: true + description: The current version location + budget: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Name of the budget if the notebook is monitored by a budget + required: + - name + VersionDetails: + type: object + description: The version details of a file based entity + properties: + name: + type: string + readOnly: true + description: The last version name + alias: + type: string + readOnly: true + description: The default/last version alias of a file based entity. + location_url: + type: string + readOnly: true + description: The default/last version location. + source_location_uri: + type: string + readOnly: true + description: The default/last version source location. + git_commit_hash: + type: string + readOnly: true + description: The default/last version git commit# + ServiceSpecInlineText: + description: Specifies service specification with inline text. + properties: + spec_text: + type: string + description: Specifies service specification. You can use a pair of dollar signs ($$) to delimit the beginning and ending of the specification string. + spec_type: + type: string + description: Type of the service specification, can be `from_file` or `from_inline`. + required: + - spec_text + type: object + discriminator: + propertyName: spec_type + mapping: + from_file: ServiceSpecStageFile + from_inline: ServiceSpecInlineText + writeOnly: true + ServiceSpecStageFile: + description: Specifies service specification with a stage file. + properties: + stage: + type: string + description: Specifies the Snowflake internal stage where the specification file is stored; for example, @tutorial_stage. + spec_file: + type: string + description: Specifies the path to the service specification file on the stage; for example, 'some-dir/echo_spec.yaml'. + spec_type: + type: string + description: Type of the service specification, can be `from_file` or `from_inline`. + required: + - stage + - spec_file + type: object + discriminator: + propertyName: spec_type + mapping: + from_file: ServiceSpecStageFile + from_inline: ServiceSpecInlineText + writeOnly: true + ServiceSpec: + type: object + description: Specifies service specification. + properties: + spec_type: + type: string + description: Type of the service specification, can be `from_file` or `from_inline`. + discriminator: + propertyName: spec_type + mapping: + from_file: ServiceSpecStageFile + from_inline: ServiceSpecInlineText + writeOnly: true + Service: + type: object + description: A Snowflake job service object. + writeOnly: true + properties: + name: + $ref: '#/components/schemas/Identifier' + description: String that specifies the identifier (that is, the name) for the service. + status: + type: string + description: The current status of the service. + compute_pool: + type: string + description: Specifies the name of the compute pool in your account on which to run the service. + spec: + $ref: '#/components/schemas/ServiceSpec' + description: Specifies service specification. + external_access_integrations: + type: array + description: Specifies the names of the external access integrations that allow your service to access external sites. + items: + type: string + query_warehouse: + $ref: '#/components/schemas/Identifier' + description: Warehouse to use if a service container connects to Snowflake to execute a query but does not explicitly specify a warehouse to use. + comment: + type: string + description: Specifies a comment for the service. + is_async_job: + type: boolean + description: True if the service is an async job service; false otherwise. + auto_resume: + type: boolean + description: Specifies whether to automatically resume a service when a service function or ingress is called. + current_instances: + type: integer + description: The current number of instances for the service. + readOnly: true + target_instances: + type: integer + description: The target number of service instances that should be running as determined by Snowflake. + readOnly: true + min_ready_instances: + type: integer + description: The minimum number of ready service instances to declare the service as READY. + min_instances: + type: integer + description: Specifies the minimum number of service instances to run. + max_instances: + type: integer + description: Specifies the maximum number of service instances to run. + database_name: + $ref: '#/components/schemas/Identifier' + description: The name of the parent database for the service. + readOnly: true + schema_name: + $ref: '#/components/schemas/Identifier' + description: The name of the parent schema for the service. + readOnly: true + owner: + type: string + description: Role that owns the service. + readOnly: true + dns_name: + type: string + description: Snowflake-assiged DNS name of the service. The DNS name enables service-to-service communications. + readOnly: true + created_on: + type: string + description: Timestamp when the service was created. + format: date-time + readOnly: true + updated_on: + type: string + description: Timestamp when the service was last updated. + format: date-time + readOnly: true + resumed_on: + type: string + description: Timestamp when the service was last resumed. + format: date-time + readOnly: true + suspended_on: + type: string + description: Timestamp when the service was last suspended. + format: date-time + readOnly: true + auto_suspend_secs: + type: integer + description: Number of seconds of inactivity after which the service will be automatically suspended. The default value is 0 which represents the service will not be automatically suspended. + format: int64 + owner_role_type: + type: string + description: The role type of the service owner. + readOnly: true + is_job: + type: boolean + description: True if the service is a job service; false otherwise. + readOnly: true + spec_digest: + type: string + description: The unique and immutable identifier representing the service spec content. + readOnly: true + is_upgrading: + type: boolean + description: TRUE, if Snowflake is in the process of upgrading the service. + readOnly: true + managing_object_domain: + type: string + description: The domain of the managing object (for example, the domain of the notebook that manages the service). NULL if the service is not managed by a Snowflake entity. + readOnly: true + managing_object_name: + type: string + description: The name of the managing object (for example, the name of the notebook that manages the service). NULL if the service is not managed by a Snowflake entity. + readOnly: true + required: + - name + - compute_pool + - spec + example: + name: service_name + compute_pool: compute_pool_name + spec: + spec_type: from_file + stage: '@stage_name' + spec_file: spec_file.yaml + min_ready_instances: 1 + min_instances: 2 + max_instances: 5 + database_name: testdb + schema_name: testschema + owner: SYSADMIN + is_job: false + JobService: + type: object + description: A Snowflake job service object. + writeOnly: true + properties: + name: + $ref: '#/components/schemas/Identifier' + description: String that specifies the identifier (that is, the name) for the service. + status: + type: string + description: The current status of the service. + compute_pool: + type: string + description: Specifies the name of the compute pool in your account on which to run the service. + spec: + $ref: '#/components/schemas/ServiceSpec' + description: Specifies service specification. + external_access_integrations: + type: array + description: Specifies the names of the external access integrations that allow your service to access external sites. + items: + type: string + query_warehouse: + $ref: '#/components/schemas/Identifier' + description: Warehouse to use if a service container connects to Snowflake to execute a query but does not explicitly specify a warehouse to use. + comment: + type: string + description: Specifies a comment for the service. + is_async_job: + type: boolean + description: True if the service is an async job service; false otherwise. + required: + - name + - compute_pool + - spec + example: + name: service_name + compute_pool: compute_pool_name + spec: + spec_type: from_file + stage: '@stage_name' + spec_file: spec_file.yaml + ServiceEndpoint: + type: object + properties: + name: + type: string + description: User-friendly endpoint name that represents the corresponding port. + port: + type: integer + description: The network port the service is listening on. NULL, when portRange is specified. + portRange: + type: string + description: The network port range the service is listening on. NULL, when port is specified. + protocol: + type: string + description: Supported network protocol (TCP, HTTP, or HTTPS). + default: HTTP + is_public: + type: boolean + description: True, if the endpoint is public, accessible from internet. + default: false + ingress_url: + type: string + description: Endpoint URL accessible from the internet. + readOnly: true + example: + name: endpoint + port: 8080 + protocol: HTTPS + is_public: true + ingress_url: abcd-org-acc.snowflakecomputing.app + ServiceContainer: + type: object + properties: + database_name: + $ref: '#/components/schemas/Identifier' + description: Database in which the service is created. + readOnly: true + schema_name: + $ref: '#/components/schemas/Identifier' + description: Schema in which the service is created. + readOnly: true + service_name: + $ref: '#/components/schemas/Identifier' + description: The name of the service. + readOnly: true + service_status: + type: string + description: The current status of the service. + readOnly: true + instance_id: + type: string + description: ID of the service instance (this is the index of the service instance starting from 0). + readOnly: true + instance_status: + type: string + description: The current status of the service instance. + readOnly: true + container_name: + type: string + description: Name of the container. + readOnly: true + status: + type: string + description: Service container status. + readOnly: true + message: + type: string + description: Additional clarification about status. + readOnly: true + image_name: + type: string + description: Image name used to create the service container. + readOnly: true + image_digest: + type: string + description: The unique and immutable identifier representing the image content. + readOnly: true + restart_count: + type: integer + description: Number of times Snowflake restarted the service. + readOnly: true + start_time: + type: string + description: Date and time when the container started. + readOnly: true + example: + database_name: testdb + schema_name: testschema + service_name: myservice + instance_id: '0' + container_name: main + status: PENDING + message: Pending scheduling. + image_name: /db/schema/repo/image:1.0 + image_digest: abcdefd + restart_count: 0 + start_time: '2023-01-01 00:00:00+00:00' + ServiceInstance: + type: object + properties: + database_name: + $ref: '#/components/schemas/Identifier' + description: Database in which the service is created. + readOnly: true + schema_name: + $ref: '#/components/schemas/Identifier' + description: Schema in which the service is created. + readOnly: true + service_name: + $ref: '#/components/schemas/Identifier' + description: The name of the service. + readOnly: true + service_status: + type: string + description: The current status of the service. + readOnly: true + instance_id: + type: string + description: ID of the service instance (this is the index of the service instance starting from 0). + readOnly: true + status: + type: string + description: The current status of the service instance. + readOnly: true + spec_digest: + type: string + description: The unique and immutable identifier that represents the service specification content. + readOnly: true + creation_time: + type: string + description: The time when Snowflake started creating the service instance. + readOnly: true + start_time: + type: string + description: The time when Snowflake acknowledged the service instance is running on a node. + readOnly: true + example: + database_name: testdb + schema_name: testschema + service_name: myservice + instance_id: '0' + status: PENDING + spec_digest: abcdefg + creation_time: '2023-01-01 00:00:00+00:00' + start_time: '2023-01-01 00:00:00+00:00' + ServiceRole: + type: object + properties: + created_on: + type: string + format: date-time + description: Date and time when the service role was created + readOnly: true + name: + type: string + description: Service role name + readOnly: true + comment: + type: string + description: Comment, if any, for the service role + readOnly: true + example: + created_on: '2023-01-01 00:00:00+00:00' + name: testrole + comment: This is a service role. + GrantOf: + type: object + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + role: + type: string + readOnly: true + description: The name of the service role + granted_to: + type: string + readOnly: true + description: The type of the grantee, can be USER or ROLE + grantee_name: + type: string + readOnly: true + description: The name of the grantee + granted_by: + type: string + readOnly: true + description: The name of role that granted the service role to the grantee + example: + created_on: '2023-01-01 00:00:00+00:00' + role: db.schema.service.svc_role + granted_to: role + grantee_name: test_role + granted_by: sysadmin + ServiceRoleGrantTo: + type: object + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + privilege: + type: string + readOnly: true + description: The name of the privilege + granted_on: + type: string + readOnly: true + description: The type of of the securable + name: + type: string + readOnly: true + description: The name of the securable + granted_to: + type: string + readOnly: true + description: The type of the grantee + grantee_name: + type: string + readOnly: true + description: The name of the grantee + example: + created_on: '2023-01-01 00:00:00+00:00' + privilege: usage + granted_on: service_endpoint + name: db.schema.service!svc_role + granted_to: service role + grantee_name: all_endpoints_usage + Streamlit: + type: object + description: A Snowflake Streamlit object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the Streamlit + comment: + type: string + description: Optional description of the Streamlit app, used for documentation or metadata purposes + imports: + type: array + items: + type: string + description: List of files to be imported from a stage. + external_access_integrations: + type: array + items: + type: string + description: List of external access integrations needed in order for the Streamlit app code to access external networks. + external_access_secrets: + type: string + readOnly: true + description: Secrets needed for the Streamlit app code to access external networks. + title: + type: string + description: User-facing title of the Streamlit app. + main_file: + type: string + description: Name and path of the entry file for the Streamlit app + query_warehouse: + type: string + description: Warehouse used to run queries issued by the Streamlit app + default_version: + type: string + description: The default version name of Streamlit. Valid values are "first" (first version), "last" (latest version), or "version$N" (specific version, e.g., "version$1"). Custom names are not supported. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the Streamlit was created. + default_version_details: + $ref: '#/components/schemas/VersionDetailsStreamlit' + readOnly: true + last_version_details: + $ref: '#/components/schemas/VersionDetailsStreamlit' + readOnly: true + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the Streamlit is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the Streamlit is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the Streamlit + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the Streamlit + source_location: + type: string + description: The stage from which the source files are copied to initialize the Streamlit app. + url_id: + type: string + readOnly: true + description: A unique ID associated with the Streamlit object's URL. + default_packages: + type: array + items: + type: string + readOnly: true + description: Default Python packages for Streamlit apps. + user_packages: + type: array + items: + type: string + readOnly: true + description: Python packages specified in the environment.yml file. + live_version_location_uri: + type: string + readOnly: true + description: The location of the Streamlit object's live version files. + required: + - name + StreamlitPushOptions: + type: object + description: Options for the PUSH command. + properties: + auth_type: + type: string + description: Specifies which authentication method is used. + discriminator: + propertyName: auth_type + mapping: + CREDENTIALS: GitPushWithCredentials + USERNAME_PASSWORD: GitPushWithUsernamePassword + GitPushWithCredentials: + description: Git push using Snowflake-managed credentials. + type: object + properties: + git_credentials: + type: string + description: The Snowflake secret containing the credentials to use. + git_author_name: + type: string + description: The name of the Git author. + git_author_email: + type: string + description: The email of the Git author. + to_git_branch_uri: + type: string + description: Pushes committed changes to the specified branch. + git_push_comment: + type: string + description: A comment to include in the Git push. + auth_type: + type: string + description: Specifies which authentication method is used. + required: + - auth_type + - git_credentials + - git_author_name + - git_author_email + discriminator: + propertyName: auth_type + mapping: + CREDENTIALS: GitPushWithCredentials + USERNAME_PASSWORD: GitPushWithUsernamePassword + GitPushWithUsernamePassword: + description: Git push using raw username and password. + type: object + properties: + git_username: + type: string + description: A Git username. + git_password: + type: string + description: A Git password. + git_author_name: + type: string + description: The name of the Git author. + git_author_email: + type: string + description: The email of the Git author. + to_git_branch_uri: + type: string + description: Pushes committed changes to the specified branch. + git_push_comment: + type: string + description: A comment to include in the Git push. + auth_type: + type: string + description: Specifies which authentication method is used. + required: + - auth_type + - git_username + - git_password + - git_author_name + - git_author_email + discriminator: + propertyName: auth_type + mapping: + CREDENTIALS: GitPushWithCredentials + USERNAME_PASSWORD: GitPushWithUsernamePassword + VersionDetailsStreamlit: + type: object + description: The version details of a file-based entity + properties: + name: + type: string + readOnly: true + description: The last version name + alias: + type: string + readOnly: true + description: The default/last version alias of a file-based entity. + location_url: + type: string + readOnly: true + description: The default/last version location. + source_location_uri: + type: string + readOnly: true + description: The default/last version source location. + git_commit_hash: + type: string + readOnly: true + description: The default/last version Git commit + CommitStreamlitRequest: + type: object + properties: + version: + type: object + properties: + comment: + type: string + description: Optional commit message. + AddLiveVersionStreamlitRequestVersion: + type: object + properties: + name: + type: string + description: Optional alias name for the live version. + comment: + type: string + description: Optional comment for the live version. + AddLiveVersionStreamlitRequest: + type: object + description: Request body for adding a LIVE version to a Streamlit. + properties: + version: + $ref: '#/components/schemas/AddLiveVersionStreamlitRequestVersion' + AddVersionStreamlitRequest: + type: object + title: AddVersionStreamlitRequest + description: Request body for adding a new version to a Streamlit from a source location. + properties: + source_location: + type: string + description: URI to the source location. + version: + type: object + properties: + name: + type: string + description: Name/Alias for the new version. + comment: + type: string + ifNotExists: + type: boolean + required: + - name + required: + - source_location + StreamlitVersionForGit: + type: object + description: Version metadata for ADD VERSION from Git. + properties: + name: + type: string + description: Name or alias for the new version. + comment: + type: string + description: Optional comment associated with the pull. + required: + - name + AddVersionFromGitStreamlitRequest: + type: object + title: AddVersionFromGitStreamlitRequest + description: Request body for adding a new version to a Streamlit from a Git tag or commit URI. + properties: + version: + $ref: '#/components/schemas/StreamlitVersionForGit' + git_ref: + type: string + description: Git reference URI. Accepts either a tag URI or a commit URI. + required: + - version + - git_ref + ListArtifactRepositoriesResponse: + type: object + properties: + artifact_repositories: + type: array + items: + $ref: '#/components/schemas/ArtifactRepository' + ListImageRepositoriesResponse: + type: object + properties: + image_repositories: + type: array + items: + $ref: '#/components/schemas/ImageRepository' + ListImagesInRepositoryResponse: + type: object + properties: + images_in_repository: + type: array + items: + $ref: '#/components/schemas/Image' + ListNotebooksResponse: + type: object + properties: + notebooks: + type: array + items: + $ref: '#/components/schemas/Notebook' + ListServicesResponse: + type: object + properties: + services: + type: array + items: + $ref: '#/components/schemas/Service' + ListServiceContainersResponse: + type: object + properties: + service_containers: + type: array + items: + $ref: '#/components/schemas/ServiceContainer' + ListServiceInstancesResponse: + type: object + properties: + service_instances: + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + ListServiceRolesResponse: + type: object + properties: + service_roles: + type: array + items: + $ref: '#/components/schemas/ServiceRole' + ListServiceRoleGrantsOfResponse: + type: object + properties: + service_role_grants_of: + type: array + items: + $ref: '#/components/schemas/GrantOf' + ListServiceRoleGrantsToResponse: + type: object + properties: + service_role_grants_to: + type: array + items: + $ref: '#/components/schemas/ServiceRoleGrantTo' + ShowServiceEndpointsResponse: + type: object + properties: + show_service_endpoints: + type: array + items: + $ref: '#/components/schemas/ServiceEndpoint' + ListStreamlitsResponse: + type: object + properties: + streamlits: + type: array + items: + $ref: '#/components/schemas/Streamlit' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + service: + name: service + description: Name of the service that contains the service role. + required: true + in: path + schema: + $ref: '#/components/schemas/Identifier' + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + artifact_repositories: + id: snowflake.apps.artifact_repositories + name: artifact_repositories + title: Artifact Repositories + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.artifact_repositories + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListArtifactRepositoriesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"artifact_repositories\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1artifact-repositories~1{artifact_repository_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/artifact_repositories/methods/get' + - $ref: '#/components/x-stackQL-resources/artifact_repositories/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/artifact_repositories/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/artifact_repositories/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/artifact_repositories/methods/create_or_alter' + image_repositories: + id: snowflake.apps.image_repositories + name: image_repositories + title: Image Repositories + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.image_repositories + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListImageRepositoriesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"image_repositories\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/image_repositories/methods/get' + - $ref: '#/components/x-stackQL-resources/image_repositories/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/image_repositories/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/image_repositories/methods/delete' + replace: [] + images: + id: snowflake.apps.images + name: images + title: Images + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}~1images/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.images_in_repository + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListImagesInRepositoryResponse' + transform: + body: |- + {{- $wrapped := printf "{\"images_in_repository\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/images/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + notebooks: + id: snowflake.apps.notebooks + name: notebooks + title: Notebooks + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.notebooks + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListNotebooksResponse' + transform: + body: |- + {{- $wrapped := printf "{\"notebooks\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + execute: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:execute/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + add_live_version: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:add-live-version/post' + response: + mediaType: application/json + openAPIDocKey: '200' + commit: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:commit/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/notebooks/methods/get' + - $ref: '#/components/x-stackQL-resources/notebooks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/notebooks/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/notebooks/methods/delete' + replace: [] + services: + id: snowflake.apps.services + name: services + title: Services + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.services + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServicesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"services\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services/post' + response: + mediaType: application/json + openAPIDocKey: '200' + execute_job: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services:execute-job/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{service_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/services/methods/get' + - $ref: '#/components/x-stackQL-resources/services/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/services/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/services/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/services/methods/create_or_alter' + service_logs: + id: snowflake.apps.service_logs + name: service_logs + title: Service Logs + methods: + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_logs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + service_status: + id: snowflake.apps.service_status + name: service_status + title: Service Status + methods: + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_status/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + service_containers: + id: snowflake.apps.service_containers + name: service_containers + title: Service Containers + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1containers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.service_containers + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServiceContainersResponse' + transform: + body: |- + {{- $wrapped := printf "{\"service_containers\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_containers/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_instances: + id: snowflake.apps.service_instances + name: service_instances + title: Service Instances + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1instances/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.service_instances + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServiceInstancesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"service_instances\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_instances/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_roles: + id: snowflake.apps.service_roles + name: service_roles + title: Service Roles + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1roles/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.service_roles + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServiceRolesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"service_roles\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_roles/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_role_grants_of: + id: snowflake.apps.service_role_grants_of + name: service_role_grants_of + title: Service Role Grants Of + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{service}~1roles~1{name}~1grants-of/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.service_role_grants_of + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServiceRoleGrantsOfResponse' + transform: + body: |- + {{- $wrapped := printf "{\"service_role_grants_of\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_role_grants_of/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_role_grants: + id: snowflake.apps.service_role_grants + name: service_role_grants + title: Service Role Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{service}~1roles~1{name}~1grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.service_role_grants_to + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListServiceRoleGrantsToResponse' + transform: + body: |- + {{- $wrapped := printf "{\"service_role_grants_to\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_role_grants/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + service_endpoints: + id: snowflake.apps.service_endpoints + name: service_endpoints + title: Service Endpoints + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1endpoints/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.show_service_endpoints + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ShowServiceEndpointsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"show_service_endpoints\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_endpoints/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + streamlits: + id: snowflake.apps.streamlits + name: streamlits + title: Streamlits + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.streamlits + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListStreamlitsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"streamlits\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + add_live_version: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:add-live-version/post' + response: + mediaType: application/json + openAPIDocKey: '200' + commit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:commit/post' + response: + mediaType: application/json + openAPIDocKey: '200' + add_version: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:add-version/post' + response: + mediaType: application/json + openAPIDocKey: '200' + add_version_from_git: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:add-version-from-git/post' + response: + mediaType: application/json + openAPIDocKey: '200' + abort: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:abort/post' + response: + mediaType: application/json + openAPIDocKey: '200' + pull: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:pull/post' + response: + mediaType: application/json + openAPIDocKey: '200' + push: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streamlits~1{name}:push/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/streamlits/methods/get' + - $ref: '#/components/x-stackQL-resources/streamlits/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/streamlits/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/streamlits/methods/delete' + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml b/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml deleted file mode 100644 index 945b0d11..00000000 --- a/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml +++ /dev/null @@ -1,1000 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Catalog Integration API - description: The Snowflake Catalog Integration API is a REST API that you can use - to access, update, and perform certain actions on Catalog Integration resource - in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/catalog-integrations: - get: - summary: List catalog integrations. - tags: - - catalog-integration - description: List catalog integrations. - operationId: listCatalogIntegrations - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/CatalogIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a catalog integration. - tags: - - catalog-integration - description: Create a catalog integration. - operationId: createCatalogIntegration - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogIntegration' - /api/v2/catalog-integrations/{name}: - get: - summary: Fetch a catalog integration. - tags: - - catalog-integration - description: Fetch a catalog integration. - operationId: fetchCatalogIntegration - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a catalog integration. - tags: - - catalog-integration - description: Delete a catalog integration. - operationId: deleteCatalogIntegration - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - CatalogIntegration: - type: object - description: Catalog integration - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the catalog integration. - catalog: - $ref: '#/components/schemas/Catalog' - description: Type of catalog and its parameters. - table_format: - type: string - enum: - - ICEBERG - description: Table format of the catalog. - enabled: - type: boolean - description: 'whether this catalog integration is available to use for Iceberg - tables. ' - comment: - type: string - description: Comment. - type: - type: string - readOnly: true - description: Type of the integration. Always CATALOG. - category: - type: string - readOnly: true - description: Category of the integration. Always CATALOG. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the catalog integration was created. - required: - - name - - catalog - - table_format - - enabled - Catalog: - type: object - properties: - catalog_source: - type: string - enum: - - GLUE - - OBJECT_STORE - - POLARIS - description: Type of external catalog - required: - - catalog_source - discriminator: - propertyName: catalog_source - mapping: - GLUE: Glue - OBJECT_STORE: ObjectStore - POLARIS: Polaris - Glue: - type: object - allOf: - - $ref: '#/components/schemas/Catalog' - properties: - glue_aws_role_arn: - type: string - description: ARN for AWS role to assume - glue_catalog_id: - type: string - description: Glue catalog id - glue_region: - type: string - description: AWS region of the Glue catalog. Must be specified if the Snowflake - account is not hosted on AWS. - catalog_namespace: - type: string - description: default AWS Glue catalog namespace for all Iceberg table that - use this catalog integration - required: - - glue_aws_role_arn - - glue_catalog_id - - catalog_namespace - ObjectStore: - type: object - allOf: - - $ref: '#/components/schemas/Catalog' - Polaris: - type: object - allOf: - - $ref: '#/components/schemas/Catalog' - properties: - catalog_namespace: - type: string - description: Default Polaris namespace used by all Iceberg tables associated - with this catalog integration - rest_config: - $ref: '#/components/schemas/RestConfig' - description: Information about the Polaris catalog account and catalog name. - rest_authentication: - $ref: '#/components/schemas/RestAuthentication' - description: Authentication details that Snowflake uses to connect to the - Polaris catalog. - required: - - catalog_namespace - - rest_config - - rest_authentication - RestConfig: - type: object - properties: - catalog_uri: - type: string - description: Customer's Polaris account locator URL - warehouse: - type: string - description: Name of the catalog to use in Polaris - required: - - catalog_uri - - warehouse - RestAuthentication: - type: object - properties: - type: - type: string - enum: - - OAUTH - description: Authentication type. - required: - - type - discriminator: - propertyName: type - mapping: - OAUTH: OAuth - OAuth: - type: object - allOf: - - $ref: '#/components/schemas/RestAuthentication' - properties: - oauth_client_id: - type: string - description: The client ID of the OAuth2 credential associated with the - Polaris service connection. - oauth_client_secret: - type: string - description: The secret for the OAuth2 credential associated with the Polaris - service connection. - oauth_allowed_scopes: - type: array - items: - type: string - description: The scope of the OAuth token. Only one scope is included in - the Iceberg REST API specification, but catalogs can support more than - one scope in their implementation. - required: - - oauth_client_id - - oauth_client_secret - - oauth_allowed_scopes - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - catalog_integrations: - methods: - list_catalog_integrations: - operation: - $ref: '#/paths/~1api~1v2~1catalog-integrations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_catalog_integration: - operation: - $ref: '#/paths/~1api~1v2~1catalog-integrations/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_catalog_integration: - operation: - $ref: '#/paths/~1api~1v2~1catalog-integrations~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_catalog_integration: - operation: - $ref: '#/paths/~1api~1v2~1catalog-integrations~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/list_catalog_integrations' - - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/fetch_catalog_integration' - insert: - - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/create_catalog_integration' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/delete_catalog_integration' - replace: [] - id: snowflake.catalog_integration.catalog_integrations - name: catalog_integrations - title: Catalog Integrations diff --git a/providers/src/snowflake/v00.00.00000/services/compute-pool.yaml b/providers/src/snowflake/v00.00.00000/services/compute-pool.yaml deleted file mode 100644 index 3a763fd9..00000000 --- a/providers/src/snowflake/v00.00.00000/services/compute-pool.yaml +++ /dev/null @@ -1,1176 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Compute Pools API - description: The Snowflake Compute Pools API is a REST API that you can use to access, - update, and perform common actions on Compute Pool resources. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/compute-pools: - get: - summary: Lists compute pools. - tags: - - compute-pool - description: Lists the compute pools under the account. - operationId: listComputePools - parameters: - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ComputePool' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Creates a compute pool. - tags: - - compute-pool - description: Creates a compute pool, with standard create modifiers as query - parameters. See the Compute Pool component definition for what is required - to be provided in the request body. - operationId: createComputePool - parameters: - - $ref: '#/components/parameters/createMode' - - name: initiallySuspended - in: query - description: Specifies whether the compute pool is created initially in the - suspended state. - schema: - type: boolean - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ComputePool' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/compute-pools/{name}: - get: - summary: Fetches a compute pool. - tags: - - compute-pool - description: Fetches a named compute pool. You can get the name of the compute - pool from the `/api/v2/compute-pools` GET request. - operationId: fetchComputePool - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/ComputePool' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) compute pool. - tags: - - compute-pool - description: Create a (or alter an existing) compute pool. Even if the operation - is just an alter, the full property set must be provided. - operationId: createOrAlterComputePool - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ComputePool' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Deletes a compute pool. - tags: - - compute-pool - description: Deletes a compute pool with the given name. If you enable the `ifExists` - parameter, the operation succeeds even if the object does not exist. Otherwise, - a 404 failure is returned if the object does not exist. - operationId: deleteComputePool - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/compute-pools/{name}:resume: - post: - summary: Resumes a suspended compute pool. - tags: - - compute-pool - description: Resume a compute pool, if suspended. If the specified compute pool - is already running, this will cause a 400 Bad Request error. - operationId: resumeComputePool - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/compute-pools/{name}:suspend: - post: - summary: Suspends an active compute pool. - tags: - - compute-pool - description: Suspend a compute pool, if active. If the specified compute pool - is already suspended, no action is taken. - operationId: suspendComputePool - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/compute-pools/{name}:stopallservices: - post: - deprecated: true - summary: Stops all services on the compute pool. - tags: - - compute-pool - description: Stops all services in the compute pool. Deprecated - use :stop-all-services - instead. - operationId: stopAllServicesInComputePoolDeprecated - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/compute-pools/{name}:stop-all-services: - post: - summary: Stops all services on the compute pool. - tags: - - compute-pool - description: Stops all services in the compute pool. - operationId: stopAllServicesInComputePool - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - ComputePool: - type: object - description: A Snowflake compute pool definition. - properties: - name: - $ref: '#/components/schemas/Identifier' - min_nodes: - type: integer - description: Minimum number of nodes for the compute pool. - max_nodes: - type: integer - description: Maximum number of nodes for the compute pool. - instance_family: - type: string - description: Instance family for the compute pool. - auto_resume: - type: boolean - description: Whether Snowflake automatically resumes the compute pool when - any statement that requires the compute pool is submitted. - comment: - type: string - description: Comment describing the compute pool. - state: - type: string - description: Current state of the compute pool. Possible values include - UNKNOWN, STARTING, IDLE, ACTIVE, STOPPING, SUSPENDED, and RESIZING. - readOnly: true - enum: - - UNKNOWN - - STARTING - - IDLE - - ACTIVE - - STOPPING - - SUSPENDED - - RESIZING - num_services: - type: integer - description: Number of services on the compute pool. - readOnly: true - num_jobs: - type: integer - description: Number of jobs on the compute pool. - readOnly: true - auto_suspend_secs: - type: integer - description: Number of seconds until the compute pool automatically suspends. - format: int64 - active_nodes: - type: integer - description: Number of currently active nodes on the compute pool. - readOnly: true - idle_nodes: - type: integer - description: Number of currently idle nodes on the compute pool. - readOnly: true - target_nodes: - type: integer - description: Number of target nodes on the compute pool. - readOnly: true - created_on: - type: string - description: Time the compute pool was created. - format: date-time - readOnly: true - resumed_on: - type: string - description: Time the compute pool was last resumed. - format: date-time - readOnly: true - updated_on: - type: string - description: Time the compute pool was last updated. - format: date-time - readOnly: true - owner: - type: string - description: Identifier for the current owner of the compute pool. - readOnly: true - is_exclusive: - type: boolean - description: Whether a compute pool is created exclusively for a Snowflake - Native App. - readOnly: true - application: - type: string - description: Name of the Snowflake Native App if the compute pool is created - exclusively for the app. - readOnly: true - budget: - type: string - description: The name of the budget monitoring the credit usage of the compute - pool. - readOnly: true - error_code: - type: string - description: Current error the compute pool hit if any. - readOnly: true - status_message: - type: string - description: Current status of the compute pool if any. - readOnly: true - example: - name: compute_pool_name - warehouse: test_wh - min_nodes: 4 - max_nodes: 5 - instance_family: compute_pool_family - auto_resume: false - comment: test_comment - state: STARTING - num_services: 1 - num_jobs: 3 - auto_suspend_secs: 10 - active_nodes: 2 - idle_nodes: 2 - target_nodes: 4 - created_on: '2024-06-18T01:01:01.111111' - updated_on: '2024-06-18T01:01:01.111111' - resumed_on: '2024-06-18T01:01:01.111111' - owner: POOL_ADMIN - is_exclusive: true - application: testapp - budget: testbudget - error_code: '392507' - status_message: Compute Pool is resizing for last 10 minutes. We have observed - CAPACITY_ERROR. Please refer to our documentation. - required: - - name - - instance_family - - min_nodes - - max_nodes - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - compute_pools: - methods: - list_compute_pools: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - resume_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - stop_all_services_in_compute_pool_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:stopallservices/post' - response: - mediaType: '' - openAPIDocKey: '200' - stop_all_services_in_compute_pool: - operation: - $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:stop-all-services/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/compute_pools/methods/list_compute_pools' - - $ref: '#/components/x-stackQL-resources/compute_pools/methods/fetch_compute_pool' - insert: - - $ref: '#/components/x-stackQL-resources/compute_pools/methods/create_compute_pool' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/compute_pools/methods/delete_compute_pool' - replace: - - $ref: '#/components/x-stackQL-resources/compute_pools/methods/create_or_alter_compute_pool' - id: snowflake.compute_pool.compute_pools - name: compute_pools - title: Compute Pools -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -tags: -- name: compute-pool diff --git a/providers/src/snowflake/v00.00.00000/services/cortex-analyst.yaml b/providers/src/snowflake/v00.00.00000/services/cortex-analyst.yaml deleted file mode 100644 index 9929ce50..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-analyst.yaml +++ /dev/null @@ -1,1256 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Cortex Analyst API - description: The Snowflake Cortex Analyst API is a REST API that allows end user - to chat with their data leveraging semantic models to generate SQL queries. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/cortex/analyst/feedback: - post: - operationId: sendFeedback - tags: - - cortex-analyst - description: Send a user feedback of Cortex Analyst response - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SendFeedbackRequest' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/cortex/analyst/message: - post: - operationId: sendMessage - tags: - - cortex-analyst - summary: Send a data question to the Cortex Analyst - description: Send a data question to the Cortex Analyst - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageResponse' - text/event-stream: - schema: - type: string - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/cortex/analyst/verified-query-suggestions: - post: - operationId: generateVerifiedQuerySuggestions - tags: - - cortex-analyst - summary: Generate VQ suggestions for a semantic model - description: Generate VQ suggestions for a semantic model - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/cortex/analyst/token: - get: - operationId: getScopedToken - summary: Internal endpoint to exchange a Cortex Analyst Oauth token - description: Internal endpoint to exchange a Cortex Analyst Oauth token - tags: - - cortex-analyst - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - TokenInfo: - type: object - properties: - token: - type: string - expiration_seconds: - type: integer - StatusUpdate: - type: object - properties: - status: - description: The latest status for processing the request - type: string - status_message: - description: A human readable description on the current request processing - status - type: string - request_id: - type: string - description: Unique request ID. - required: - - status - SemanticModelSelection: - type: object - properties: - index: - description: The index of the selected semantic model - type: integer - format: int32 - identifier: - $ref: '#/components/schemas/SemanticModelObject' - MessageContentDelta: - type: object - properties: - type: - type: string - index: - type: integer - description: The index of the content array this delta object represents - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/MessageContentDeltaTextObject' - sql: '#/components/schemas/MessageContentDeltaSqlObject' - suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' - chart: '#/components/schemas/MessageContentChartObject' - MessageContentDeltaTextObject: - allOf: - - $ref: '#/components/schemas/MessageContentDelta' - - title: Text - type: object - description: The text content that is part of a message. - properties: - text_delta: - type: string - description: The delta of the text content, clients should concatenate - all deltas for the same index - example: To answer the question "What is the profit per store?" we must - aggregate sales at the store level - required: - - text_delta - MessageContentDeltaSqlObject: - allOf: - - $ref: '#/components/schemas/MessageContentDelta' - - title: SQL - type: object - description: The SQL content that is part of a message. - properties: - statement_delta: - type: string - description: The delta of the sql statement, clients should concatenate - all deltas for the same index - example: SELECT store, SUM(profit) FROM sales GROUP BY store - confidence: - $ref: '#/components/schemas/Confidence' - required: - - statement_delta - MessageContentDeltaSuggestionsObject: - allOf: - - $ref: '#/components/schemas/MessageContentDelta' - - title: Suggested Questions - type: object - description: If SQL cannot be generated, a list of questions the semantic - model can generate SQL for. - properties: - suggestions_delta: - $ref: '#/components/schemas/SuggestionDelta' - required: - - suggestions_delta - SuggestionDelta: - type: object - properties: - index: - type: integer - description: The index of the suggestions array this delta object represents - suggestion_delta: - type: string - description: The delta of a suggestion text, clients should concatenate - all deltas for the same index - StreamingError: - type: object - properties: - message: - type: string - description: A description of the error - code: - type: string - description: The Snowflake error code categorizing the error - request_id: - type: string - description: Unique request ID - SendMessageResponse: - type: object - description: The non-streaming response object for the sendMessage - properties: - message: - $ref: '#/components/schemas/MessageObject' - request_id: - type: string - description: Unique request ID - warnings: - type: array - items: - $ref: '#/components/schemas/Warning' - semantic_model_selection: - $ref: '#/components/schemas/SemanticModelSelection' - response_metadata: - type: object - additionalProperties: true - required: - - message - Warning: - type: object - title: The warning object - description: Represents a warning within a chat. - properties: - message: - type: string - description: A human-readable message describing the warning - Warnings: - type: object - description: Represents a wrapper schema around Warning for streaming case - properties: - warnings: - type: array - items: - $ref: '#/components/schemas/Warning' - SemanticModelObject: - type: object - title: the semantic model object - description: Represents a semantic model object - properties: - semantic_model_file: - description: The path to a file stored in a Snowflake Stage holding the - semantic model yaml. Must be a fully qualified stage url - type: string - example: '@db.schema.stage/path/to/file.yaml' - semantic_view: - description: The name of the Snowflake native semantic model object - type: string - example: db.schema.semantic_view - inline_semantic_model: - description: A string containing the entire semantic model yaml - type: string - example: 'name: my_semantic_model\ntables:\n - name: orders\n...' - MessageObject: - type: object - title: The message object - description: Represents a message within a chat. - properties: - role: - description: The entity that produced the message. One of `user` or `analyst`. - type: string - enum: - - user - - analyst - content: - description: The content of the message in array of text or SQL. - type: array - items: - $ref: '#/components/schemas/MessageContent' - required: - - content - MessageContent: - type: object - properties: - type: - type: string - enum: - - text - - sql - - suggestions - - results - - chart - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/MessageContentTextObject' - sql: '#/components/schemas/MessageContentSqlObject' - suggestions: '#/components/schemas/MessageContentSuggestionsObject' - results: '#/components/schemas/MessageContentResultsObject' - chart: '#/components/schemas/MessageContentChartObject' - MessageContentTextObject: - allOf: - - $ref: '#/components/schemas/MessageContent' - - title: Text - type: object - description: The text content that is part of a message. - properties: - text: - type: string - example: To answer the question "What is the profit per store?" we must - aggregate sales at the store level - required: - - text - MessageContentSqlObject: - allOf: - - $ref: '#/components/schemas/MessageContent' - - title: SQL - type: object - description: The SQL content that is part of a message. - properties: - statement: - type: string - description: The executable SQL statement - example: SELECT store, SUM(profit) FROM sales GROUP BY store - confidence: - $ref: '#/components/schemas/Confidence' - required: - - statement - MessageContentSuggestionsObject: - allOf: - - $ref: '#/components/schemas/MessageContent' - - title: Suggested Questions - type: object - description: If SQL cannot be generated, a list of questions the semantic - model can generate SQL for. - properties: - suggestions: - type: array - items: - type: string - example: What is the lifetime revenue for the top 5 clients? - required: - - suggestions - MessageContentResultsObject: - allOf: - - $ref: '#/components/schemas/MessageContent' - - title: Results - type: object - description: Query ID of the executed query - properties: - query_id: - type: string - required: - - query_id - MessageContentChartObject: - allOf: - - $ref: '#/components/schemas/MessageContent' - - title: Chart - type: object - description: The chart specification that is part of a message. - properties: - chart_spec: - type: string - required: - - chart_spec - SendMessageRequest: - type: object - description: The request object for sendMessage requests - properties: - semantic_model_file: - type: string - description: The path to a file stored in a Snowflake Stage holding the - semantic model yaml. Must be a fully qualified stage url - example: '@db.schema.stage/path/to/file.yaml' - semantic_model: - type: string - description: A string containing the entire semantic model yaml - example: 'name: my_semantic_model\ntables:\n - name: orders\n...' - semantic_view: - type: string - description: The name of the Snowflake native semantic model object - example: db.schema.semantic_view - semantic_models: - type: array - description: A list of semantic model objects. If set, other semantic model - properties are ignored - items: - $ref: '#/components/schemas/SemanticModelObject' - stream: - type: boolean - description: Whether to stream the response or not - default: false - operation: - type: string - enum: - - sql_generation - - answer_generation - description: Whether to response with SQL or natural language. One of 'sql_generation' - or 'answer_generation' - default: sql_generation - warehouse: - type: string - description: Warehouse name to use for result set handling. Only used when - 'operation' is 'answer_generation' - messages: - type: array - items: - $ref: '#/components/schemas/MessageObject' - source: - type: string - description: an optional field to specify the source of the request. e.g - "eval", "prod" - experimental: - type: string - description: JSON serialized string of experimental API fields (undocumented). - required: - - messages - Confidence: - type: object - description: The verified query the response is based on - properties: - verified_query_used: - $ref: '#/components/schemas/VerifiedQuery' - VerifiedQuery: - type: object - description: VerifiedQuery represents a (question, sql) pair that has been manually - verified (e.g. by an analyst) to be correct. - properties: - name: - type: string - description: A name for this verified query. Mainly used for display purposes. - question: - type: string - description: The question being answered. - sql: - type: string - description: The correct SQL query for answering the question. - verified_at: - type: integer - format: int64 - description: Timestamp at which the query was last verified - measures in - seconds since epoch, in UTC. - verified_by: - type: string - description: Name of the person who verified this query. - SendFeedbackRequest: - type: object - description: The request object for sending user feedback on Cortex Analyst - responses - properties: - request_id: - type: string - description: Request id associated with the feedback - positive: - type: boolean - description: Whether the response was good (true) or bad (false) - feedback_message: - type: string - description: The text for the detailed feedback message - required: - - request_id - - positive - GenerateVerifiedQuerySuggestionsRequest: - type: object - description: The request object for getting VQ suggestions - properties: - semantic_model: - $ref: '#/components/schemas/SemanticModelObject' - warehouse: - type: string - description: Warehouse name to use for processing suggestions. - experimental: - type: string - description: JSON serialized string of experimental API fields (undocumented). - required: - - semantic_model - GenerateVerifiedQuerySuggestionsResponse: - type: object - description: The non-streaming response object for the VQ Suggestions request - properties: - request_id: - type: string - description: Unique request ID - vq_suggestions: - type: array - items: - $ref: '#/components/schemas/VerifiedQuerySuggestion' - warnings: - type: array - items: - $ref: '#/components/schemas/Warning' - VerifiedQuerySuggestion: - type: object - description: A suggestion to add or remove or replace a Verified Query to a - semantic model. - properties: - score: - type: number - description: Score of the suggestion, higher is better. - format: float - vq_to_add: - $ref: '#/components/schemas/VerifiedQuery' - vq_to_remove: - $ref: '#/components/schemas/VerifiedQuery' - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - feedback: - methods: - send_feedback: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1feedback/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/feedback/methods/send_feedback' - update: [] - delete: [] - replace: [] - id: snowflake.cortex_analyst.feedback - name: feedback - title: Feedback - messages: - methods: - send_message: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1message/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/messages/methods/send_message' - update: [] - delete: [] - replace: [] - id: snowflake.cortex_analyst.messages - name: messages - title: Messages - query_suggestions: - methods: - generate_verified_query_suggestions: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1verified-query-suggestions/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.cortex_analyst.query_suggestions - name: query_suggestions - title: Query Suggestions - tokens: - methods: - get_scoped_token: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1token/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tokens/methods/get_scoped_token' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.cortex_analyst.tokens - name: tokens - title: Tokens -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/cortex-inference.yaml b/providers/src/snowflake/v00.00.00000/services/cortex-inference.yaml deleted file mode 100644 index bba23cbe..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-inference.yaml +++ /dev/null @@ -1,1058 +0,0 @@ -openapi: 3.0.2 -info: - title: Cortex Inference API - description: OpenAPI 3.0 specification for the Cortex REST API - version: 0.1.0 - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/cortex/models: - get: - summary: Returns the LLMs available for the current session - tags: - - cortex-inference - description: Returns the LLMs available for the current session - operationId: getModels - requestBody: - required: false - content: - application/json: - schema: - $ref: '#/components/schemas/GetModelsRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetModelsResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/cortex/inference:complete: - post: - summary: Perform LLM text completion inference. - tags: - - cortex-inference - description: Perform LLM text completion inference, similar to snowflake.cortex.Complete. - operationId: cortexLLMInferenceComplete - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompleteRequest' - responses: - '200': - description: OK - content: - text/event-stream: - schema: - $ref: '#/components/schemas/StreamingCompleteResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - GetModelsRequest: - type: object - properties: - models: - type: array - items: - type: string - GetModelsResponse: - type: object - properties: - models: - type: array - items: - type: string - CompleteRequest: - type: object - description: LLM text completion request. - properties: - model: - description: The model name. See documentation for possible values. - type: string - messages: - type: array - items: - type: object - properties: - role: - type: string - description: "Indicates the role of the message, one of 'system',\ - \ 'user' or 'assistant'.\n\nRules:\n - A 'user' message must be\ - \ the last message in the list.\n - If a 'system' message is specified,\ - \ it must be the first message.\n - If a 'assistant' message is\ - \ specified, it must be immediately before a 'user' message in the\ - \ list.\n\nMultiple 'assistant' and 'user' messages can be specified,\ - \ but they must alternate in sequence.\n" - default: user - content: - type: string - description: The text completion prompt, e.g. 'What is a Large Language - Model?'. - content_list: - type: array - description: Contents of toolUse and toolResults - items: - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/TextContent' - tool_result: '#/components/schemas/ToolResults' - tool_use: '#/components/schemas/ToolUse' - required: - - content - minItems: 1 - temperature: - description: Temperature controls the amount of randomness used in response - generation. A higher temperature corresponds to more randomness. - type: number - nullable: true - minimum: 0.0 - top_p: - description: Threshold probability for nucleus sampling. A higher top-p - value increases the diversity of tokens that the model considers, while - a lower value results in more predictable output. - type: number - default: 1.0 - minimum: 0.0 - maximum: 1.0 - max_tokens: - description: The maximum number of output tokens to produce. The default - value is model-dependent. - type: integer - default: 4096 - minimum: 0 - max_output_tokens: - deprecated: true - description: Deprecated in favor of "max_tokens", which has identical behavior. - type: integer - nullable: true - response_format: - type: object - nullable: true - description: An object describing response format config for structured-output - mode. - properties: - type: - type: string - enum: - - json - description: The response format type (e.g., "json"). - schema: - type: object - description: The schema defining the structure of the response. If the - `type` is "json", the `schema` field should contain a valid JSON schema. - guardrails: - $ref: '#/components/schemas/GuardrailsConfig' - tools: - description: List of tools to be used during tool calling - type: array - items: - $ref: '#/components/schemas/Tool' - tool_choice: - $ref: '#/components/schemas/ToolChoice' - provisioned_throughput_id: - type: string - description: The provisioned throughput ID to be used with the request. - nullable: true - sf-ml-xp-inflight-prompt-action: - type: string - description: Reserved - sf-ml-xp-inflight-prompt-client-id: - type: string - description: Reserved - sf-ml-xp-inflight-prompt-public-key: - type: string - description: Reserved - stream: - type: boolean - default: true - nullable: true - description: Reserved - required: - - model - - messages - GuardrailsConfig: - type: object - title: GuardrailsConfig - description: Guardrails configuration - nullable: true - properties: - enabled: - type: boolean - description: Controls whether guardrails are enabled - response_when_unsafe: - type: string - description: The response when the guardrails model marks the completion - as unsafe - example: Response filtered by Cortex Guard - NonStreamingCompleteResponse: - type: object - description: Text-completion response for non-streaming request. - properties: - choices: - type: array - items: - type: object - properties: - message: - type: object - properties: - content: - type: string - description: The text completion response. - content_list: - type: array - description: Contents of text and toolUse response. - items: - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/TextContent' - tool_use: '#/components/schemas/ToolUse' - usage: - type: object - title: Usage - properties: - prompt_tokens: - type: integer - description: Input token count. - completion_tokens: - type: integer - description: Output token count. - guard_tokens: - type: integer - description: Tokens used by cortex guard. - total_tokens: - type: integer - description: Sum of all tokens. - StreamingCompleteResponse: - type: object - description: Server-sent events for streaming text-completion updates. - x-events: - data: - $ref: '#/components/schemas/StreamingCompleteResponseDataEvent' - StreamingCompleteResponseDataEvent: - type: object - description: Streaming text-completion response event. - properties: - choices: - type: array - items: - type: object - properties: - delta: - $ref: '#/components/schemas/StreamingCompleteResponseDelta' - StreamingCompleteResponseDelta: - type: object - required: - - type - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/StreamingTextContent' - tool_use: '#/components/schemas/StreamingToolUse' - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - TextContent: - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - required: - - type - - text - ToolResults: - type: object - properties: - type: - type: string - enum: - - tool_results - tool_results: - type: object - properties: - tool_use_id: - type: string - name: - type: string - content: - type: array - items: - type: object - required: - - type - - tool_results - ToolUse: - type: object - properties: - type: - type: string - enum: - - tool_use - tool_use: - type: object - properties: - tool_use_id: - type: string - name: - type: string - input: - type: object - required: - - type - - tool_use - StreamingTextContent: - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - required: - - type - - text - StreamingToolUse: - type: object - properties: - type: - type: string - enum: - - tool_use - tool_use: - type: object - properties: - tool_use_id: - type: string - name: - type: string - input: - type: object - required: - - type - - tool_use - Tool: - type: object - properties: - tool_spec: - type: object - properties: - type: - type: string - name: - type: string - description: - type: string - input_schema: - type: object - required: - - tool_spec - ToolChoice: - type: object - properties: - type: - type: string - enum: - - auto - - required - - tool - name: - type: array - items: - type: string - required: - - type - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - models: - methods: - get_models: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1models/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/models/methods/get_models' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.cortex_inference.models - name: models - title: Models - completions: - methods: - cortex_llm_inference_complete: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1inference:complete/post' - response: - mediaType: text/event-stream - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/completions/methods/cortex_llm_inference_complete' - update: [] - delete: [] - replace: [] - id: snowflake.cortex_inference.completions - name: completions - title: Completions -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name diff --git a/providers/src/snowflake/v00.00.00000/services/cortex-search-service.yaml b/providers/src/snowflake/v00.00.00000/services/cortex-search-service.yaml deleted file mode 100644 index c04c3478..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-search-service.yaml +++ /dev/null @@ -1,1323 +0,0 @@ -openapi: 3.0.1 -info: - title: Cortex Search REST API - description: OpenAPI 3.0 specification for the Cortex Search REST API - version: 0.1.0 - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services: - get: - operationId: listCortexSearchServices - summary: List cortex search services - description: Lists the cortex search services under the database and schema. - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/fromName' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/CortexSearchService' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - operationId: createCortexSearchService - summary: Create a cortex search service - description: Create a cortex search service, with standard create modifiers - as query parameters. See the Cortex Search Service component definition for - what is required to be provided in the request body. - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - type: object - allOf: - - $ref: '#/components/schemas/CortexSearchService' - - type: object - - required: - - name - - search_column - - target_lag - - warehouse - - definition - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}: - get: - operationId: fetchCortexSearchService - summary: Fetch a cortex search service. - description: Fetch a Cortex Search Service. - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/CortexSearchService' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - operationId: deleteCortexSearchService - summary: Delete a cortex search service - description: Delete a cortex search service with the given name. If ifExists - is used, the operation will succeed even if the object does not exist. Otherwise, - there will be a failure if the drop is unsuccessful. - tags: - - cortex search service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{service_name}:query: - post: - operationId: queryCortexSearchService - summary: Query a Cortex Search Service. - description: Query a Cortex Search Service to get search results. - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - in: path - name: service_name - required: true - schema: - type: string - description: The name of the Cortex Search Service. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/QueryResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}:suspend: - post: - operationId: suspendCortexSearchService - summary: Suspend a cortex search service. - description: Suspends one or both of the indexing or serving targets of a cortex - search service. - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/suspendResumeTarget' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}:resume: - post: - operationId: resumeCortexSearchService - description: Resume the cortex search service - summary: Resume the cortex search service - tags: - - cortex-search-service - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/suspendResumeTarget' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - parameters: - suspendResumeTarget: - name: target - description: Query parameter that identifies the target to which suspension - or resumption of the cortex search service should be applied. - in: query - schema: - type: string - enum: - - indexing - - INDEXING - - serving - - SERVING - example: indexing - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - schemas: - QueryRequest: - type: object - description: A search query and additional parameters for search. - properties: - query: - description: Unstructured text query. Exactly one of 'query' or 'multi_index_query' - must be specified. - type: string - multi_index_query: - description: A search query expressed as a collection of multiple column-level - queries. Exactly one of 'query' or 'multi_index_query' must be specified. - A column/index can be queried with multiple queries. - type: object - additionalProperties: true - columns: - description: List of columns to return. - type: array - items: - type: string - filter: - description: Filter query. - type: object - limit: - description: Max number of results to return. - type: integer - default: 10 - scoring_config: - $ref: '#/components/schemas/ScoringConfig' - experimental: - description: reserved - type: object - additionalProperties: true - required: - - columns - ScoringConfig: - type: object - description: reserved - properties: - functions: - $ref: '#/components/schemas/Functions' - reranker: - $ref: '#/components/schemas/Reranker' - weights: - $ref: '#/components/schemas/Weights' - Weights: - type: object - description: Weights to apply to each scoring component. - properties: - texts: - description: Weight to apply to all text-specific columns. - type: number - example: 0.5 - vectors: - description: Weight to apply to all vector-specific columns. - type: number - example: 0.5 - reranker: - description: Weight to apply to reranker-specific scoring component. - type: number - example: 0.5 - Functions: - type: object - description: Functions to apply for scoring this request. - properties: - numeric_boosts: - type: array - items: - $ref: '#/components/schemas/NumericBoost' - time_decays: - type: array - items: - $ref: '#/components/schemas/TimeDecay' - text_boosts: - type: array - items: - $ref: '#/components/schemas/TextBoost' - vector_boosts: - type: array - items: - $ref: '#/components/schemas/VectorBoost' - query_similarity_boosts: - type: array - items: - $ref: '#/components/schemas/QuerySimilarityBoost' - Column: - type: string - description: Column to apply this function to. - NumericBoost: - type: object - properties: - column: - $ref: '#/components/schemas/Column' - weight: - type: number - description: Weight to apply for boosting this numerical column. It will - be normalized across all scored columns specified in the scoring config - so that all weights sum to 1. If a weight is not provided, the weight - defaults to 1 pre-normalization. - example: 0.5 - required: - - column - TimeDecay: - type: object - properties: - column: - $ref: '#/components/schemas/Column' - weight: - type: number - description: Weight to apply for decaying this timestamp column. Normalized - across all scored columns in the scoring config so that all weights sum - to 1. If a weight is not provided, the weight defaults to 1 pre-normalization. - example: 0.5 - limit_hours: - type: number - description: Optional limit in hours after which the decay does not apply. - example: 24 - now: - type: string - format: date-time - description: Optional reference timestamp to calculate decay from. - example: '2022-01-01T00:00:00Z' - required: - - column - TextBoost: - type: object - properties: - column: - $ref: '#/components/schemas/Column' - weight: - description: Weight to apply for boosting this text column. - type: number - example: 0.5 - VectorBoost: - type: object - properties: - column: - $ref: '#/components/schemas/Column' - weight: - description: Weight to apply for boosting this vector column. - type: number - example: 0.5 - QuerySimilarityBoost: - type: object - properties: - cortex_search_service: - description: Fully-qualified name of a Cortex Search Service through which - to find similar previous queries. - type: string - example: MY_DB.MY_SCHEMA.MY_SEARCH_SERVICE - previous_query_column: - description: Name of a TEXT column indexed in the specified previous queries - search service that contains the previous query strings. - type: string - documents_column: - description: Name of an ARRAY column indexed in the specified previous queries - search service that contains a list of documents that matched the corresponding - previous query. Each document is represented as an OBJECT mapping all - primary key columns to their corresponding values. - type: string - Reranker: - type: string - description: Model to use for the reranker, or "none" if the reranker should - be turned off. If excluded or null, the default reranker is used. - example: none - ColumnQuery: - description: Query specification of a given column. Exactly one of 'text' or - 'vector' must be specified. - type: object - properties: - text: - description: Unstructured text query for querying a text index. - type: string - vector: - description: Query embedding vector. Must be computed using the same model - as used for embedding the column being queried. - type: array - items: - type: number - format: float - QueryResponse: - type: object - description: Search results. - properties: - results: - type: array - description: List of result rows. - items: - type: object - additionalProperties: true - description: Map of column names to bytes. - request_id: - type: string - description: ID of the request. - required: - - results - - request_id - CortexSearchService: - type: object - description: A Snowflake cortex search service object. - properties: - name: - type: string - description: Specifies the name for the cortex search service, must be unique - for the schema in which the cortex search service is created - search_column: - type: string - description: Specifies the name of the search column for the cortex search - service. - columns: - type: array - items: - type: string - description: Specifies all columns included in the cortex search service - and that can be returned in search queries. - attribute_columns: - type: array - items: - type: string - description: Specifies the attribute columns, which can be referenced in - filters in search queries to the cortex search service. - target_lag: - $ref: '#/components/schemas/TargetLag' - description: Specifies the schedule for periodically refreshing the cortex - search service. - warehouse: - type: string - description: Specifies the name of the warehouse that provides the compute - resources for refreshing the cortex search service - example: test_wh - definition: - type: string - description: Specifies the definition (source query) used to create the - cortex search service - example: SELECT col1, col2 FROM foo - comment: - type: string - description: Specifies a comment for the cortex search service - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the cortex search service was created. - database_name: - type: string - readOnly: true - description: Database in which the cortex search service is stored - schema_name: - type: string - readOnly: true - description: Schema in which the cortex search service is stored - source_data_num_rows: - type: integer - format: int64 - readOnly: true - description: Number of rows in the materialized source data feeding into - the cortex search service. - data_timestamp: - type: string - format: date-time - readOnly: true - description: Date and time as of which data existent in base tables is now - serving. - indexing_state: - $ref: '#/components/schemas/SchedulingState' - description: Current state of the indexing pipeline for the cortex search - service; one of 'SUSPENDED' or 'ACTIVE'. - serving_state: - $ref: '#/components/schemas/SchedulingState' - description: Whether the cortex search service is currently actively serving; - one of 'SUSPENDED' or 'ACTIVE'. - indexing_error: - type: string - readOnly: true - description: Error encountered during the latest indexing pipeline of the - cortex search service, if any. - serving_data_bytes: - type: integer - format: int64 - readOnly: true - description: Size of the serving index, in bytes. - SchedulingState: - type: string - enum: - - ACTIVE - - SUSPENDED - - INITIALIZING - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - search_services: - methods: - list_cortex_search_services: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - query_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{service_name}:query/post' - response: - mediaType: application/json - openAPIDocKey: '200' - suspend_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/search_services/methods/list_cortex_search_services' - - $ref: '#/components/x-stackQL-resources/search_services/methods/fetch_cortex_search_service' - insert: - - $ref: '#/components/x-stackQL-resources/search_services/methods/create_cortex_search_service' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/search_services/methods/delete_cortex_search_service' - replace: [] - id: snowflake.cortex_search_service.search_services - name: search_services - title: Search Services -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name diff --git a/providers/src/snowflake/v00.00.00000/services/cortex.yaml b/providers/src/snowflake/v00.00.00000/services/cortex.yaml new file mode 100644 index 00000000..92272f61 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/cortex.yaml @@ -0,0 +1,3998 @@ +openapi: 3.0.2 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Cortex API + description: 'The Snowflake REST API surface for the cortex service, combining the vendor spec(s): cortex-analyst.yaml, cortex-generic-anthropic.yaml, cortex-generic-openai.yaml, cortex-inference.yaml, cortex-search-service.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/cortex/analyst/feedback: + post: + operationId: sendFeedback + tags: + - cortex-analyst + description: Send a user feedback of Cortex Analyst response + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SendFeedbackRequest' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/message: + post: + operationId: sendMessage + tags: + - cortex-analyst + summary: Send a data question to the Cortex Analyst + description: Send a data question to the Cortex Analyst + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SendMessageRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SendMessageResponse' + text/event-stream: + schema: + type: string + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/verified-query-suggestions: + post: + operationId: generateVerifiedQuerySuggestions + tags: + - cortex-analyst + summary: Generate VQ suggestions for a semantic model + description: Generate VQ suggestions for a semantic model + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/fast-generation: + post: + operationId: fastGeneration + tags: + - cortex-analyst + summary: Rapidly generate a semantic model given source material + description: Provides real-time suggestions for improving a given semantic model via a streaming response. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FastGenerationRequest' + responses: + '200': + description: OK. Streaming suggestions. + content: + text/event-stream: + schema: + type: string + description: | + Server-Sent Events stream. Each event's data payload will be a JSON representation of a `FastGenerationResponse` object. + Events include: + - `response`: Contains a `FastGenerationResponse` payload. + - `error`: Contains a `StreamingError` payload if an error occurs during streaming. + - `done`: Contains the string payload "done" + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/pre-selection: + post: + operationId: preSelection + tags: + - cortex-analyst + summary: Retrieve relevant table information from input data for semantic model generation + description: Retrieve relevant table information from input data for semantic model generation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PreSelectionRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PreSelectionResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/filters-and-metrics-suggestions: + post: + operationId: generateFiltersAndMetricsSuggestions + tags: + - cortex-analyst + summary: Generate filters, facts, and metrics suggestions for a semantic model + description: Generate suggestions for filters, facts, and metrics on a semantic view/model. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateFiltersAndMetricsSuggestionsRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateFiltersAndMetricsSuggestionsResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/agentic-optimizations: + post: + operationId: listAgenticOptimizations + tags: + - cortex-analyst + summary: List all agentic optimization runs for a given base model + description: List all agentic optimization runs for a given base model + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ListAgenticOptimizationsRequest' + responses: + '200': + description: OK. Retrieved optimizations. + content: + application/json: + schema: + $ref: '#/components/schemas/ListAgenticOptimizationsResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/agentic-optimization: + get: + operationId: getAgenticOptimization + tags: + - cortex-analyst + summary: Get the status and state of a specified agentic optimization run + description: Get the status and state of a specified agentic optimization run + parameters: + - name: optimization_name + in: query + description: The fully-qualified name of the optimization to retrieve. + required: true + schema: + type: string + responses: + '200': + description: OK. Retrieved optimization. + content: + application/json: + schema: + $ref: '#/components/schemas/GetAgenticOptimizationResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/analyst/token: + get: + operationId: getScopedToken + summary: Internal endpoint to exchange a Cortex Analyst Oauth token + description: Internal endpoint to exchange a Cortex Analyst Oauth token + tags: + - cortex-analyst + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/v1/messages: + post: + summary: Perform LLM text completion inference using Cortex Messages API format. + tags: + - cortex-generic-anthropic + description: Perform LLM text completion inference using Cortex Messages API format. + operationId: cortexGenericAnthropicMessages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CortexAnthropicMessagesRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CortexAnthropicMessagesResponse' + text/event-stream: + schema: + type: object + additionalProperties: true + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/v1/chat/completions: + post: + summary: Perform LLM text completion inference using Cortex Chat Completions API format. + tags: + - cortex-generic-openai + description: Perform LLM text completion inference using Chat Completions API format. + operationId: cortexGenericOpenAIChatCompletions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CortexOpenAIChatCompletionsRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CortexOpenAIChatCompletionsResponse' + text/event-stream: + schema: + type: object + additionalProperties: true + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/models: + get: + summary: Returns the LLMs available for the current session + tags: + - cortex-inference + description: Returns the LLMs available for the current session + operationId: getModels + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/GetModelsRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetModelsResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/cortex/inference:complete: + post: + summary: Perform LLM text completion inference. + tags: + - cortex-inference + description: Perform LLM text completion inference, similar to snowflake.cortex.Complete. + operationId: cortexLLMInferenceComplete + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompleteRequest' + responses: + '200': + description: OK + content: + text/event-stream: + schema: + $ref: '#/components/schemas/StreamingCompleteResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services: + get: + operationId: listCortexSearchServices + summary: List cortex search services + description: Lists the cortex search services under the database and schema. + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/fromName' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListCortexSearchServicesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + operationId: createCortexSearchService + summary: Create a cortex search service + description: Create a cortex search service, with standard create modifiers as query parameters. See the Cortex Search Service component definition for what is required to be provided in the request body. + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + type: object + description: A Snowflake cortex search service object. + properties: + name: + type: string + description: Specifies the name for the cortex search service, must be unique for the schema in which the cortex search service is created + search_column: + type: string + description: Specifies the name of the search column for the cortex search service. + columns: + type: array + items: + type: string + description: Specifies all columns included in the cortex search service and that can be returned in search queries. + attribute_columns: + type: array + items: + type: string + description: Specifies the attribute columns, which can be referenced in filters in search queries to the cortex search service. + target_lag: + $ref: '#/components/schemas/TargetLag' + description: Specifies the schedule for periodically refreshing the cortex search service. + warehouse: + type: string + description: Specifies the name of the warehouse that provides the compute resources for refreshing the cortex search service + example: test_wh + definition: + type: string + description: Specifies the definition (source query) used to create the cortex search service + example: SELECT col1, col2 FROM foo + comment: + type: string + description: Specifies a comment for the cortex search service + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the cortex search service was created. + database_name: + type: string + readOnly: true + description: Database in which the cortex search service is stored + schema_name: + type: string + readOnly: true + description: Schema in which the cortex search service is stored + source_data_num_rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the materialized source data feeding into the cortex search service. + data_timestamp: + type: string + format: date-time + readOnly: true + description: Date and time as of which data existent in base tables is now serving. + indexing_state: + $ref: '#/components/schemas/SchedulingState' + description: Current state of the indexing pipeline for the cortex search service; one of 'SUSPENDED' or 'ACTIVE'. + serving_state: + $ref: '#/components/schemas/SchedulingState' + description: Whether the cortex search service is currently actively serving; one of 'SUSPENDED' or 'ACTIVE'. + indexing_error: + type: string + readOnly: true + description: Error encountered during the latest indexing pipeline of the cortex search service, if any. + serving_data_bytes: + type: integer + format: int64 + readOnly: true + description: Size of the serving index, in bytes. + required: + - name + - search_column + - target_lag + - warehouse + - definition + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}: + get: + operationId: fetchCortexSearchService + summary: Fetch a cortex search service. + description: Fetch a Cortex Search Service. + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/CortexSearchService' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + operationId: deleteCortexSearchService + summary: Delete a cortex search service + description: Delete a cortex search service with the given name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. + tags: + - cortex search service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{service_name}:query: + post: + operationId: queryCortexSearchService + summary: Query a Cortex Search Service. + description: Query a Cortex Search Service to get search results. + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - in: path + name: service_name + required: true + schema: + type: string + description: The name of the Cortex Search Service. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{service_name}:suggest: + post: + operationId: suggestCortexSearchService + summary: Suggest from a Cortex Search Service + description: Suggest from a Cortex Search Service to get auto-complete or contextual suggestions + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - in: path + name: service_name + required: true + schema: + type: string + description: The name of the Cortex Search Service + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestQueryRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestQueryResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}:suspend: + post: + operationId: suspendCortexSearchService + summary: Suspend a cortex search service. + description: Suspends one or both of the indexing or serving targets of a cortex search service. + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/suspendResumeTarget' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}:resume: + post: + operationId: resumeCortexSearchService + description: Resume the cortex search service + summary: Resume the cortex search service + tags: + - cortex-search-service + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/suspendResumeTarget' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/cortex-search-services/{name}:feedback: + summary: Create a feedback event for a Cortex Search query result. + description: | + Create a feedback event for a Cortex Search result. + post: + operationId: sendCortexSearchServiceFeedback + tags: + - cortex-search-service + description: Send user feedback for a Cortex Search result + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SendFeedbackRequest_cortex_search_service' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + TokenInfo: + type: object + properties: + token: + type: string + expiration_seconds: + type: integer + StatusUpdate: + type: object + properties: + status: + description: The latest status for processing the request + type: string + status_message: + description: A human readable description on the current request processing status + type: string + request_id: + type: string + description: Unique request ID. + required: + - status + MessageContentDelta: + type: object + properties: + type: + type: string + index: + type: integer + description: The index of the content array this delta object represents + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentDeltaTextObject' + think: '#/components/schemas/MessageContentDeltaThinkObject' + sql: '#/components/schemas/MessageContentDeltaSqlObject' + suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' + chart: '#/components/schemas/MessageContentChartObject' + MessageContentDeltaTextObject: + type: object + properties: + type: + type: string + index: + type: integer + description: The index of the content array this delta object represents + text_delta: + type: string + description: The delta of the text content, clients should concatenate all deltas for the same index + example: To answer the question "What is the profit per store?" we must aggregate sales at the store level + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentDeltaTextObject' + think: '#/components/schemas/MessageContentDeltaThinkObject' + sql: '#/components/schemas/MessageContentDeltaSqlObject' + suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Text + description: The text content that is part of a message. + required: + - text_delta + MessageContentDeltaThinkObject: + type: object + properties: + type: + type: string + index: + type: integer + description: The index of the content array this delta object represents + think_delta: + type: string + description: The delta of the think content, clients should concatenate all deltas for the same index + example: To answer the question "What is the profit per store?" we must aggregate sales at the store level + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentDeltaTextObject' + think: '#/components/schemas/MessageContentDeltaThinkObject' + sql: '#/components/schemas/MessageContentDeltaSqlObject' + suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Think + description: The think content that is part of a message. + required: + - think_delta + MessageContentDeltaSqlObject: + type: object + properties: + type: + type: string + index: + type: integer + description: The index of the content array this delta object represents + statement_delta: + type: string + description: The delta of the sql statement, clients should concatenate all deltas for the same index + example: SELECT store, SUM(profit) FROM sales GROUP BY store + confidence: + $ref: '#/components/schemas/Confidence' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentDeltaTextObject' + think: '#/components/schemas/MessageContentDeltaThinkObject' + sql: '#/components/schemas/MessageContentDeltaSqlObject' + suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: SQL + description: The SQL content that is part of a message. + required: + - statement_delta + MessageContentDeltaSuggestionsObject: + type: object + properties: + type: + type: string + index: + type: integer + description: The index of the content array this delta object represents + suggestions_delta: + $ref: '#/components/schemas/SuggestionDelta' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentDeltaTextObject' + think: '#/components/schemas/MessageContentDeltaThinkObject' + sql: '#/components/schemas/MessageContentDeltaSqlObject' + suggestions: '#/components/schemas/MessageContentDeltaSuggestionsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Suggested Questions + description: If SQL cannot be generated, a list of questions the semantic model can generate SQL for. + required: + - suggestions_delta + SuggestionDelta: + type: object + properties: + index: + type: integer + description: The index of the suggestions array this delta object represents + suggestion_delta: + type: string + description: The delta of a suggestion text, clients should concatenate all deltas for the same index + StreamingError: + type: object + properties: + message: + type: string + description: A description of the error + code: + type: string + description: The Snowflake error code categorizing the error + request_id: + type: string + description: Unique request ID + Warnings: + type: object + description: Represents a wrapper schema around Warning for streaming case + properties: + warnings: + type: array + items: + $ref: '#/components/schemas/Warning' + SendFeedbackRequest: + type: object + description: The request object for sending user feedback on Cortex Analyst responses + properties: + request_id: + type: string + description: Request id associated with the feedback + positive: + type: boolean + description: Whether the response was good (true) or bad (false) + feedback_message: + type: string + description: The text for the detailed feedback message + required: + - request_id + - positive + GenerateVerifiedQuerySuggestionsRequest: + type: object + description: The request object for getting VQ suggestions + properties: + mode: + type: string + enum: + - ca_requests_based + - query_history_based + description: Whether to generate suggestions based on historical CA requests or all SQL queries. One of 'ca_requests_based' or 'query_history_based' + default: ca_requests_based + semantic_model: + $ref: '#/components/schemas/SemanticModelObject' + tables: + type: array + items: + $ref: '#/components/schemas/TableColumns' + tds_source: + type: array + items: + $ref: '#/components/schemas/TdsInput' + sql_source: + $ref: '#/components/schemas/SqlInputs' + warehouse: + type: string + description: Warehouse name to use for processing suggestions. + offset: + description: The suggestions offset index, offset = 0 indicates the first call + type: integer + format: int32 + limit: + description: The number of suggestions to return starting from the provided offset value + type: integer + format: int32 + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + required: + - warehouse + GenerateVerifiedQuerySuggestionsResponse: + type: object + description: The non-streaming response object for the VQ Suggestions request + properties: + request_id: + type: string + description: Unique request ID + vq_suggestions: + type: array + items: + $ref: '#/components/schemas/VerifiedQuerySuggestion' + warnings: + type: array + items: + $ref: '#/components/schemas/Warning' + VerifiedQuerySuggestion: + type: object + description: A suggestion to add or remove or replace a Verified Query to a semantic model. + properties: + score: + type: number + description: Score of the suggestion, higher is better. + format: float + vq_to_add: + $ref: '#/components/schemas/VerifiedQuery' + vq_to_remove: + $ref: '#/components/schemas/VerifiedQuery' + FastGenerationRequest: + type: object + description: The request for the FastGeneration rpc + properties: + json_proto: + type: object + description: A JSON-mapped FastGenerationRequest protobuf + additionalProperties: true + FastGenerationResponse: + type: object + description: The response for the FastGeneration rpc (streamed) + properties: + json_proto: + type: object + description: A JSON-mapped FastGenerationResponse protobuf + additionalProperties: true + PreSelectionRequest: + type: object + description: The request for the PreSelection rpc + properties: + tds_source: + type: array + items: + $ref: '#/components/schemas/TdsInput' + sql_source: + $ref: '#/components/schemas/SqlInputs' + warehouse: + type: string + description: Warehouse name to use for processing. + tableau_input: + $ref: '#/components/schemas/TableauInput' + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + required: + - tds_source + - warehouse + PreSelectionResponse: + type: object + description: The response for the PreSelection rpc + properties: + request_id: + type: string + description: Unique request ID + tables: + type: array + items: + $ref: '#/components/schemas/TableColumns' + warnings: + type: array + items: + $ref: '#/components/schemas/Warning' + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + TdsInput: + type: object + description: Tableau data source file stage paths + properties: + tds_stage_path: + type: string + description: TDS file stage path + tds_file_content: + type: string + description: TDS file raw contents + required: + - tds_stage_path + TableColumns: + type: object + description: Contains information about table and column names + properties: + database: + type: string + description: Database name + schema: + type: string + description: Schema name + table: + type: string + description: Table name + column_names: + type: array + items: + type: string + description: Column names + required: + - database + - schema + - table + - column_names + AnnotatedSqlQuery: + type: object + description: Contains a SQL query with optional context and natural language annotation + properties: + sql_text: + type: string + description: SQL query text + database: + type: string + description: Database associated with the SQL query + schema: + type: string + description: Schema associated with the SQL query + corresponding_question: + type: string + description: Natural language question that the SQL query answers + additional_context: + type: string + description: Free-form string for additional context about the query + required: + - sql_text + SqlInputs: + type: object + description: Contains SQL queries which may be annotated with natural language + properties: + queries: + type: array + items: + $ref: '#/components/schemas/AnnotatedSqlQuery' + required: + - queries + CreateAgenticOptimizationRequest: + type: object + description: A request to start an agentic optimization run for a semantic model. Note that only semantic views and semantic model files are supported. Inline semantic models will lead to a 400 response. + properties: + semantic_model: + $ref: '#/components/schemas/SemanticModelObject' + warehouse: + type: string + description: Warehouse name to use for processing suggestions. + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + required: + - semantic_model + CreateAgenticOptimizationResponse: + type: object + description: The result of starting an agentic optimization run for a semantic model. + properties: + request_id: + type: string + description: Unique request ID + example: abcd1234-5678-90ab-cdef-1234567890ab + optimization_name: + type: string + description: The fully-qualified name of the created optimization run. + example: some_db.some_schema."Some_Optimziation_Name_1234567890" + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + GetAgenticOptimizationResponse: + type: object + description: The status, state, and outcome of a specified agentic optimization run. + properties: + request_id: + type: string + description: Unique request ID + example: abcd1234-5678-90ab-cdef-1234567890ab + status: + $ref: '#/components/schemas/AgenticOptimizationStatus' + state: + type: string + description: An opaque string containing the state of the optimization. + example: '{"progress": 0.5, "details": "Halfway through the optimization"}' + outcome: + type: string + description: An opaque string containing the outcome of the optimization, separate from the state. This should be the JSON-encoded form of an AgenticOptimizationOutcome protobuf message. + example: '{"extensions": ""}' + ListAgenticOptimizationsRequest: + type: object + description: A request to list all agentic optimization runs for a given base model. Note that only semantic views and semantic model files are supported. Inline semantic models will lead to a 400 response. + properties: + semantic_model: + $ref: '#/components/schemas/SemanticModelObject' + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + required: + - semantic_model + ListAgenticOptimizationsResponse: + type: object + description: The response from listing agentic optimization runs. + properties: + request_id: + type: string + description: Unique request ID + example: abcd1234-5678-90ab-cdef-1234567890ab + optimizations: + type: array + items: + $ref: '#/components/schemas/AgenticOptimizationSummary' + AgenticOptimizationSummary: + type: object + description: A summary of an agentic optimization run. + properties: + optimization_name: + type: string + description: The fully-qualified name of the optimization. + status: + $ref: '#/components/schemas/AgenticOptimizationStatus' + AgenticOptimizationStatus: + type: string + description: The status of an agentic optimization run. + enum: + - IN_PROGRESS + - COMPLETED + - FAILED + - CANCELED + TableauInput: + type: object + description: Input required to extract data from Tableau. Tableau Cloud users can optionally provide integration data if files are not already uploaded + properties: + stage_files: + $ref: '#/components/schemas/TableauStageFiles' + server_files: + $ref: '#/components/schemas/TableauServerFiles' + TableauStageFiles: + type: object + description: Specifies stage paths of the Tableau files + properties: + stage_paths: + type: array + items: + type: string + description: The stage paths of where the Tableau file is stored + TableauServerFiles: + type: object + description: Contains Tableau URLs to retrieve files from Tableau server and information around Tableau integration + properties: + tableau_urls: + type: array + items: + type: string + description: The URLs in Tableau to retrieve files from + integration: + $ref: '#/components/schemas/TableauIntegration' + TableauIntegration: + type: object + description: Contains data on how to connect to Tableau and process data + properties: + auth: + $ref: '#/components/schemas/TableauAuth' + staging_data: + $ref: '#/components/schemas/StagingData' + required: + - auth + - staging_data + GenerateFiltersAndMetricsSuggestionsRequest: + type: object + description: The request object for generating filters, facts, and metrics suggestions + properties: + semantic_model: + $ref: '#/components/schemas/SemanticModelObject' + tables: + type: array + description: Tables and selected columns to build a basic semantic model from + items: + $ref: '#/components/schemas/TableColumns' + warehouse: + type: string + description: Warehouse name to use for processing suggestions. + metrics_offset: + type: integer + format: int32 + description: Pagination offset for metrics suggestions + metrics_limit: + type: integer + format: int32 + description: Pagination limit for metrics suggestions + facts_offset: + type: integer + format: int32 + description: Pagination offset for facts suggestions + facts_limit: + type: integer + format: int32 + description: Pagination limit for facts suggestions + filters_offset: + type: integer + format: int32 + description: Pagination offset for filters suggestions + filters_limit: + type: integer + format: int32 + description: Pagination limit for filters suggestions + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + GenerateFiltersAndMetricsSuggestionsResponse: + type: object + description: The response object for filters, facts, and metrics suggestions + properties: + request_id: + type: string + description: Unique request ID + suggestions: + type: array + items: + $ref: '#/components/schemas/SemanticModelUpdateSuggestion' + warnings: + type: array + items: + $ref: '#/components/schemas/Warning' + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + SemanticModelUpdateSuggestion: + type: object + description: A suggestion consisting of ordered semantic object changes with optional setup SQL and score. + properties: + changes: + type: array + description: Changes to be applied in order + items: + $ref: '#/components/schemas/SemanticModelChange' + version: + type: integer + format: int32 + description: Version of SemanticModelUpdateSuggestion + SemanticModelChange: + type: object + description: A single change to apply to the semantic object + properties: + operation: + $ref: '#/components/schemas/SemanticModelChangeOperation' + path: + type: string + description: Path to the node in the semantic object to change + value: + $ref: '#/components/schemas/SemanticModelChangeValue' + required: + - operation + - path + SemanticModelChangeOperation: + type: string + description: Operation applied to a semantic object at a given path + enum: + - set + - append + - remove + SemanticModelChangeValue: + type: object + description: One-of value. A map with exactly one key set corresponding to the semantic model object or primitive. + additionalProperties: true + TableauAuth: + type: object + description: Authentication required to connect to Tableau + properties: + secret_fqn: + type: string + description: The fully qualified name of the secret containing the Tableau PAT + server_url: + type: string + description: The Tableau server name to send requests to + required: + - secret_fqn + - server_url + StagingData: + type: object + description: Contains information indicating where to stage data + properties: + database: + type: string + description: Database name + schema: + type: string + description: Schema name + required: + - database + - schema + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + SemanticModelObject: + type: object + title: the semantic model object + description: Represents a semantic model object + properties: + semantic_model_file: + description: The path to a file stored in a Snowflake Stage holding the semantic model yaml. Must be a fully qualified stage url + type: string + example: '@db.schema.stage/path/to/file.yaml' + semantic_view: + description: The name of the Snowflake native semantic model object + type: string + example: db.schema.semantic_view + inline_semantic_model: + description: A string containing the entire semantic model yaml + type: string + example: 'name: my_semantic_model\ntables:\n - name: orders\n...' + MessageObject: + type: object + title: The message object + description: Represents a message within a chat. + properties: + role: + description: The entity that produced the message. One of `user` or `analyst`. + type: string + enum: + - user + - analyst + content: + description: The content of the message in array of text or SQL. + type: array + items: + $ref: '#/components/schemas/MessageContent' + required: + - content + MessageContent: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + MessageContentTextObject: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + text: + type: string + example: To answer the question "What is the profit per store?" we must aggregate sales at the store level + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Text + description: The text content that is part of a message. + required: + - text + MessageContentSqlObject: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + statement: + type: string + description: The executable SQL statement + example: SELECT store, SUM(profit) FROM sales GROUP BY store + confidence: + $ref: '#/components/schemas/Confidence' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: SQL + description: The SQL content that is part of a message. + required: + - statement + MessageContentSuggestionsObject: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + suggestions: + type: array + items: + type: string + example: What is the lifetime revenue for the top 5 clients? + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Suggested Questions + description: If SQL cannot be generated, a list of questions the semantic model can generate SQL for. + required: + - suggestions + MessageContentResultsObject: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + query_id: + type: string + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Results + description: Query ID of the executed query + required: + - query_id + MessageContentChartObject: + type: object + properties: + type: + type: string + enum: + - text + - sql + - suggestions + - results + - chart + chart_spec: + type: string + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/MessageContentTextObject' + sql: '#/components/schemas/MessageContentSqlObject' + suggestions: '#/components/schemas/MessageContentSuggestionsObject' + results: '#/components/schemas/MessageContentResultsObject' + chart: '#/components/schemas/MessageContentChartObject' + title: Chart + description: The chart specification that is part of a message. + required: + - chart_spec + SendMessageRequest: + type: object + description: The request object for sendMessage requests + properties: + semantic_model_file: + type: string + description: The path to a file stored in a Snowflake Stage holding the semantic model yaml. Must be a fully qualified stage url + example: '@db.schema.stage/path/to/file.yaml' + semantic_model: + type: string + description: A string containing the entire semantic model yaml + example: 'name: my_semantic_model\ntables:\n - name: orders\n...' + semantic_view: + type: string + description: The name of the Snowflake native semantic model object + example: db.schema.semantic_view + semantic_models: + type: array + description: A list of semantic model objects. If set, other semantic model properties are ignored + items: + $ref: '#/components/schemas/SemanticModelObject' + stream: + type: boolean + description: Whether to stream the response or not + default: false + operation: + type: string + enum: + - sql_generation + - answer_generation + description: Whether to response with SQL or natural language. One of 'sql_generation' or 'answer_generation' + default: sql_generation + warehouse: + type: string + description: Warehouse name to use for result set handling. Only used when 'operation' is 'answer_generation' + messages: + type: array + items: + $ref: '#/components/schemas/MessageObject' + source: + type: string + description: an optional field to specify the source of the request. e.g "eval", "prod" + experimental: + type: string + description: JSON serialized string of experimental API fields (undocumented). + required: + - messages + Confidence: + type: object + description: The verified query the response is based on + properties: + verified_query_used: + $ref: '#/components/schemas/VerifiedQuery' + VerifiedQuery: + type: object + description: VerifiedQuery represents a (question, sql) pair that has been manually verified (e.g. by an analyst) to be correct. + properties: + name: + type: string + description: A name for this verified query. Mainly used for display purposes. + question: + type: string + description: The question being answered. + sql: + type: string + description: The correct SQL query for answering the question. + verified_at: + type: integer + format: int64 + description: Timestamp at which the query was last verified - measures in seconds since epoch, in UTC. + verified_by: + type: string + description: Name of the person who verified this query. + SemanticModelSelection: + type: object + properties: + index: + description: The index of the selected semantic model + type: integer + format: int32 + identifier: + $ref: '#/components/schemas/SemanticModelObject' + SendMessageResponse: + type: object + description: The non-streaming response object for the sendMessage + properties: + message: + $ref: '#/components/schemas/MessageObject' + request_id: + type: string + description: Unique request ID + warnings: + type: array + items: + $ref: '#/components/schemas/Warning' + semantic_model_selection: + $ref: '#/components/schemas/SemanticModelSelection' + response_metadata: + type: object + additionalProperties: true + required: + - message + Warning: + type: object + title: The warning object + description: Represents a warning within a chat. + properties: + message: + type: string + description: A human-readable message describing the warning + GetModelsRequest: + type: object + properties: + models: + type: array + items: + type: string + GetModelsResponse: + type: object + properties: + models: + type: array + items: + type: string + CompleteRequest: + type: object + description: LLM text completion request. + properties: + model: + description: The model name. See documentation for possible values. + type: string + anthropic: + type: object + description: Anthropic specific configuration. + nullable: true + properties: + thinking: + type: object + description: Thinking configuration. + nullable: true + properties: + budget_tokens: + type: integer + description: The budget for thinking tokens. + example: 2048 + required: + - budget_tokens + openai: + type: object + description: OpenAI specific configuration. + nullable: true + properties: + reasoning: + type: object + description: Reasoning configuration. + nullable: true + properties: + effort: + type: string + description: The effort level for reasoning. + enum: + - low + - medium + - high + messages: + type: array + items: + type: object + properties: + role: + type: string + description: | + Indicates the role of the message, one of 'system', 'user' or 'assistant'. + + Rules: + - A 'user' message must be the last message in the list. + - If a 'system' message is specified, it must be the first message. + - If a 'assistant' message is specified, it must be immediately before a 'user' message in the list. + + Multiple 'assistant' and 'user' messages can be specified, but they must alternate in sequence. + default: user + content: + type: string + description: The text completion prompt, e.g. 'What is a Large Language Model?'. + content_list: + type: array + description: Contents of text, toolUse, toolResults, or model-specific output + items: + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextContent' + tool_result: '#/components/schemas/ToolResults' + tool_use: '#/components/schemas/ToolUse' + image: '#/components/schemas/Image' + anthropic: '#/components/schemas/AnthropicOutput' + openai: '#/components/schemas/OpenAIOutput' + minItems: 1 + temperature: + description: Temperature controls the amount of randomness used in response generation. A higher temperature corresponds to more randomness. + type: number + nullable: true + minimum: 0 + top_p: + description: Threshold probability for nucleus sampling. A higher top-p value increases the diversity of tokens that the model considers, while a lower value results in more predictable output. + type: number + default: 1 + minimum: 0 + maximum: 1 + max_tokens: + description: The maximum number of output tokens to produce. The default value is model-dependent. + type: integer + default: 4096 + minimum: 0 + max_output_tokens: + deprecated: true + description: Deprecated in favor of "max_tokens", which has identical behavior. + type: integer + nullable: true + response_format: + type: object + nullable: true + description: An object describing response format config for structured-output mode. + properties: + type: + type: string + enum: + - json + description: The response format type (e.g., "json"). + schema: + type: string + description: The schema defining the structure of the response. If the `type` is "json", the `schema` field should contain a valid JSON schema. (opaque JSON object) + guardrails: + $ref: '#/components/schemas/GuardrailsConfig' + tools: + description: List of tools to be used during tool calling + type: array + items: + $ref: '#/components/schemas/Tool' + tool_choice: + $ref: '#/components/schemas/ToolChoice' + provisioned_throughput_id: + type: string + description: The provisioned throughput ID to be used with the request. + nullable: true + sf-ml-xp-inflight-prompt-action: + type: string + description: Reserved + sf-ml-xp-inflight-prompt-client-id: + type: string + description: Reserved + sf-ml-xp-inflight-prompt-public-key: + type: string + description: Reserved + stream: + type: boolean + default: true + nullable: true + description: Reserved + required: + - model + - messages + GuardrailsConfig: + type: object + title: GuardrailsConfig + description: Guardrails configuration + nullable: true + properties: + enabled: + type: boolean + description: Controls whether guardrails are enabled + response_when_unsafe: + type: string + description: The response when the guardrails model marks the completion as unsafe + example: Response filtered by Cortex Guard + Image: + type: object + description: reserved + properties: + type: + type: string + enum: + - image + details: + $ref: '#/components/schemas/ImageDetails' + cache_control: + $ref: '#/components/schemas/CacheControl' + ImageDetails: + type: object + description: reserved + properties: + type: + type: string + description: Whether the image content is base64. + enum: + - base64 + content: + type: string + description: base64 encoded image. + content_type: + type: string + description: Type of image. + enum: + - image/jpeg + - image/jpg + - image/png + - image/gif + - image/webp + - image/heic + - image/heif + detail: + type: string + description: Level of detail to process the image. Only applicable for OpenAI models + enum: + - auto + - low + - high + CacheControl: + description: reserved + type: object + nullable: true + properties: + type: + type: string + description: | + Identifies the type of cache control. + “ephemeral” is the only supported cache type currently, which has a 5-minute lifetime. + enum: + - ephemeral + ToolChoice: + type: object + nullable: true + description: | + Configures how tools should be selected and used during the interaction. + Controls whether tool use is automatic, required, or specific tools should be used. + required: + - type + properties: + type: + type: string + description: | + Determines how tools are selected: + * auto - Automatic tool selection (default) + * required - Must use at least one tool + * tool - Use specific named tools + example: required + name: + type: array + description: List of specific tool names to use when type is 'tool' + example: + - Analyst1 + - Search1 + items: + type: string + TextContent: + type: object + description: | + Represents plain text content in a message. + Used for simple text exchanges and natural language responses. + required: + - type + - text + properties: + type: + type: string + description: Identifies this as text content. + enum: + - text + text: + type: string + description: The actual text content of the message. + example: Based on the analysis, our top three customers by revenue are Acme Corp ($1.2M), TechGiant ($980K), and MegaCorp ($875K). + cache_control: + $ref: '#/components/schemas/CacheControl' + StreamingTextContent: + type: object + description: | + Represents plain text content in a message. + Used for simple text exchanges and natural language responses. + properties: + type: + type: string + description: Identifies this as text content. + enum: + - text + content: + type: string + description: The actual text content of the message. + example: Based on the analysis, our top three customers by revenue are Acme Corp ($1.2M), TechGiant ($980K), and MegaCorp ($875K). + JSONContent: + type: object + description: Represents structured JSON data in a message + required: + - type + - json + properties: + type: + type: string + description: Identifies this as JSON content + enum: + - json + json: + type: object + description: Arbitrary JSON data structure + example: + key: value + numbers: + - 1 + - 2 + - 3 + additionalProperties: true + ToolResults: + type: object + description: | + Represents the results of a tool execution. Contains both the input parameters + and output results from the tool execution. + required: + - type + - tool_results + properties: + type: + type: string + description: Identifies this as tool results content + enum: + - tool_results + tool_results: + type: object + description: Container for tool execution results and metadata + required: + - tool_use_id + - name + - content + properties: + tool_use_id: + type: string + description: Unique identifier linking this result to its corresponding tool use request + example: tool_123456 + name: + type: string + description: Name of the tool that was executed. Must match a tool name from the tools array + example: Analyst1 + content: + type: array + description: Array of content elements produced by the tool execution + example: + - type: json + json: + sql_query: SELECT * FROM sales LIMIT 10 + - type: text + text: Query generated successfully + items: + discriminator: + propertyName: type + mapping: + json: '#/components/schemas/JSONContent' + text: '#/components/schemas/TextContent' + status: + type: string + description: status indicators for the tool execution + example: success + result: + type: object + description: Additional result data in an arbitrary structure + example: + query_id: abc123 + row_count: 150 + additionalProperties: true + cache_control: + $ref: '#/components/schemas/CacheControl' + ToolUse: + type: object + description: | + Represents a request to use a specific tool. Contains the tool identifier + and input parameters for the execution. + required: + - type + - tool_use + properties: + type: + type: string + description: Identifies this as a tool use request + enum: + - tool_use + tool_use: + type: object + description: Container for tool use request details + required: + - tool_use_id + - name + - input + properties: + tool_use_id: + type: string + description: Unique identifier for this tool use request + example: tool_001 + name: + type: string + description: Name of the tool to execute. Must match a tool name from the tools array + example: Analyst1 + input: + type: object + description: Input parameters for the tool execution + example: + query: What are the top selling products? + limit: 5 + additionalProperties: true + cache_control: + $ref: '#/components/schemas/CacheControl' + StreamingToolUse: + type: object + description: | + Represents a request to use a specific tool. Contains the tool identifier + and input parameters for the execution. + properties: + tool_use_id: + type: string + description: Unique identifier for this tool use request + name: + type: string + description: Name of the tool to execute. Must match a tool name from the tools array + input: + type: string + Tool: + type: object + description: | + Defines a tool that can be used by the agent. + Tools provide specific capabilities like data analysis, search, or generic functions. + required: + - tool_spec + properties: + tool_spec: + type: object + description: Specification of the tool's type, configuration, and input requirements + required: + - type + - name + properties: + type: + type: string + description: | + The type of tool capability. Can be specialized types like + 'cortex_analyst_text_to_sql' or 'generic' for general-purpose tools. + example: generic + name: + type: string + description: | + Unique identifier for referencing this tool instance. + Used to match with configuration in tool_resources. + example: get_weather + description: + type: string + description: Description of the tool to be considered for tool use + input_schema: + type: object + description: | + JSON Schema definition of the expected input parameters for this tool. + Required for generic tools to specify their input requirements. + properties: + type: + type: string + description: The type of the input schema object + example: object + properties: + type: string + description: Definitions of each input parameter (opaque JSON object) + required: + type: array + description: List of required input parameter names + items: + type: string + additionalProperties: true + example: + type: object + properties: + location: + type: string + description: The city and state, e.g. San Francisco, CA + required: + - location + cache_control: + $ref: '#/components/schemas/CacheControl' + OpenAIOutput: + type: object + description: OpenAI specific output. + properties: + reasoning: + $ref: '#/components/schemas/OpenAIReasoning' + OpenAIReasoning: + type: object + nullable: true + description: OpenAI reasoning output. + properties: + summary: + type: string + description: | + Reasoning summary tokens generated during the model response. + encrypted_content: + type: string + description: | + The encrypted_content field is an opaque field and should not be interpreted or parsed. + It should only be used for verifying that the reasoning blocks were generated by that specific model. + required: + - summary + - encrypted_content + AnthropicOutput: + type: object + description: Anthropic specific output. + properties: + thinking: + $ref: '#/components/schemas/AnthropicThinking' + AnthropicThinking: + type: object + nullable: true + description: Anthropic thinking output. + properties: + thinking: + type: string + description: | + Thinking tokens generated during the model response. + This field can also be used in the follow-up requests to continue the conversation. + signature: + type: string + description: | + The signature field is an opaque field and should not be interpreted or parsed. + It should only be used for verifying that the thinking blocks were generated by that specific model. + required: + - thinking + - signature + StreamingOpenAIOutput: + type: object + description: OpenAI reasoning output. + properties: + reasoning: + $ref: '#/components/schemas/StreamingOpenAIReasoning' + StreamingOpenAIReasoning: + type: object + nullable: true + description: OpenAI reasoning output. + properties: + summary: + type: string + description: | + Reasoning summary tokens generated during the model response. + nullable: true + encrypted_content: + type: string + description: | + The encrypted_content field is an opaque field and should not be interpreted or parsed. + It should only be used for verifying that the reasoning blocks were generated by that specific model. + nullable: true + StreamingAnthropicOutput: + type: object + description: | + Represents the thinking response from model. Contains either the thinking tokens or signature. + properties: + thinking: + $ref: '#/components/schemas/StreamingAnthropicThinking' + StreamingAnthropicThinking: + type: object + nullable: true + description: Anthropic thinking output. + properties: + thinking: + type: string + description: | + Thinking tokens generated during the model response. + This field can also be used in the follow-up requests to continue the conversation. + nullable: true + signature: + type: string + description: | + The signature field is an opaque field and should not be interpreted or parsed. + It should only be used for verifying that the thinking blocks were generated by that specific model. + nullable: true + NonStreamingCompleteResponse: + type: object + description: Text-completion response for non-streaming request. + properties: + choices: + type: array + items: + type: object + properties: + message: + type: object + properties: + content: + type: string + description: The text completion response. + content_list: + type: array + description: Contents of text and toolUse response. + items: + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextContent' + tool_use: '#/components/schemas/ToolUse' + anthropic: '#/components/schemas/AnthropicOutput' + openai: '#/components/schemas/OpenAIOutput' + finish_reason: + type: string + nullable: true + description: The reason the request was finished. + enum: + - stop + - content_filter + - tool_calls + - length + usage: + type: object + title: Usage + properties: + prompt_tokens: + type: integer + description: Input token count. + completion_tokens: + type: integer + description: Output token count. + guard_tokens: + type: integer + description: Tokens used by cortex guard. + total_tokens: + type: integer + description: Sum of all tokens. + cache_read_input_tokens: + type: integer + description: reserved + nullable: true + minimum: 0 + cache_write_input_tokens: + type: integer + description: reserved + nullable: true + minimum: 0 + StreamingCompleteResponse: + type: string + description: Server-sent events for streaming text-completion updates. (opaque JSON object) + x-events: + data: + $ref: '#/components/schemas/StreamingCompleteResponseDataEvent' + StreamingCompleteResponseDataEvent: + type: object + description: Streaming text-completion response event. + properties: + choices: + type: array + items: + type: object + properties: + delta: + $ref: '#/components/schemas/StreamingCompleteResponseDelta' + StreamingCompleteResponseDelta: + type: string + required: + - type + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/StreamingTextContent' + tool_use: '#/components/schemas/StreamingToolUse' + anthropic: '#/components/schemas/StreamingAnthropicOutput' + openai: '#/components/schemas/StreamingOpenAIOutput' + description: (opaque JSON object) + QueryRequest: + type: object + description: A search query and additional parameters for search. + properties: + query: + description: Unstructured text query. Exactly one of 'query' or 'multi_index_query' must be specified. + type: string + multi_index_query: + description: A search query expressed as a collection of multiple column-level queries. Exactly one of 'query' or 'multi_index_query' must be specified. A column/index can be queried with multiple queries. + type: object + additionalProperties: true + columns: + description: List of columns to return. + type: array + items: + type: string + filter: + description: Filter query. (opaque JSON object) + type: string + limit: + description: Max number of results to return. + type: integer + default: 10 + scoring_config: + $ref: '#/components/schemas/ScoringConfig' + scoring_profile: + description: Mutually exclusive with scoring_config. Specifies the pre-defined name of a profile on the cortex search service that resolves to scoring_config. + type: string + experimental: + description: reserved + type: object + additionalProperties: true + ScoringConfig: + type: object + description: reserved + properties: + functions: + $ref: '#/components/schemas/Functions' + reranker: + $ref: '#/components/schemas/Reranker' + weights: + $ref: '#/components/schemas/Weights' + retrieval_weights: + $ref: '#/components/schemas/RetrievalWeights' + ranking_weights: + $ref: '#/components/schemas/RankingWeights' + Weights: + type: object + description: Weights to apply to each scoring component. + properties: + texts: + description: Weight to apply to all text-specific columns. + type: number + example: 0.5 + vectors: + description: Weight to apply to all vector-specific columns. + type: number + example: 0.5 + reranker: + description: Weight to apply to reranker-specific scoring component. + type: number + example: 0.5 + RetrievalWeights: + type: object + description: Weights to apply to retrieval stage components. + properties: + texts: + description: Multiplier for text-based scoring in retrieval. + type: number + example: 1 + vectors: + description: Multiplier for vector-based scoring in retrieval. + type: number + example: 1 + RankingWeights: + type: object + description: Weights to apply to ranking stage components. + properties: + texts: + description: Multiplier for text-based scoring in ranking. + type: number + example: 1 + vectors: + description: Multiplier for vector-based scoring in ranking. + type: number + example: 1 + reranker: + description: Multiplier for reranker score in ranking. + type: number + example: 1 + Functions: + type: object + description: Functions to apply for scoring this request. + properties: + numeric_boosts: + type: array + items: + $ref: '#/components/schemas/NumericBoost' + time_decays: + type: array + items: + $ref: '#/components/schemas/TimeDecay' + text_boosts: + type: array + items: + $ref: '#/components/schemas/TextBoost' + vector_boosts: + type: array + items: + $ref: '#/components/schemas/VectorBoost' + query_similarity_boosts: + type: array + items: + $ref: '#/components/schemas/QuerySimilarityBoost' + Column: + type: string + description: Column to apply this function to. + NumericBoost: + type: object + properties: + column: + $ref: '#/components/schemas/Column' + weight: + type: number + description: Weight to apply for boosting this numerical column. It will be normalized across all scored columns specified in the scoring config so that all weights sum to 1. If a weight is not provided, the weight defaults to 1 pre-normalization. + example: 0.5 + required: + - column + TimeDecay: + type: object + properties: + column: + $ref: '#/components/schemas/Column' + weight: + type: number + description: Weight to apply for decaying this timestamp column. Normalized across all scored columns in the scoring config so that all weights sum to 1. If a weight is not provided, the weight defaults to 1 pre-normalization. + example: 0.5 + limit_hours: + type: number + description: Optional limit in hours after which the decay does not apply. + example: 24 + now: + type: string + format: date-time + description: Optional reference timestamp to calculate decay from. + example: '2022-01-01T00:00:00Z' + required: + - column + TextBoost: + type: object + properties: + column: + $ref: '#/components/schemas/Column' + weight: + description: Weight to apply for boosting this text column. + type: number + example: 0.5 + VectorBoost: + type: object + properties: + column: + $ref: '#/components/schemas/Column' + weight: + description: Weight to apply for boosting this vector column. + type: number + example: 0.5 + QuerySimilarityBoost: + type: object + properties: + cortex_search_service: + description: Fully-qualified name of a Cortex Search Service through which to find similar previous queries. + type: string + example: MY_DB.MY_SCHEMA.MY_SEARCH_SERVICE + previous_query_column: + description: Name of a TEXT column indexed in the specified previous queries search service that contains the previous query strings. + type: string + documents_column: + description: Name of an ARRAY column indexed in the specified previous queries search service that contains a list of documents that matched the corresponding previous query. Each document is represented as an OBJECT mapping all primary key columns to their corresponding values. + type: string + Reranker: + type: string + description: Model to use for the reranker, or "none" if the reranker should be turned off. If excluded or null, the default reranker is used. + example: none + ColumnQuery: + description: Query specification of a given column. Exactly one of 'text' or 'vector' must be specified. + type: object + properties: + text: + description: Unstructured text query for querying a text index. + type: string + vector: + description: Query embedding vector. Must be computed using the same model as used for embedding the column being queried. + type: array + items: + type: number + format: float + QueryResponse: + type: object + description: Search results. + properties: + results: + type: array + description: List of result rows. + items: + type: object + additionalProperties: true + description: Map of column names to values (as bytes). + request_id: + type: string + description: ID of the request. + required: + - results + - request_id + ResultRow: + type: object + description: Map of column names to values. + properties: + columns: + type: string + description: (opaque JSON object) + SuggestQueryRequest: + type: object + description: A Suggest request. + properties: + query: + description: The text query on which to suggest. + type: string + columns: + description: List of columns to return. + type: array + items: + type: string + limit: + description: Max number of results to return. + type: integer + default: 5 + required: + - query + SuggestResult: + type: object + description: Suggest results. + properties: + rows: + type: array + description: List of result rows. + items: + $ref: '#/components/schemas/ResultRow' + SuggestQueryResponse: + type: object + description: Suggest results. + properties: + results: + type: array + description: List of result rows. + items: + $ref: '#/components/schemas/SuggestResult' + request_id: + type: string + description: ID of the request. + required: + - results + - request_id + CortexSearchService: + type: object + description: A Snowflake cortex search service object. + properties: + name: + type: string + description: Specifies the name for the cortex search service, must be unique for the schema in which the cortex search service is created + search_column: + type: string + description: Specifies the name of the search column for the cortex search service. + columns: + type: array + items: + type: string + description: Specifies all columns included in the cortex search service and that can be returned in search queries. + attribute_columns: + type: array + items: + type: string + description: Specifies the attribute columns, which can be referenced in filters in search queries to the cortex search service. + target_lag: + $ref: '#/components/schemas/TargetLag' + description: Specifies the schedule for periodically refreshing the cortex search service. + warehouse: + type: string + description: Specifies the name of the warehouse that provides the compute resources for refreshing the cortex search service + example: test_wh + definition: + type: string + description: Specifies the definition (source query) used to create the cortex search service + example: SELECT col1, col2 FROM foo + comment: + type: string + description: Specifies a comment for the cortex search service + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the cortex search service was created. + database_name: + type: string + readOnly: true + description: Database in which the cortex search service is stored + schema_name: + type: string + readOnly: true + description: Schema in which the cortex search service is stored + source_data_num_rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the materialized source data feeding into the cortex search service. + data_timestamp: + type: string + format: date-time + readOnly: true + description: Date and time as of which data existent in base tables is now serving. + indexing_state: + $ref: '#/components/schemas/SchedulingState' + description: Current state of the indexing pipeline for the cortex search service; one of 'SUSPENDED' or 'ACTIVE'. + serving_state: + $ref: '#/components/schemas/SchedulingState' + description: Whether the cortex search service is currently actively serving; one of 'SUSPENDED' or 'ACTIVE'. + indexing_error: + type: string + readOnly: true + description: Error encountered during the latest indexing pipeline of the cortex search service, if any. + serving_data_bytes: + type: integer + format: int64 + readOnly: true + description: Size of the serving index, in bytes. + SchedulingState: + type: string + enum: + - ACTIVE + - SUSPENDED + - INITIALIZING + SendFeedbackRequest_cortex_search_service: + type: object + description: The request object for sending user feedback on Cortex Search results + properties: + request_id: + type: string + description: Request id associated with the feedback + positive: + type: boolean + description: Whether the results were good (true) or bad (false) + feedback_message: + type: string + description: The text for the detailed feedback message + required: + - request_id + - positive + CortexAnthropicMessagesRequest: + type: object + description: Anthropic Messages API compatible request (JSON mode). + required: + - model + - messages + - max_tokens + properties: + model: + type: string + description: Model that will complete the prompt. + messages: + type: array + description: Input messages. + items: + type: string + description: (opaque JSON object) + max_tokens: + type: integer + description: Maximum number of tokens to generate. + system: + type: string + description: System prompt. + temperature: + type: number + description: Amount of randomness injected into the response. + top_p: + type: number + description: Nucleus sampling threshold. + top_k: + type: integer + description: Only sample from the top K options for each token. + stop_sequences: + type: array + description: Custom sequences that will stop generation. + items: + type: string + stream: + type: boolean + description: Must be false or omitted - streaming (SSE) responses are out of scope. + default: false + tools: + type: array + description: Definitions of tools the model may use. + items: + type: string + description: (opaque JSON object) + tool_choice: + type: string + description: How the model should use the provided tools. (opaque JSON object) + CortexAnthropicMessagesResponse: + type: object + description: Anthropic Messages API compatible response. + properties: + id: + type: string + description: Unique message identifier. + type: + type: string + description: Object type (message). + role: + type: string + description: Conversational role of the generated message (assistant). + model: + type: string + description: Model that handled the request. + content: + type: array + description: Generated content blocks. + items: + type: string + description: (opaque JSON object) + stop_reason: + type: string + description: Reason generation stopped. + stop_sequence: + type: string + description: Which custom stop sequence was generated, if any. + usage: + type: string + description: Billing and rate-limit token usage. (opaque JSON object) + CortexOpenAIChatCompletionsRequest: + type: object + description: OpenAI Chat Completions API compatible request (JSON mode). + required: + - model + - messages + properties: + model: + type: string + description: Model to use for the completion. + messages: + type: array + description: Messages comprising the conversation so far. + items: + type: string + description: (opaque JSON object) + max_completion_tokens: + type: integer + description: Upper bound for generated completion tokens. + temperature: + type: number + description: Sampling temperature. + top_p: + type: number + description: Nucleus sampling threshold. + 'n': + type: integer + description: Number of chat completion choices to generate. + stream: + type: boolean + description: Must be false or omitted - streaming (SSE) responses are out of scope. + default: false + stop: + type: array + description: Sequences where the API will stop generating. + items: + type: string + presence_penalty: + type: number + description: Penalize new tokens based on presence so far. + frequency_penalty: + type: number + description: Penalize new tokens based on frequency so far. + response_format: + type: string + description: Output format specification (e.g. JSON mode). (opaque JSON object) + tools: + type: array + description: Tools the model may call. + items: + type: string + description: (opaque JSON object) + tool_choice: + type: string + description: Controls which (if any) tool is called. (opaque JSON object) + user: + type: string + description: Stable end-user identifier. + CortexOpenAIChatCompletionsResponse: + type: object + description: OpenAI Chat Completions API compatible response. + properties: + id: + type: string + description: Unique completion identifier. + object: + type: string + description: Object type (chat.completion). + created: + type: integer + description: Unix timestamp of creation. + model: + type: string + description: Model used for the completion. + choices: + type: array + description: Completion choices. + items: + type: string + description: (opaque JSON object) + usage: + type: string + description: Completion token usage. (opaque JSON object) + system_fingerprint: + type: string + description: Backend configuration fingerprint. + ListCortexSearchServicesResponse: + type: object + properties: + cortex_search_services: + type: array + items: + $ref: '#/components/schemas/CortexSearchService' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + suspendResumeTarget: + name: target + description: Query parameter that identifies the target to which suspension or resumption of the cortex search service should be applied. + in: query + schema: + type: string + enum: + - indexing + - INDEXING + - serving + - SERVING + example: indexing + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + analyst_feedback: + id: snowflake.cortex.analyst_feedback + name: analyst_feedback + title: Analyst Feedback + methods: + send_feedback: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1feedback/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/analyst_feedback/methods/send_feedback' + update: [] + delete: [] + replace: [] + analyst_messages: + id: snowflake.cortex.analyst_messages + name: analyst_messages + title: Analyst Messages + methods: + send_message: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1message/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/analyst_messages/methods/send_message' + insert: [] + update: [] + delete: [] + replace: [] + analyst_verified_query_suggestions: + id: snowflake.cortex.analyst_verified_query_suggestions + name: analyst_verified_query_suggestions + title: Analyst Verified Query Suggestions + methods: + generate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1verified-query-suggestions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + analyst_pre_selection: + id: snowflake.cortex.analyst_pre_selection + name: analyst_pre_selection + title: Analyst Pre Selection + methods: + pre_select: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1pre-selection/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + analyst_filters_and_metrics_suggestions: + id: snowflake.cortex.analyst_filters_and_metrics_suggestions + name: analyst_filters_and_metrics_suggestions + title: Analyst Filters And Metrics Suggestions + methods: + generate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1filters-and-metrics-suggestions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + analyst_agentic_optimizations: + id: snowflake.cortex.analyst_agentic_optimizations + name: analyst_agentic_optimizations + title: Analyst Agentic Optimizations + methods: + list_agentic_optimizations: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1agentic-optimizations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1agentic-optimization/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/analyst_agentic_optimizations/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + analyst_tokens: + id: snowflake.cortex.analyst_tokens + name: analyst_tokens + title: Analyst Tokens + methods: + get_scoped_token: + operation: + $ref: '#/paths/~1api~1v2~1cortex~1analyst~1token/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/analyst_tokens/methods/get_scoped_token' + insert: [] + update: [] + delete: [] + replace: [] + messages: + id: snowflake.cortex.messages + name: messages + title: Messages + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1v1~1messages/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/messages/methods/create' + insert: [] + update: [] + delete: [] + replace: [] + chat_completions: + id: snowflake.cortex.chat_completions + name: chat_completions + title: Chat Completions + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1cortex~1v1~1chat~1completions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/chat_completions/methods/create' + insert: [] + update: [] + delete: [] + replace: [] + models: + id: snowflake.cortex.models + name: models + title: Models + methods: + get: + operation: + $ref: '#/paths/~1api~1v2~1cortex~1models/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/models/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + cortex_search_services: + id: snowflake.cortex.cortex_search_services + name: cortex_search_services + title: Cortex Search Services + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.cortex_search_services + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListCortexSearchServicesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"cortex_search_services\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + query: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{service_name}:query/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suggest: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{service_name}:suggest/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + feedback: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1cortex-search-services~1{name}:feedback/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cortex_search_services/methods/get' + - $ref: '#/components/x-stackQL-resources/cortex_search_services/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/cortex_search_services/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cortex_search_services/methods/delete' + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/database-role.yaml b/providers/src/snowflake/v00.00.00000/services/database-role.yaml deleted file mode 100644 index 991c9887..00000000 --- a/providers/src/snowflake/v00.00.00000/services/database-role.yaml +++ /dev/null @@ -1,1326 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Database Role API - description: The Snowflake Database Role API is a REST API that you can use to access, - update, and perform certain actions on Database Role resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/database-roles: - get: - summary: List database roles - tags: - - database-role - description: List database roles - operationId: listDatabaseRoles - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DatabaseRole' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a database role - tags: - - database-role - description: Create a database role - operationId: createDatabaseRole - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseRole' - /api/v2/databases/{database_name}/database-roles/{name}: - delete: - summary: Delete a database role - tags: - - database-role - description: Delete a database role - operationId: deleteDatabaseRole - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/database-roles/{name}:clone: - post: - summary: Create a new database role by cloning from the specified resource - tags: - - database-role - description: Create a new database role by cloning from the specified resource - operationId: cloneDatabaseRole - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: targetDatabase - description: Database of the target resource. Defaults to the source's database - in: query - required: false - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseRoleClone' - /api/v2/databases/{database_name}/database-roles/{name}/grants: - get: - summary: List all grants to the role - tags: - - database-role - description: List all grants to the role - operationId: listGrants - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Grant' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Grant privileges to the role - tags: - - database-role - description: Grant privileges to the role - operationId: grantPrivileges - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/databases/{database_name}/database-roles/{name}/grants:revoke: - post: - summary: Revoke grants from the role - tags: - - database-role - description: Revoke grants from the role - operationId: revokeGrants - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/mode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/databases/{database_name}/database-roles/{name}/future-grants: - get: - summary: List all future grants to the role - tags: - - database-role - description: List all future grants to the role - operationId: listFutureGrants - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Grant' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Grant future privileges to the role - tags: - - database-role - description: Grant future privileges to the role - operationId: grantFuturePrivileges - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/databases/{database_name}/database-roles/{name}/future-grants:revoke: - post: - summary: Revoke future grants from the role - tags: - - database-role - description: Revoke future grants from the role - operationId: revokeFutureGrants - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/mode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' -components: - schemas: - DatabaseRole: - type: object - description: A Snowflake database role - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the database role - comment: - type: string - description: User comment associated to an object in the dictionary - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the database role was created - granted_to_roles: - type: integer - format: int64 - readOnly: true - description: How many roles this database role has been granted to - granted_to_database_roles: - type: integer - format: int64 - readOnly: true - description: How many database roles this database role has been granted - to - granted_database_roles: - type: integer - format: int64 - readOnly: true - description: How many database roles this database role has been granted - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the database role - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the database role - required: - - name - DatabaseRoleClone: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the database role - required: - - name - Grant: - type: object - properties: - securable: - $ref: '#/components/schemas/Securable' - description: Securable of the grant - containing_scope: - $ref: '#/components/schemas/ContainingScope' - description: Containing scope of the grant - securable_type: - type: string - description: Type of the securable to be granted. - grant_option: - type: boolean - description: If true, allows the recipient role to grant the privileges - to other roles. - privileges: - type: array - items: - type: string - description: List of privileges to be granted. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - granted_by: - type: string - readOnly: true - description: The role that granted this privilege to this grantee - required: - - securable_type - Securable: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable if applicable. - service: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Service name of the securable if applicable. - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the securable if applicable. - required: - - name - ContainingScope: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable scope if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable scope if applicable. - required: - - database - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - database_roles: - methods: - list_database_roles: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_database_role: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles/post' - response: - mediaType: '' - openAPIDocKey: '200' - delete_database_role: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - clone_database_role: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/database_roles/methods/list_database_roles' - insert: - - $ref: '#/components/x-stackQL-resources/database_roles/methods/create_database_role' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/database_roles/methods/delete_database_role' - replace: [] - id: snowflake.database_role.database_roles - name: database_roles - title: Database Roles - grants: - methods: - list_grants: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - grant_privileges: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants/post' - response: - mediaType: '' - openAPIDocKey: '200' - revoke_grants: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants:revoke/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants/methods/list_grants' - insert: - - $ref: '#/components/x-stackQL-resources/grants/methods/grant_privileges' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/grants/methods/revoke_grants' - replace: [] - id: snowflake.database_role.grants - name: grants - title: Grants - future_grants: - methods: - list_future_grants: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - grant_future_privileges: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants/post' - response: - mediaType: '' - openAPIDocKey: '200' - revoke_future_grants: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants:revoke/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/list_future_grants' - insert: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/grant_future_privileges' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/revoke_future_grants' - replace: [] - id: snowflake.database_role.future_grants - name: future_grants - title: Future Grants -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/database.yaml b/providers/src/snowflake/v00.00.00000/services/database.yaml deleted file mode 100644 index b2972fee..00000000 --- a/providers/src/snowflake/v00.00.00000/services/database.yaml +++ /dev/null @@ -1,1594 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Database API - description: The Snowflake Database API is a REST API that you can use to access, - update, and perform certain actions on Database resource in Snowflake. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases: - get: - summary: List databases. - tags: - - database - description: Lists the accessible databases. - operationId: listDatabases - parameters: - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: history - in: query - description: Optionally includes dropped databases that have not yet been - purged. - schema: - type: boolean - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Database' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a database. - tags: - - database - description: Creates a database, with modifiers as query parameters. You must - provide the full database definition when creating a database. - operationId: createDatabase - parameters: - - $ref: '#/components/parameters/createMode' - - name: kind - in: query - description: Type of database to create. Currently, Snowflake supports only - `transient` and `permanent` (also represented by the empty string). - schema: - type: string - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Database' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases:from-share: - post: - summary: Create a database from a share. - tags: - - database - description: Creates a database from a given share. - operationId: createDatabaseFromShare - parameters: - - $ref: '#/components/parameters/createMode' - - name: share - in: query - description: ID of the share from which to create the database, in the form - ".". - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseFromShare' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}:from_share: - post: - summary: Create a database from a share. - tags: - - database - description: Creates a database from a given share. - operationId: createDatabaseFromShareDeprecated - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: share - in: query - description: ID of the share from which to create the database, in the form - ".". - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - deprecated: true - /api/v2/databases/{name}:clone: - post: - summary: Clone a database. - tags: - - database - description: Clones an existing database, with modifiers as query parameters. - You must provide the full database definition when cloning an existing database. - operationId: cloneDatabase - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: kind - in: query - description: Type of database to create. Currently, Snowflake supports only - `transient` and `permanent` (also represented by the empty string). - schema: - type: string - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseClone' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}: - get: - tags: - - database - description: Fetches a database. - operationId: fetchDatabase - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Database' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a new, or alters an existing, database. - tags: - - database - description: Creates a new, or alters an existing, database. You must provide - the full database definition even when altering an existing database. - operationId: createOrAlterDatabase - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Database' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a database. - tags: - - database - description: Deletes the specified database. If you enable the `ifExists` parameter, - the operation succeeds even if the database does not exist. Otherwise, a 404 - failure is returned if the database does not exist. if the drop is unsuccessful. - operationId: deleteDatabase - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: restrict - in: query - description: 'Whether to drop the database if foreign keys exist that reference - any tables in the database. - - - `true`: Return a warning about existing foreign key references and don''t - drop the database. - - - `false`: Drop the database and all objects in the database, including - tables with primary or unique keys that are referenced by foreign keys in - other tables.' - schema: - type: boolean - default: false - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}:undrop: - post: - summary: Undrop a database. - tags: - - database - description: Undrops database. - operationId: undropDatabase - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/replication:enable: - post: - summary: Enable database replication. - tags: - - database - description: Promotes a local database to serve as a primary database for replication. - A primary database can be replicated in one or more accounts, allowing users - in those accounts to query objects in each secondary (i.e. replica) database. - operationId: enableDatabaseReplication - parameters: - - $ref: '#/components/parameters/name' - - name: ignore_edition_check - in: query - description: 'Whether to allow replicating data to accounts on lower editions. - Default: `true`. - - For more information, see the - ALTER DATABASE reference.' - schema: - type: boolean - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AccountIdentifiers' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/replication:disable: - post: - summary: Disable database replication. - tags: - - database - description: Disables replication for this primary database, meaning no replica - of this database (i.e. secondary database) in another account can be refreshed. - Any secondary databases remain linked to the primary database, but requests - to refresh a secondary database are denied. - operationId: disableDatabaseReplication - parameters: - - $ref: '#/components/parameters/name' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AccountIdentifiers' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/replication:refresh: - post: - summary: Refresh database replications. - tags: - - database - description: 'Refreshes a secondary database from a snapshot of its primary - database. A snapshot includes changes to the objects and data. - - If you call this endpoint while another refresh for the same replica database - is running, it fails and returns an error. Snowflake ensures only one refresh - is executed at any given time.' - operationId: refreshDatabaseReplication - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/failover:enable: - post: - summary: Enable database failover. - tags: - - database - description: Specifies a comma-separated list of accounts in your organization - where a replica of this primary database can be promoted to serve as the primary - database. - operationId: enableDatabaseFailover - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AccountIdentifiers' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/failover:disable: - post: - summary: Disable database failover. - tags: - - database - description: Disables failover for this primary database, meaning no replica - of this database (i.e. secondary database) can be promoted to serve as the - primary database. - operationId: disableDatabaseFailover - parameters: - - $ref: '#/components/parameters/name' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AccountIdentifiers' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{name}/failover:primary: - post: - summary: Set a primary database. - tags: - - database - description: Promotes the specified secondary (replica) database to serve as - the primary database. When promoted, the database becomes writeable. At the - same time, the previous primary database becomes a read-only secondary database. - operationId: primaryDatabaseFailover - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - AccountIdentifiers: - type: object - description: Array of unique account identifiers. - properties: - accounts: - type: array - items: - type: string - minLength: 1 - example: - accounts: - - accountName1 - - accountName2 - required: - - accounts - Database: - type: object - description: Snowflake database object. - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time the database was created. - name: - $ref: '#/components/schemas/Identifier' - description: Name of the database. - kind: - type: string - enum: - - PERMANENT - - TRANSIENT - default: PERMANENT - description: Database type, permanent (default) or transient. - is_default: - type: boolean - readOnly: true - description: Whether the database is the default database for a user. - is_current: - type: boolean - readOnly: true - description: Current database for the session. - origin: - type: string - readOnly: true - owner: - type: string - readOnly: true - description: Name of the role that owns the database. - comment: - type: string - description: Optional comment in which to store information related to the - database. - options: - type: string - readOnly: true - retention_time: - type: integer - readOnly: true - description: Number of days that historical data is retained for Time Travel. - dropped_on: - type: string - format: date-time - readOnly: true - nullable: true - description: Date and time the database was dropped. - budget: - type: string - readOnly: true - description: Budget that defines a monthly spending limit on the compute - costs for a Snowflake account or a custom group of Snowflake objects. - owner_role_type: - type: string - readOnly: true - description: Type of role that owns the object, either ROLE or DATABASE_ROLE - data_retention_time_in_days: - type: integer - description: Specifies the number of days for which Time Travel actions - (CLONE and UNDROP) can be performed on the database, as well as specifying - the default Time Travel retention time for all schemas created in the - database. - default_ddl_collation: - type: string - description: Default collation specification for all schemas and tables - added to the database. You an override the default at the schema and individual - table levels. - log_level: - type: string - description: Severity level of messages that should be ingested and made - available in the active event table. Currently, Snowflake supports only - `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. - max_data_extension_time_in_days: - type: integer - description: Maximum number of days for which Snowflake can extend the data - retention period for tables in the database to prevent streams on the - tables from becoming stale. - suspend_task_after_num_failures: - type: integer - description: Maximum number of consecutive failed task runs before the current - task is suspended automatically. - trace_level: - type: string - description: How trace events are ingested into the event table. Currently, - Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. - user_task_managed_initial_warehouse_size: - type: string - description: Size of the compute resources to provision for the first run - of the serverless task, before a task history is available for Snowflake - to determine an ideal size. - user_task_timeout_ms: - type: integer - description: Time limit, in milliseconds, for a single run of the task before - it times out. - serverless_task_min_statement_size: - type: string - description: Specifies the minimum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. - serverless_task_max_statement_size: - type: string - description: Specifies the maximum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. - required: - - name - DatabaseClone: - type: object - description: Clone database. - allOf: - - $ref: '#/components/schemas/Database' - properties: - point_of_time: - $ref: '#/components/schemas/PointOfTime' - DatabaseFromShare: - type: object - description: Database from share. - properties: - name: - $ref: '#/components/schemas/Identifier' - description: Name of the database. - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - databases: - methods: - list_databases: - operation: - $ref: '#/paths/~1api~1v2~1databases/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_database: - operation: - $ref: '#/paths/~1api~1v2~1databases/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_database_from_share: - operation: - $ref: '#/paths/~1api~1v2~1databases:from-share/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_database_from_share_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}:from_share/post' - response: - mediaType: '' - openAPIDocKey: '200' - clone_database: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_database: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_database: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_database: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_database: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - enable_database_replication: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:enable/post' - response: - mediaType: '' - openAPIDocKey: '200' - disable_database_replication: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:disable/post' - response: - mediaType: '' - openAPIDocKey: '200' - refresh_database_replication: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:refresh/post' - response: - mediaType: '' - openAPIDocKey: '200' - enable_database_failover: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:enable/post' - response: - mediaType: '' - openAPIDocKey: '200' - disable_database_failover: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:disable/post' - response: - mediaType: '' - openAPIDocKey: '200' - primary_database_failover: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:primary/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/databases/methods/list_databases' - - $ref: '#/components/x-stackQL-resources/databases/methods/fetch_database' - insert: - - $ref: '#/components/x-stackQL-resources/databases/methods/create_database' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/databases/methods/delete_database' - replace: - - $ref: '#/components/x-stackQL-resources/databases/methods/create_or_alter_database' - id: snowflake.database.databases - name: databases - title: Databases -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/databases.yaml b/providers/src/snowflake/v00.00.00000/services/databases.yaml new file mode 100644 index 00000000..2b581d34 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/databases.yaml @@ -0,0 +1,2296 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Databases API + description: 'The Snowflake REST API surface for the databases service, combining the vendor spec(s): database.yaml, schema.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases: + get: + summary: List databases. + tags: + - database + description: Lists the accessible databases. + operationId: listDatabases + parameters: + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: history + in: query + description: Optionally includes dropped databases that have not yet been purged. + schema: + type: boolean + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatabasesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a database. + tags: + - database + description: Creates a database, with modifiers as query parameters. You must provide the full database definition when creating a database. + operationId: createDatabase + parameters: + - $ref: '#/components/parameters/createMode' + - name: kind + in: query + description: Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). + schema: + type: string + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Database' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases:from-share: + post: + summary: Create a database from a share. + tags: + - database + description: Creates a database from a given share. + operationId: createDatabaseFromShare + parameters: + - $ref: '#/components/parameters/createMode' + - name: share + in: query + description: ID of the share from which to create the database, in the form ".". + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseFromShare' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}:from_share: + post: + summary: Create a database from a share. + tags: + - database + description: Creates a database from a given share. + operationId: createDatabaseFromShareDeprecated + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: share + in: query + description: ID of the share from which to create the database, in the form ".". + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + deprecated: true + /api/v2/databases/{name}:clone: + post: + summary: Clone a database. + tags: + - database + description: Clones an existing database, with modifiers as query parameters. You must provide the full database definition when cloning an existing database. + operationId: cloneDatabase + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: kind + in: query + description: Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). + schema: + type: string + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseClone' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}: + get: + tags: + - database + description: Fetches a database. + operationId: fetchDatabase + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Database' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a database. + tags: + - database + description: Deletes the specified database. If you enable the `ifExists` parameter, the operation succeeds even if the database does not exist. Otherwise, a 404 failure is returned if the database does not exist. if the drop is unsuccessful. + operationId: deleteDatabase + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: restrict + in: query + description: |- + Whether to drop the database if foreign keys exist that reference any tables in the database. + - `true`: Return a warning about existing foreign key references and don't drop the database. + - `false`: Drop the database and all objects in the database, including tables with primary or unique keys that are referenced by foreign keys in other tables. + schema: + type: boolean + default: false + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}:undrop: + post: + summary: Undrop a database. + tags: + - database + description: Undrops database. + operationId: undropDatabase + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/replication:enable: + post: + summary: Enable database replication. + tags: + - database + description: Promotes a local database to serve as a primary database for replication. A primary database can be replicated in one or more accounts, allowing users in those accounts to query objects in each secondary (i.e. replica) database. + operationId: enableDatabaseReplication + parameters: + - $ref: '#/components/parameters/name' + - name: ignore_edition_check + in: query + description: |- + Whether to allow replicating data to accounts on lower editions. Default: `true`. + For more information, see the ALTER DATABASE reference. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountIdentifiers' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/replication:disable: + post: + summary: Disable database replication. + tags: + - database + description: Disables replication for this primary database, meaning no replica of this database (i.e. secondary database) in another account can be refreshed. Any secondary databases remain linked to the primary database, but requests to refresh a secondary database are denied. + operationId: disableDatabaseReplication + parameters: + - $ref: '#/components/parameters/name' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccountIdentifiers' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/replication:refresh: + post: + summary: Refresh database replications. + tags: + - database + description: |- + Refreshes a secondary database from a snapshot of its primary database. A snapshot includes changes to the objects and data. + If you call this endpoint while another refresh for the same replica database is running, it fails and returns an error. Snowflake ensures only one refresh is executed at any given time. + operationId: refreshDatabaseReplication + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/failover:enable: + post: + summary: Enable database failover. + tags: + - database + description: Specifies a comma-separated list of accounts in your organization where a replica of this primary database can be promoted to serve as the primary database. + operationId: enableDatabaseFailover + parameters: + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountIdentifiers' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/failover:disable: + post: + summary: Disable database failover. + tags: + - database + description: Disables failover for this primary database, meaning no replica of this database (i.e. secondary database) can be promoted to serve as the primary database. + operationId: disableDatabaseFailover + parameters: + - $ref: '#/components/parameters/name' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccountIdentifiers' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{name}/failover:primary: + post: + summary: Set a primary database. + tags: + - database + description: Promotes the specified secondary (replica) database to serve as the primary database. When promoted, the database becomes writeable. At the same time, the previous primary database becomes a read-only secondary database. + operationId: primaryDatabaseFailover + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas: + get: + summary: List schemas. + tags: + - schema + description: Lists the accessible schemas. + operationId: listSchemas + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: history + in: query + description: 'Whether to include dropped schemas that have not yet been purged. Default: `false`.' + schema: + type: boolean + default: false + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListSchemasResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a schema. + tags: + - schema + description: Creates a schema, with modifiers as query parameters. You must provide the full schema definition when creating a schema. + operationId: createSchema + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/createMode' + - name: kind + in: query + description: Type of schema to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). + schema: + type: string + default: '' + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{name}:clone: + post: + summary: Clone a schema. + tags: + - schema + description: Clones an existing schema, with modifiers as query parameters. You must provide the full schema definition when cloning an existing schema. + operationId: cloneSchema + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: kind + in: query + description: Type of schema to clone. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). + schema: + type: string + default: '' + deprecated: true + - name: targetDatabase + in: query + description: Database of the newly created schema. Defaults to the source schema's database. + schema: + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaClone' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{name}:undrop: + post: + summary: Undrop a schema. + tags: + - schema + description: Undrops schema. + operationId: undropSchema + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{name}: + get: + tags: + - schema + description: Fetches a schema. + operationId: fetchSchema + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a schema. + tags: + - schema + description: Deletes the specified schema. If you enable the `ifExists` parameter, the operation succeeds even if the schema does not exist. Otherwise, a 404 failure is returned if the schema does not exist. if the drop is unsuccessful. + operationId: deleteSchema + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: restrict + in: query + description: |- + Whether to drop the schema if foreign keys exist that reference any tables in the schema. + - `true`: Return a warning about existing foreign key references and don't drop the schema. + - `false`: Drop the schema and all objects in the database, including tables with primary or unique keys that are referenced by foreign keys in other tables. + Default: `false`. + schema: + type: boolean + default: false + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}: + parameters: [] + put: + summary: Create a new, or alters an existing, database. + tags: + - database + description: Creates a new, or alters an existing, database. You must provide the full database definition even when altering an existing database. + operationId: createOrAlterDatabase + parameters: + - name: database_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Database' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}: + parameters: [] + put: + summary: Create a new, or alters an existing, schema. + tags: + - schema + description: Creates a new, or alters an existing, schema. You must provide the full schema definition even when altering an existing schema. + operationId: createOrAlterSchema + parameters: + - $ref: '#/components/parameters/database_name' + - name: schema_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + - name: kind + in: query + description: Type of schema to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). + schema: + type: string + default: '' + deprecated: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + AccountIdentifiers: + type: object + description: Array of unique account identifiers. + properties: + accounts: + type: array + items: + type: string + minLength: 1 + example: + accounts: + - accountName1 + - accountName2 + required: + - accounts + Database: + type: object + description: Snowflake database object. + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time the database was created. + name: + $ref: '#/components/schemas/Identifier' + description: Name of the database. + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + default: PERMANENT + description: Database type, permanent (default) or transient. + is_default: + type: boolean + readOnly: true + description: Whether the database is the default database for a user. + is_current: + type: boolean + readOnly: true + description: Current database for the session. + origin: + type: string + readOnly: true + owner: + type: string + readOnly: true + description: Name of the role that owns the database. + comment: + type: string + description: Optional comment in which to store information related to the database. + options: + type: string + readOnly: true + retention_time: + type: integer + readOnly: true + description: Number of days that historical data is retained for Time Travel. + dropped_on: + type: string + format: date-time + readOnly: true + nullable: true + description: Date and time the database was dropped. + budget: + type: string + readOnly: true + description: Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects. + owner_role_type: + type: string + readOnly: true + description: Type of role that owns the object, either ROLE or DATABASE_ROLE + data_retention_time_in_days: + type: integer + description: Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the database, as well as specifying the default Time Travel retention time for all schemas created in the database. + default_ddl_collation: + type: string + description: Default collation specification for all schemas and tables added to the database. You an override the default at the schema and individual table levels. + log_level: + type: string + description: Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. + max_data_extension_time_in_days: + type: integer + description: Maximum number of days for which Snowflake can extend the data retention period for tables in the database to prevent streams on the tables from becoming stale. + suspend_task_after_num_failures: + type: integer + description: Maximum number of consecutive failed task runs before the current task is suspended automatically. + trace_level: + type: string + description: How trace events are ingested into the event table. Currently, Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. + user_task_managed_initial_warehouse_size: + type: string + description: Size of the compute resources to provision for the first run of the serverless task, before a task history is available for Snowflake to determine an ideal size. + user_task_timeout_ms: + type: integer + description: Time limit, in milliseconds, for a single run of the task before it times out. + serverless_task_min_statement_size: + type: string + description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + serverless_task_max_statement_size: + type: string + description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + required: + - name + DatabaseClone: + type: object + description: Clone database. + properties: + point_of_time: + $ref: '#/components/schemas/PointOfTime' + created_on: + type: string + format: date-time + readOnly: true + description: Date and time the database was created. + name: + $ref: '#/components/schemas/Identifier' + description: Name of the database. + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + default: PERMANENT + description: Database type, permanent (default) or transient. + is_default: + type: boolean + readOnly: true + description: Whether the database is the default database for a user. + is_current: + type: boolean + readOnly: true + description: Current database for the session. + origin: + type: string + readOnly: true + owner: + type: string + readOnly: true + description: Name of the role that owns the database. + comment: + type: string + description: Optional comment in which to store information related to the database. + options: + type: string + readOnly: true + retention_time: + type: integer + readOnly: true + description: Number of days that historical data is retained for Time Travel. + dropped_on: + type: string + format: date-time + readOnly: true + nullable: true + description: Date and time the database was dropped. + budget: + type: string + readOnly: true + description: Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects. + owner_role_type: + type: string + readOnly: true + description: Type of role that owns the object, either ROLE or DATABASE_ROLE + data_retention_time_in_days: + type: integer + description: Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the database, as well as specifying the default Time Travel retention time for all schemas created in the database. + default_ddl_collation: + type: string + description: Default collation specification for all schemas and tables added to the database. You an override the default at the schema and individual table levels. + log_level: + type: string + description: Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. + max_data_extension_time_in_days: + type: integer + description: Maximum number of days for which Snowflake can extend the data retention period for tables in the database to prevent streams on the tables from becoming stale. + suspend_task_after_num_failures: + type: integer + description: Maximum number of consecutive failed task runs before the current task is suspended automatically. + trace_level: + type: string + description: How trace events are ingested into the event table. Currently, Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. + user_task_managed_initial_warehouse_size: + type: string + description: Size of the compute resources to provision for the first run of the serverless task, before a task history is available for Snowflake to determine an ideal size. + user_task_timeout_ms: + type: integer + description: Time limit, in milliseconds, for a single run of the task before it times out. + serverless_task_min_statement_size: + type: string + description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + serverless_task_max_statement_size: + type: string + description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + required: + - name + DatabaseFromShare: + type: object + description: Database from share. + properties: + name: + $ref: '#/components/schemas/Identifier' + description: Name of the database. + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Schema: + type: object + description: Snowflake schema definition. + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time the schema was created. + name: + $ref: '#/components/schemas/Identifier' + description: Name of the schema. + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + default: PERMANENT + description: Schema type, permanent (default) or transient. + is_default: + type: boolean + readOnly: true + description: Default schema for a user. + is_current: + type: boolean + readOnly: true + description: Current schema for the session. + database_name: + type: string + readOnly: true + description: Database that the schema belongs to + owner: + type: string + readOnly: true + description: Name of the role that owns the schema. + comment: + type: string + description: Optional comment in which to store information related to the schema. + options: + type: string + readOnly: true + managed_access: + type: boolean + default: false + description: Whether this schema is a managed access schema that centralizes privilege management with the schema owner. + retention_time: + type: integer + readOnly: true + description: Number of days that historical data is retained for Time Travel. + dropped_on: + type: string + format: date-time + readOnly: true + nullable: true + description: Date and time the schema was dropped. + owner_role_type: + type: string + readOnly: true + description: Type of role that owns the object, either `ROLE` or `DATABASE_ROLE`. + budget: + type: string + readOnly: true + description: Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects. + data_retention_time_in_days: + type: integer + description: Number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema + default_ddl_collation: + type: string + description: Specifies a default collation specification for all tables added to the schema. You an override the default at the schema and individual table levels. + log_level: + type: string + description: Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. + pipe_execution_paused: + type: boolean + description: Whether pipe execution is paused. + max_data_extension_time_in_days: + type: integer + description: Maximum number of days for which Snowflake can extend the data retention period for tables in the schema to prevent streams on the tables from becoming stale. + suspend_task_after_num_failures: + type: integer + description: Specifies the number of consecutive failed task runs after which the current task is suspended automatically. + trace_level: + type: string + description: How trace events are ingested into the event table. Currently, Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. + user_task_managed_initial_warehouse_size: + type: string + description: Size of the compute resources to provision for the first run of the serverless task, before a task history is available for Snowflake to determine an ideal size. + user_task_timeout_ms: + type: integer + description: Time limit, in milliseconds, for a single run of the task before it times out. + serverless_task_min_statement_size: + type: string + description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + serverless_task_max_statement_size: + type: string + description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + required: + - name + SchemaClone: + type: object + description: Schema clone definition. + properties: + point_of_time: + $ref: '#/components/schemas/PointOfTime' + created_on: + type: string + format: date-time + readOnly: true + description: Date and time the schema was created. + name: + $ref: '#/components/schemas/Identifier' + description: Name of the schema. + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + default: PERMANENT + description: Schema type, permanent (default) or transient. + is_default: + type: boolean + readOnly: true + description: Default schema for a user. + is_current: + type: boolean + readOnly: true + description: Current schema for the session. + database_name: + type: string + readOnly: true + description: Database that the schema belongs to + owner: + type: string + readOnly: true + description: Name of the role that owns the schema. + comment: + type: string + description: Optional comment in which to store information related to the schema. + options: + type: string + readOnly: true + managed_access: + type: boolean + default: false + description: Whether this schema is a managed access schema that centralizes privilege management with the schema owner. + retention_time: + type: integer + readOnly: true + description: Number of days that historical data is retained for Time Travel. + dropped_on: + type: string + format: date-time + readOnly: true + nullable: true + description: Date and time the schema was dropped. + owner_role_type: + type: string + readOnly: true + description: Type of role that owns the object, either `ROLE` or `DATABASE_ROLE`. + budget: + type: string + readOnly: true + description: Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects. + data_retention_time_in_days: + type: integer + description: Number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema + default_ddl_collation: + type: string + description: Specifies a default collation specification for all tables added to the schema. You an override the default at the schema and individual table levels. + log_level: + type: string + description: Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. + pipe_execution_paused: + type: boolean + description: Whether pipe execution is paused. + max_data_extension_time_in_days: + type: integer + description: Maximum number of days for which Snowflake can extend the data retention period for tables in the schema to prevent streams on the tables from becoming stale. + suspend_task_after_num_failures: + type: integer + description: Specifies the number of consecutive failed task runs after which the current task is suspended automatically. + trace_level: + type: string + description: How trace events are ingested into the event table. Currently, Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. + user_task_managed_initial_warehouse_size: + type: string + description: Size of the compute resources to provision for the first run of the serverless task, before a task history is available for Snowflake to determine an ideal size. + user_task_timeout_ms: + type: integer + description: Time limit, in milliseconds, for a single run of the task before it times out. + serverless_task_min_statement_size: + type: string + description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + serverless_task_max_statement_size: + type: string + description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. + required: + - name + ListDatabasesResponse: + type: object + properties: + databases: + type: array + items: + $ref: '#/components/schemas/Database' + ListSchemasResponse: + type: object + properties: + schemas: + type: array + items: + $ref: '#/components/schemas/Schema' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + databases: + id: snowflake.databases.databases + name: databases + title: Databases + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.databases + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListDatabasesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"databases\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases/post' + response: + mediaType: application/json + openAPIDocKey: '200' + from_share: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases:from-share/post' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + enable_replication: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:enable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + disable_replication: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:disable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + refresh_replication: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1replication:refresh/post' + response: + mediaType: application/json + openAPIDocKey: '200' + enable_failover: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:enable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + disable_failover: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:disable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + primary_failover: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{name}~1failover:primary/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/databases/methods/get' + - $ref: '#/components/x-stackQL-resources/databases/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/databases/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/databases/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/databases/methods/create_or_alter' + schemas: + id: snowflake.databases.schemas + name: schemas + title: Schemas + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.schemas + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListSchemasResponse' + transform: + body: |- + {{- $wrapped := printf "{\"schemas\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas/post' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/schemas/methods/get' + - $ref: '#/components/x-stackQL-resources/schemas/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/schemas/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/schemas/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/schemas/methods/create_or_alter' +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml b/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml deleted file mode 100644 index fb5415eb..00000000 --- a/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml +++ /dev/null @@ -1,1436 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Dynamic Table API - description: The Snowflake Dynamic Table API is a REST API that you can use to access, - update, and perform certain actions on Dynamic Tables resource in a Snowflake - database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables: - get: - summary: List dynamic tables - tags: - - dynamic-table - description: Lists the dynamic tables under the database and schema. - operationId: listDynamicTables - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: deep - description: Optionally includes dependency information of the dynamic table. - in: query - required: false - schema: - type: boolean - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DynamicTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a dynamic table - tags: - - dynamic-table - description: Create a dynamic table, with standard create modifiers as query - parameters. See the Dynamic Table component definition for what is required - to be provided in the request body. - operationId: createDynamicTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DynamicTable' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}: - get: - summary: Fetch a dynamic table. - tags: - - dynamic-table - description: Fetch a Dynamic Table. - operationId: fetchDynamicTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/DynamicTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a dynamic table - tags: - - dynamic-table - description: Delete a dynamic table with the given name. If ifExists is used, - the operation will succeed even if the object does not exist. Otherwise, there - will be a failure if the drop is unsuccessful. - operationId: deleteDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:clone: - post: - summary: Clone dynamic table - tags: - - dynamic-table - description: Create a new dynamic table by cloning from the specified resource - operationId: cloneDynamicTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: targetDatabase - in: query - description: Database of the newly created dynamic table. Defaults to the - source table's database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the newly created dynamic table. Defaults to the source - table's schema. - schema: - $ref: '#/components/schemas/Identifier' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DynamicTableClone' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:undrop: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - summary: Undrop a dynamic table - tags: - - dynamic-table - description: Undrop specified dynamic table - operationId: undropDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:suspend: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Suspend refreshes on the dynamic table - tags: - - dynamic-table - description: Suspend refreshes on the dynamic table - operationId: suspendDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:resume: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Resume refreshes on the dynamic table - tags: - - dynamic-table - description: Resume refreshes on the dynamic table - operationId: resumeDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:refresh: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Refresh the dynamic table - tags: - - dynamic-table - description: Specifies that the dynamic table should be manually refreshed - operationId: refreshDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:suspend-recluster: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Suspend recluster of a dynamic table - tags: - - dynamic-table - description: Suspend recluster of a dynamic table - operationId: suspendReclusterDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:resume-recluster: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Resume recluster of a dynamic table - tags: - - dynamic-table - description: Resume recluster of a dynamic table - operationId: resumeReclusterDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:swap-with: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: targetName - description: The name of the target dynamic table to be swapped with. - in: query - required: true - schema: - $ref: '#/components/schemas/Identifier' - - name: targetDatabase - in: query - description: Database of the target dynamic table. Defaults to the source - table's database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the target dynamic table. Defaults to the source table's - schema. - schema: - $ref: '#/components/schemas/Identifier' - summary: Swap with another dynamic table - tags: - - dynamic-table - description: Swap with another dynamic table - operationId: swapWithDynamicTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - DynamicTable: - type: object - description: A Snowflake dynamic table object. - properties: - name: - type: string - description: Specifies the name for the dynamic table, must be unique for - the schema in which the dynamic table is created - kind: - type: string - enum: - - PERMANENT - - TRANSIENT - default: PERMANENT - description: Specifies the dynamic table type, permanent (default) or transient. - columns: - type: array - items: - $ref: '#/components/schemas/DynamicTableColumn' - target_lag: - $ref: '#/components/schemas/TargetLag' - refresh_mode: - type: string - description: Specifies the refresh type for the dynamic table - enum: - - AUTO - - FULL - - INCREMENTAL - initialize: - type: string - description: Specifies the behavior of the initial refresh of the dynamic - table - enum: - - ON_CREATE - - ON_SCHEDULE - warehouse: - type: string - description: Specifies the name of the warehouse that provides the compute - resources for refreshing the dynamic table - example: test_wh - cluster_by: - type: array - description: Specifies one or more columns or column expressions in the - dynamic table as the clustering key - items: - type: string - query: - type: string - description: Specifies the query whose results the dynamic table should - contain - example: SELECT * FROM foo - data_retention_time_in_days: - type: integer - description: Specifies the retention period for the dynamic table so that - Time Travel actions (SELECT, CLONE) can be performed on historical data - in the dynamic table - max_data_extension_time_in_days: - type: integer - description: Specifies the retention period for the dynamic table so that - Time Travel actions (SELECT, CLONE) can be performed on historical data - in the dynamic table - comment: - type: string - description: Specifies a comment for the dynamic table. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the dynamic table was created. - database_name: - type: string - readOnly: true - description: Database in which the dynamic table is stored - schema_name: - type: string - readOnly: true - description: Schema in which the dynamic table is stored - rows: - type: integer - format: int64 - readOnly: true - description: Number of rows in the dynamic table. - bytes: - type: integer - format: int64 - readOnly: true - description: Number of bytes that will be scanned if the entire table is - scanned in a query. Note that this number may be different than the number - of actual physical bytes stored on-disk for the table - scheduling_state: - type: string - enum: - - RUNNING - - SUSPENDED - readOnly: true - description: Scheduling state (RUNNING or SUSPENDED) - automatic_clustering: - type: boolean - readOnly: true - description: If Automatic Clustering is enabled for your account, specifies - whether it is explicitly enabled or disabled for the dynamic table. - owner: - type: string - readOnly: true - description: Role that owns the table - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the object. - budget: - type: string - readOnly: true - description: Name of the budget if the object is monitored by a budget - required: - - name - - target_lag - - warehouse - - query - DynamicTableColumn: - type: object - description: A column in the dynamic table - properties: - name: - type: string - description: Column name - datatype: - type: string - description: The data type for the column - comment: - type: string - description: Specifies a comment for the column - required: - - name - DynamicTableClone: - type: object - description: Clone dynamic table - properties: - name: - type: string - description: Specifies the name for the dynamic table, must be unique for - the schema in which the dynamic table is created - target_lag: - $ref: '#/components/schemas/TargetLag' - warehouse: - type: string - description: Specifies the name of the warehouse that provides the compute - resources for refreshing the dynamic table - point_of_time: - $ref: '#/components/schemas/PointOfTime' - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - dynamic_tables: - methods: - list_dynamic_tables: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - clone_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - refresh_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:refresh/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_recluster_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:suspend-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_recluster_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:resume-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - swap_with_dynamic_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:swap-with/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/list_dynamic_tables' - - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/fetch_dynamic_table' - insert: - - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/create_dynamic_table' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/delete_dynamic_table' - replace: [] - id: snowflake.dynamic_table.dynamic_tables - name: dynamic_tables - title: Dynamic Tables -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/event-table.yaml b/providers/src/snowflake/v00.00.00000/services/event-table.yaml deleted file mode 100644 index e06fded9..00000000 --- a/providers/src/snowflake/v00.00.00000/services/event-table.yaml +++ /dev/null @@ -1,1038 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Event Table API - description: The Snowflake Event Table API is a REST API that you can use to access, - update, and perform certain actions on Event Table resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables: - get: - summary: List event tables - tags: - - event-table - description: List event tables - operationId: listEventTables - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/EventTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create an event table - tags: - - event-table - description: Create an event table - operationId: createEventTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EventTable' - /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables/{name}: - get: - summary: Fetch an event table - tags: - - event-table - description: Fetch an event table - operationId: fetchEventTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/EventTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete an event table - tags: - - event-table - description: Delete an event table - operationId: deleteEventTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables/{name}:rename: - post: - summary: Rename the event table - tags: - - event-table - description: Rename the event table - operationId: renameEventTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: targetName - description: Specify the name of the target resource to be renamed to. - in: query - required: true - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - EventTable: - type: object - description: A Snowflake event table - properties: - name: - type: string - description: Name of the event table - cluster_by: - type: array - items: - type: string - description: Cluster key column(s) or expression - data_retention_time_in_days: - type: integer - description: number of days to retain the old version of deleted/updated - data - max_data_extension_time_in_days: - type: integer - description: Maximum number of days to extend data retention beyond the - retention period to prevent a stream becoming stale. - change_tracking: - type: boolean - description: True if change tracking is enabled, allowing streams and CHANGES - to be used on the entity. - default_ddl_collation: - type: string - description: Collation that is used for all the new columns created by the - DDL statements (if not specified) - comment: - type: string - description: user comment associated to an object in the dictionary - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the event table was created. - database_name: - type: string - readOnly: true - description: Database in which the event table is stored - schema_name: - type: string - readOnly: true - description: Schema in which the event table is stored - owner: - type: string - readOnly: true - description: Role that owns the event table - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the event table - rows: - type: integer - format: int64 - readOnly: true - description: Number of rows in the table. - bytes: - type: integer - format: int64 - readOnly: true - description: Number of bytes that will be scanned if the entire table is - scanned in a query.Note that this number may be different than the number - of actual physical bytes stored on-disk for the table - automatic_clustering: - type: boolean - readOnly: true - description: If Automatic Clustering is enabled for your account, specifies - whether it is explicitly enabled or disabled for the table. - search_optimization: - type: boolean - readOnly: true - description: If ON, the table has the search optimization service enabled - search_optimization_progress: - type: integer - format: int64 - readOnly: true - description: Percentage of the table that has been optimized for search - search_optimization_bytes: - type: integer - format: int64 - readOnly: true - description: Number of additional bytes of storage that the search optimization - service consumes for this table - columns: - type: array - items: - $ref: '#/components/schemas/EventTableColumn' - readOnly: true - required: - - name - EventTableColumn: - type: object - properties: - name: - type: string - description: Column name - datatype: - type: string - description: The data type for the column - nullable: - type: boolean - description: Specifies that the column does allow NULL values or not - default: - type: string - description: Specifies whether a default value is automatically inserted - in the column if a value is not explicitly specified via an INSERT or - CREATE TABLE AS SELECT statement - primary_key: - type: boolean - description: A primary key is the column or columns that contain values - that uniquely identify each row in a table - unique_key: - type: boolean - description: Unique keys are columns in a table that uniquely identify items - in the rows. This sounds a lot like a primary key, but the main difference - is that unique keys can have NULL values. - check: - type: string - description: '' - expression: - type: string - description: '' - comment: - type: string - description: Specifies a comment for the column - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - event_tables: - methods: - list_event_tables: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_event_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_event_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_event_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - rename_event_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}:rename/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/event_tables/methods/list_event_tables' - - $ref: '#/components/x-stackQL-resources/event_tables/methods/fetch_event_table' - insert: - - $ref: '#/components/x-stackQL-resources/event_tables/methods/create_event_table' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/event_tables/methods/delete_event_table' - replace: [] - id: snowflake.event_table.event_tables - name: event_tables - title: Event Tables -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/external-volume.yaml b/providers/src/snowflake/v00.00.00000/services/external-volume.yaml deleted file mode 100644 index 07b5987a..00000000 --- a/providers/src/snowflake/v00.00.00000/services/external-volume.yaml +++ /dev/null @@ -1,1053 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake External Volume API - description: The Snowflake External Volume API is a REST API that you can use to - access, update, and perform certain actions on External Volume resource in a Snowflake - database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/external-volumes: - get: - summary: List external volumes - tags: - - external-volume - description: List external volumes - operationId: listExternalVolumes - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ExternalVolume' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create an external volume - tags: - - external-volume - description: Create an external volume - operationId: createExternalVolume - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalVolume' - /api/v2/external-volumes/{name}: - get: - summary: Fetch an external volume - tags: - - external-volume - description: Fetch an external volume - operationId: fetchExternalVolume - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalVolume' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete an external volume - tags: - - external-volume - description: Delete an external volume - operationId: deleteExternalVolume - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/external-volumes/{name}:undrop: - post: - summary: Undrop an external volume - tags: - - external-volume - description: Undrop an external volume - operationId: undropExternalVolume - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - ExternalVolume: - type: object - description: A Snowflake external volume - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: String that specifies the identifier (the name) for the external - volume; must be unique in your account. - storage_locations: - type: array - items: - $ref: '#/components/schemas/StorageLocation' - description: Set of named cloud storage locations in different regions and, - optionally, cloud platforms. - allow_writes: - type: boolean - description: Specifies whether write operations are allowed for the external - volume; must be set to TRUE for Iceberg tables that use Snowflake as the - catalog. - comment: - type: string - description: String (literal) that specifies a comment for the external - volume. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the external volume was created. - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the external volume - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the external volume - required: - - name - - storage_locations - StorageLocation: - type: object - properties: - name: - type: string - description: '' - storage_provider: - type: string - enum: - - S3 - - S3GOV - - GCS - - AZURE - description: Specifies the cloud storage provider that stores your data - files. - required: - - name - - storage_provider - discriminator: - propertyName: storage_provider - mapping: - S3: StorageLocationS3 - S3GOV: StorageLocationS3Gov - GCS: StorageLocationGcs - AZURE: StorageLocationAzure - StorageLocationS3: - allOf: - - $ref: '#/components/schemas/StorageLocation' - properties: - storage_aws_role_arn: - type: string - description: Specifies the case-sensitive Amazon Resource Name (ARN) of - the AWS identity and access management (IAM) role that grants privileges - on the S3 bucket containing your data files. - storage_base_url: - type: string - description: Specifies the base URL for your cloud storage location. - storage_aws_external_id: - type: string - description: Optionally specifies an external ID that Snowflake uses to - establish a trust relationship with AWS. - encryption: - $ref: '#/components/schemas/Encryption' - description: Specifies the properties needed to encrypt data on the external - volume. - required: - - storage_aws_role_arn - - storage_base_url - Encryption: - type: object - properties: - type: - type: string - enum: - - NONE - - AWS_SSE_S3 - - AWS_SSE_KMS - - GCS_SSE_KMS - description: Specifies the encryption type used. - kms_key_id: - type: string - description: Specifies the ID for the Cloud KMS-managed key used to encrypt - files written to the bucket. - required: - - type - StorageLocationS3Gov: - allOf: - - $ref: '#/components/schemas/StorageLocation' - properties: - storage_aws_role_arn: - type: string - description: Specifies the case-sensitive Amazon Resource Name (ARN) of - the AWS identity and access management (IAM) role that grants privileges - on the S3 bucket containing your data files. - storage_base_url: - type: string - description: Specifies the base URL for your cloud storage location. - storage_aws_external_id: - type: string - description: Optionally specifies an external ID that Snowflake uses to - establish a trust relationship with AWS. - encryption: - $ref: '#/components/schemas/Encryption' - description: Specifies the properties needed to encrypt data on the external - volume. - required: - - storage_aws_role_arn - - storage_base_url - StorageLocationGcs: - allOf: - - $ref: '#/components/schemas/StorageLocation' - properties: - storage_base_url: - type: string - description: Specifies the base URL for your cloud storage location. - encryption: - $ref: '#/components/schemas/Encryption' - description: Specifies the properties needed to encrypt data on the external - volume. - required: - - storage_base_url - StorageLocationAzure: - allOf: - - $ref: '#/components/schemas/StorageLocation' - properties: - azure_tenant_id: - type: string - description: Specifies the ID for your Office 365 tenant that the allowed - and blocked storage accounts belong to. - storage_base_url: - type: string - description: Specifies the base URL for your cloud storage location. - required: - - azure_tenant_id - - storage_base_url - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - external_volumes: - methods: - list_external_volumes: - operation: - $ref: '#/paths/~1api~1v2~1external-volumes/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_external_volume: - operation: - $ref: '#/paths/~1api~1v2~1external-volumes/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_external_volume: - operation: - $ref: '#/paths/~1api~1v2~1external-volumes~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_external_volume: - operation: - $ref: '#/paths/~1api~1v2~1external-volumes~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_external_volume: - operation: - $ref: '#/paths/~1api~1v2~1external-volumes~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/external_volumes/methods/list_external_volumes' - - $ref: '#/components/x-stackQL-resources/external_volumes/methods/fetch_external_volume' - insert: - - $ref: '#/components/x-stackQL-resources/external_volumes/methods/create_external_volume' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/external_volumes/methods/delete_external_volume' - replace: [] - id: snowflake.external_volume.external_volumes - name: external_volumes - title: External Volumes -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/function.yaml b/providers/src/snowflake/v00.00.00000/services/function.yaml deleted file mode 100644 index 14837326..00000000 --- a/providers/src/snowflake/v00.00.00000/services/function.yaml +++ /dev/null @@ -1,998 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Function API - description: The Snowflake Function API is a REST API that allows caller to create, - execute and drop functions in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/functions: - get: - summary: List Functions - tags: - - function - description: Lists the user functions under the database and schema. - operationId: listFunctions - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Function' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a Function - tags: - - function - description: Create a function. - operationId: createFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Function' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/functions/{nameWithArgs}: - get: - summary: Fetch a Function. - tags: - - function - description: Fetch a Function using the describe command output. - operationId: fetchFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Function' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - - $ref: '#/components/parameters/ifExists' - summary: Delete a function - tags: - - function - description: Delete a function with the given name and args. - operationId: deleteFunction - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/functions/{name}:execute: - post: - summary: Execute a Function. - tags: - - function - description: Execute a Function. - operationId: executeFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FunctionArguments' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: object - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Function: - type: object - description: A Snowflake function - discriminator: - propertyName: function_type - mapping: - service-function: '#/components/schemas/ServiceFunction' - properties: - function_type: - type: string - default: service-function - name: - type: string - description: Specifies the name for the function, must be unique for the - schema in which the function is created - arguments: - type: array - items: - $ref: '#/components/schemas/FunctionArgument' - returns: - type: string - description: Specifies the type for the function return value. - enum: - - FIXED - - INT - - REAL - - NUMBER - - TEXT - - BOOLEAN - - DATE - - TIME - - TIMESTAMP_TZ - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - default: TEXT - max_batch_rows: - type: integer - description: Specifies the max rows for batch operation. - created_on: - type: string - format: date-time - description: Date and time when the function was created. - signature: - type: string - description: Function's arguments. - language: - type: string - description: Function's language. - body: - type: string - description: Function's body. - required: - - name - - arguments - FunctionArgument: - type: object - description: An argument of function - properties: - name: - type: string - description: Argument's name - datatype: - description: Argument's type - type: string - enum: - - FIXED - - INT - - REAL - - NUMBER - - TEXT - - BOOLEAN - - DATE - - TIME - - TIMESTAMP_TZ - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - default: TEXT - value: - description: Argument's value - FunctionArguments: - type: array - items: - $ref: '#/components/schemas/FunctionArgument' - ServiceFunction: - allOf: - - $ref: '#/components/schemas/Function' - description: Service based function - required: - - service - - endpoint - - path - properties: - service: - $ref: '#/components/schemas/Identifier' - description: Service's name - service_database: - $ref: '#/components/schemas/Identifier' - description: Service's database name - service_schema: - $ref: '#/components/schemas/Identifier' - description: Service's schema name - endpoint: - type: string - description: Function's endpoint - path: - type: string - description: Function's path - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - functions: - methods: - list_functions: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{nameWithArgs}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{nameWithArgs}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - execute_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{name}:execute/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/functions/methods/list_functions' - - $ref: '#/components/x-stackQL-resources/functions/methods/fetch_function' - insert: - - $ref: '#/components/x-stackQL-resources/functions/methods/create_function' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/functions/methods/delete_function' - replace: [] - id: snowflake.function.functions - name: functions - title: Functions -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/functions.yaml b/providers/src/snowflake/v00.00.00000/services/functions.yaml new file mode 100644 index 00000000..7440f61e --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/functions.yaml @@ -0,0 +1,2645 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Functions API + description: >- + The Snowflake REST API surface for the functions service, combining the + vendor spec(s): function.yaml, procedure.yaml, user-defined-function.yaml. + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases/{database_name}/schemas/{schema_name}/functions: + get: + summary: List Functions + tags: + - function + description: Lists the user functions under the database and schema. + operationId: listFunctions + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListFunctionsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a Function + tags: + - function + description: Create a function. + operationId: createFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Function' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/functions/{name_with_args}: + get: + summary: Fetch a Function. + tags: + - function + description: Fetch a Function using the describe command output. + operationId: fetchFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Function' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + - $ref: '#/components/parameters/ifExists' + summary: Delete a function + tags: + - function + description: Delete a function with the given name and args. + operationId: deleteFunction + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/functions/{name}:execute: + post: + summary: Execute a Function. + tags: + - function + description: Execute a Function. + operationId: executeFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionArguments' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + type: string + description: (opaque JSON object) + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/procedures: + get: + summary: List procedures + tags: + - procedure + description: List procedures + operationId: listProcedures + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListProceduresResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a procedure + tags: + - procedure + description: Create a procedure + operationId: createProcedure + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Procedure' + /api/v2/databases/{database_name}/schemas/{schema_name}/procedures/{name_with_args}: + get: + summary: Fetch a procedure + tags: + - procedure + description: Fetch a procedure + operationId: fetchProcedure + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Procedure' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a procedure + tags: + - procedure + description: Delete a procedure + operationId: deleteProcedure + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/procedures/{name_with_args}:call: + post: + summary: Call a procedure + tags: + - procedure + description: Call a procedure + operationId: callProcedure + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/CallProcedureResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CallArgumentList' + /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions: + post: + summary: Create a UDF + tags: + - user-defined-function + description: Create a UDF + operationId: createUserDefinedFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UserDefinedFunction' + get: + summary: List UDFs + tags: + - user-defined-function + description: List UDFs + operationId: listUserDefinedFunctions + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListUserDefinedFunctionsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions/{name_with_args}: + get: + summary: Fetch a UDF + tags: + - user-defined-function + description: Fetch a UDF + operationId: fetchUserDefinedFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/UserDefinedFunction' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a UDF + tags: + - user-defined-function + description: Delete a UDF + operationId: deleteUserDefinedFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions/{name_with_args}:rename: + post: + summary: Rename a UDF + tags: + - user-defined-function + description: Rename a UDF + operationId: renameUserDefinedFunction + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name_with_args' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + Function: + type: object + description: A Snowflake function + discriminator: + propertyName: function_type + mapping: + service-function: '#/components/schemas/ServiceFunction' + properties: + function_type: + type: string + default: service-function + name: + type: string + description: >- + Specifies the name for the function, must be unique for the schema + in which the function is created + arguments: + type: array + items: + $ref: '#/components/schemas/FunctionArgument' + returns: + type: string + description: Specifies the type for the function return value. + default: TEXT + max_batch_rows: + type: integer + description: Specifies the max rows for batch operation. + created_on: + type: string + format: date-time + description: Date and time when the function was created. + signature: + type: string + description: Function's arguments. + language: + type: string + description: Function's language. + body: + type: string + description: Function's body. + required: + - name + - arguments + FunctionArgument: + type: object + description: An argument of function + properties: + name: + type: string + description: Argument's name + datatype: + description: Argument's type + type: string + default: TEXT + value: + description: Argument's value + FunctionArguments: + type: array + items: + $ref: '#/components/schemas/FunctionArgument' + ServiceFunction: + description: Service based function + required: + - service + - endpoint + - path + - name + - arguments + properties: + service: + $ref: '#/components/schemas/Identifier' + description: Service's name + service_database: + $ref: '#/components/schemas/Identifier' + description: Service's database name + service_schema: + $ref: '#/components/schemas/Identifier' + description: Service's schema name + endpoint: + type: string + description: Function's endpoint + path: + type: string + description: Function's path + function_type: + type: string + default: service-function + name: + type: string + description: >- + Specifies the name for the function, must be unique for the schema + in which the function is created + arguments: + type: array + items: + $ref: '#/components/schemas/FunctionArgument' + returns: + type: string + description: Specifies the type for the function return value. + default: TEXT + max_batch_rows: + type: integer + description: Specifies the max rows for batch operation. + created_on: + type: string + format: date-time + description: Date and time when the function was created. + signature: + type: string + description: Function's arguments. + language: + type: string + description: Function's language. + body: + type: string + description: Function's body. + type: object + discriminator: + propertyName: function_type + mapping: + service-function: '#/components/schemas/ServiceFunction' + Identifier: + type: string + description: >- + A Snowflake object identifier. If the identifier contains spaces or + special characters, the entire string must be enclosed in double quotes. + Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: >- + Error code, same as `code` above. This property has been deprecated + and will be removed in a future release, but is temporarily + supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: >- + Opaque result ID used for checking for request completion through + one or more subsequent completion check operations. + example: + code: '392604' + message: >- + Request execution in progress. Use the provided location header or + result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: >- + The difference in seconds from the current time in the form -N where + N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: >- + Query ID of a statement to use as the reference point (e.g. + 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: >- + Snowflake parameter defined at the system, account, user, session, or + object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: >- + Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or + STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Procedure: + type: object + description: A Snowflake procedure + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the procedure + execute_as: + type: string + enum: + - CALLER + - OWNER + description: What permissions should the procedure execution be called with + is_secure: + type: boolean + description: Specifies whether the function/procedure is secure or not + arguments: + type: array + items: + $ref: '#/components/schemas/Argument' + description: List of arguments for the function/procedure + return_type: + $ref: '#/components/schemas/ReturnType' + description: >- + Return type of the function/procedure. Should be a SQL data type or + a table + language_config: + $ref: '#/components/schemas/FunctionLanguage' + description: Language that the function/procedure is written in + comment: + type: string + description: Specifies a comment for the function/procedure + body: + type: string + description: Function/procedure definition + created_on: + type: string + format: date-time + readOnly: true + description: The date and time when the function/procedure was created + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The name of the schema in which the function/procedure exists. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The name of the database in which the function/procedure exists. + min_num_arguments: + type: integer + readOnly: true + description: The minimum number of arguments + max_num_arguments: + type: integer + readOnly: true + description: The maximum number of arguments + owner: + type: string + readOnly: true + description: Role that owns the function/procedure + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the function/procedure + is_builtin: + type: boolean + readOnly: true + description: If the function/procedure is built-in or not (user-defined) + required: + - name + - arguments + - return_type + - language_config + - body + Argument: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Argument name + datatype: + type: string + description: Argument data type + default_value: + type: string + description: Default value of the argument + required: + - name + - datatype + ReturnType: + type: object + properties: + type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Type of the return, can be either DATATYPE or TABLE + required: + - type + discriminator: + propertyName: type + mapping: + DATATYPE: ReturnDataType + TABLE: ReturnTable + ReturnDataType: + properties: + datatype: + type: string + description: Return data type + nullable: + type: boolean + description: Argument null return acceptance criteria + type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Type of the return, can be either DATATYPE or TABLE + required: + - datatype + - type + type: object + discriminator: + propertyName: type + mapping: + DATATYPE: ReturnDataType + TABLE: ReturnTable + ReturnTable: + properties: + column_list: + type: array + items: + $ref: '#/components/schemas/ColumnType' + description: List of table columns to return + type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Type of the return, can be either DATATYPE or TABLE + type: object + required: + - type + discriminator: + propertyName: type + mapping: + DATATYPE: ReturnDataType + TABLE: ReturnTable + ColumnType: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Argument name + datatype: + type: string + description: Argument data type + required: + - name + - datatype + FunctionLanguage: + type: object + properties: + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - language + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + BaseLanguage: + properties: + runtime_version: + type: string + description: Runtime version of the function's/procedure's specified language + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + JavaFunction: + properties: + external_access_integrations: + type: array + items: + type: string + description: >- + List of external access integrations attached to this + function/procedure + secrets: + type: object + additionalProperties: + type: string + description: Secrets to be used with this function/procedure for external access + target_path: + type: string + description: >- + Specifies where Snowflake should write the compiled code for inline + procedures + runtime_version: + type: string + description: Runtime version of the function's/procedure's specified language + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + PythonFunction: + properties: + external_access_integrations: + type: array + items: + type: string + description: >- + List of external access integrations attached to this + function/procedure + secrets: + type: object + additionalProperties: + type: string + description: Secrets to be used with this function/procedure for external access + runtime_version: + type: string + description: Runtime version of the function's/procedure's specified language + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + ScalaFunction: + properties: + target_path: + type: string + description: >- + Specifies where Snowflake should write the compiled code for inline + function/procedures + runtime_version: + type: string + description: Runtime version of the function's/procedure's specified language + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + JavaScriptFunction: + type: object + properties: + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - language + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + SQLFunction: + type: object + properties: + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + required: + - language + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + CallArgumentList: + type: object + properties: + call_arguments: + type: array + items: + $ref: '#/components/schemas/CallArgument' + description: Call Argument list + required: + - call_arguments + CallArgument: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the call argument + datatype: + type: string + description: Call argument data type + value: + description: Value of the call argument + required: + - name + - datatype + - value + UserDefinedFunction: + type: object + description: A snowflake UDF + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: The name of the UDF + is_temporary: + type: boolean + description: Specifies whether the UDF is temporary or not + is_aggregate: + type: boolean + description: >- + Specifies whether the UDF is an aggregate function. Applicable only + for Python language type + is_memoizable: + type: boolean + description: >- + Indicates whether the function is memoizable. Applicable only for + Python language type. + is_table_function: + type: boolean + readOnly: true + description: True if the UDF is a table function; false otherwise. + valid_for_clustering: + type: boolean + readOnly: true + description: True if the UDF is valid for clustering; false otherwise. + is_secure: + type: boolean + description: Specifies whether the function/procedure is secure or not + arguments: + type: array + items: + $ref: '#/components/schemas/Argument' + description: List of arguments for the function/procedure + return_type: + $ref: '#/components/schemas/ReturnType' + description: >- + Return type of the function/procedure. Should be a SQL data type or + a table + language_config: + $ref: '#/components/schemas/FunctionLanguage_user_defined_function' + description: Language that the function/procedure is written in + comment: + type: string + description: Specifies a comment for the function/procedure + body: + type: string + description: Function/procedure definition + created_on: + type: string + format: date-time + readOnly: true + description: The date and time when the function/procedure was created + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The name of the schema in which the function/procedure exists. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The name of the database in which the function/procedure exists. + min_num_arguments: + type: integer + readOnly: true + description: The minimum number of arguments + max_num_arguments: + type: integer + readOnly: true + description: The maximum number of arguments + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the function/procedure + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the function/procedure + is_builtin: + type: boolean + readOnly: true + description: If the function/procedure is built-in or not (user-defined) + required: + - name + - arguments + - return_type + - language_config + FunctionLanguage_user_defined_function: + type: object + properties: + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + is_volatile: + type: boolean + description: |2- + Specifies the behavior of the UDF when returning results. This Field is deprecated for Procedure. + + If true, UDF might return different values for different rows, even for the same input. + This field is deprecated for Procedure. + + If false, UDF assumes that the function, when called with the same inputs, will always return the same result. + This guarantee is not checked. Specifying IMMUTABLE for a UDF that returns different values for the same input will result in undefined behavior. + + required: + - language + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + BaseLanguage_user_defined_function: + properties: + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + is_volatile: + type: boolean + description: |2- + Specifies the behavior of the UDF when returning results. This Field is deprecated for Procedure. + + If true, UDF might return different values for different rows, even for the same input. + This field is deprecated for Procedure. + + If false, UDF assumes that the function, when called with the same inputs, will always return the same result. + This guarantee is not checked. Specifying IMMUTABLE for a UDF that returns different values for the same input will result in undefined behavior. + + required: + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + JavaFunction_user_defined_function: + properties: + external_access_integrations: + type: array + items: + type: string + description: >- + List of external access integrations attached to this + function/procedure + secrets: + type: object + additionalProperties: + type: string + description: Secrets to be used with this function/procedure for external access + target_path: + type: string + description: >- + Specifies where Snowflake should write the compiled code for inline + procedures + runtime_version: + type: string + description: |- + Specifies the Java JDK runtime version to use. + The supported versions of Java are 11.x and 17.x (Preview support) + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + is_volatile: + type: boolean + description: |2- + Specifies the behavior of the UDF when returning results. This Field is deprecated for Procedure. + + If true, UDF might return different values for different rows, even for the same input. + This field is deprecated for Procedure. + + If false, UDF assumes that the function, when called with the same inputs, will always return the same result. + This guarantee is not checked. Specifying IMMUTABLE for a UDF that returns different values for the same input will result in undefined behavior. + + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + PythonFunction_user_defined_function: + properties: + external_access_integrations: + type: array + items: + type: string + description: >- + List of external access integrations attached to this + function/procedure + secrets: + type: object + additionalProperties: + type: string + description: Secrets to be used with this function/procedure for external access + runtime_version: + type: string + description: >- + Specifies the Python version to use. The supported versions of + Python are: + * 3.8 + * 3.9 + * 3.10 + * 3.11 + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + is_volatile: + type: boolean + description: |2- + Specifies the behavior of the UDF when returning results. This Field is deprecated for Procedure. + + If true, UDF might return different values for different rows, even for the same input. + This field is deprecated for Procedure. + + If false, UDF assumes that the function, when called with the same inputs, will always return the same result. + This guarantee is not checked. Specifying IMMUTABLE for a UDF that returns different values for the same input will result in undefined behavior. + + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + ScalaFunction_user_defined_function: + properties: + target_path: + type: string + description: >- + Specifies where Snowflake should write the compiled code for inline + function/procedures + runtime_version: + type: string + description: >- + Specifies the Scala runtime version to use. The supported versions + of Scala are: 2.12 + packages: + type: array + items: + type: string + description: Packages to include with the function/procedure + imports: + type: array + items: + type: string + description: List of imports + handler: + type: string + description: Fully qualified method name including the package and the class + language: + type: string + description: >- + Language that the function/procedure is written in. Possible values + include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL + called_on_null_input: + type: boolean + description: Decide if the function/procedure can receive null input + is_volatile: + type: boolean + description: |2- + Specifies the behavior of the UDF when returning results. This Field is deprecated for Procedure. + + If true, UDF might return different values for different rows, even for the same input. + This field is deprecated for Procedure. + + If false, UDF assumes that the function, when called with the same inputs, will always return the same result. + This guarantee is not checked. Specifying IMMUTABLE for a UDF that returns different values for the same input will result in undefined behavior. + + required: + - runtime_version + - packages + - handler + - language + type: object + discriminator: + propertyName: language + mapping: + JAVA: JavaFunction + PYTHON: PythonFunction + SCALA: ScalaFunction + JAVASCRIPT: JavaScriptFunction + SQL: SQLFunction + ListFunctionsResponse: + type: object + properties: + functions: + type: array + items: + $ref: '#/components/schemas/Function' + ListProceduresResponse: + type: object + properties: + procedures: + type: array + items: + $ref: '#/components/schemas/Procedure' + CallProcedureResponse: + type: object + properties: + call_procedure: + type: array + items: {} + ListUserDefinedFunctionsResponse: + type: object + properties: + user_defined_functions: + type: array + items: + $ref: '#/components/schemas/UserDefinedFunction' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: >- + Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token + is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: >- + Configure External Oauth with Snowflake (see External + OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to + `OAUTH` and set the Token to the auth token received from the external + Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: >- + Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is + snowflakeOAuth + parameters: + application: + name: application + description: >- + Identifier (i.e. name) for the application to which the resource + belongs. You can use the `/api/v2/applications/{application}` GET + request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: >- + Parameter allowing support for different modes of resource creation. + Possible values include: + + - `errorIfExists`: Throws an error if you try to create a resource that + already exists. + + - `orReplace`: Automatically replaces the existing resource with the + current one. + + - `ifNotExists`: Creates a new resource when an alter is requested for a + non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: >- + Parameter determines whether the revoke operation succeeds or fails for + the privileges, based on the whether the privileges had been re-granted + to another role. + + - restrict: If the privilege being revoked has been re-granted to + another role, the REVOKE command fails. + + - cascade: If the privilege being revoked has been re-granted, the + REVOKE command recursively revokes these dependent grants. If the same + privilege on an object has been granted to the target role by a + different grantor (parallel grant), that grant is not affected and the + target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: >- + Parameter that specifies how to handle the request for a resource that + does not exist: + + - `true`: The endpoint does not throw an error if the resource does not + exist. It returns a 200 success response, but does not take any action + on the resource. + + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: >- + Parameter to filter the command output by resource name. Uses + case-insensitive pattern matching, with support for SQL wildcard + characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: >- + Parameter that filters the command output by a regular expression + pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: >- + Parameter to filter the command output based on the string of characters + that appear at the beginning of the object name. Uses case-sensitive + pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: >- + Parameter to filter the command output to return only root resources + (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: >- + Parameter to enable fetching rows only following the first row whose + object name matches the specified string. Case-sensitive and does not + have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: >- + Type of data format accepted by the resource. Currently supports + `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: >- + Type of the Snowflake authorization token. Currently, keypair-jwt + (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: >- + Identifier (i.e. name) for the database to which the resource belongs. + You can use the `/api/v2/databases` GET request to get a list of + available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: >- + Identifier (i.e. name) for the schema to which the resource belongs. You + can use the `/api/v2/databases/{database}/schemas` GET request to get a + list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: >- + Links to the page of results (e.g. the first page, the last page, etc.). + The header can include multiple 'url' entries with different 'rel' + attribute values that specify the page to return ('first', 'next', + 'prev', and 'last'). + schema: + type: string + example: >- + ; + rel="first",; + rel="next",; + rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: >- + Relative path for checking request status or getting the result, + if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: >- + Bad Request. The request payload is invalid or malformed. This happens + if the application didn't send the correct request payload. The response + body may include the error code and message indicating the actual cause. + The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: >- + Unauthorized. The request is not authorized. This happens if the + attached access token is invalid or missing. The response body may + include the error code and message indicating the actual cause, e.g., + expired, invalid token. The application must obtain a new access token + for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: >- + Forbidden. The request is forbidden. This can also happen if the request + is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: >- + Not Found. The request endpoint is not valid. This happens if the API + endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: >- + Method Not Allowed. The request method doesn't match the supported API. + This happens, for example, if the application calls the API with GET + method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: >- + Request Timeout. This indicates that the request from the client timed + out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: >- + Conflict. The requested operation could not be performed due to a + conflicting state that could not be resolved. This usually happens when + a CREATE request was performed when there is a pre-existing resource + with the same name, and also without one of the options + orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: >- + Gone. This error is primarily intended to assist the task of web + maintenance by notifying the recipient that the resource is + intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: >- + The request header Content-Type includes an unsupported media type. The + API supports application/json only. If none specified, the request + payload is taken as JSON, but if any other media type is specified, this + error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: >- + Limit Exceeded. The number of requests hit the rate limit. The + application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: >- + Internal Server Error. The server hit an unrecoverable system error. The + response body may include the error code and message for further + guidance. The application owner may need to reach out the customer + support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: >- + Service Unavailable. The request was not processed due to server side + timeouts. The application may retry with backoff. The jittered backoff + is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: >- + Gateway Timeout. The request was not processed due to server side + timeouts. The application may retry with backoff. The jittered backoff + is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + functions: + id: snowflake.functions.functions + name: functions + title: Functions + methods: + list: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions/get + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.functions + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListFunctionsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"functions\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions/post + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{name_with_args}/get + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{name_with_args}/delete + response: + mediaType: application/json + openAPIDocKey: '200' + execute: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1functions~1{name}:execute/post + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/functions/methods/get' + - $ref: '#/components/x-stackQL-resources/functions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/functions/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/functions/methods/delete' + replace: [] + procedures: + id: snowflake.functions.procedures + name: procedures + title: Procedures + methods: + list: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures/get + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.procedures + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListProceduresResponse' + transform: + body: |- + {{- $wrapped := printf "{\"procedures\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures/post + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{name_with_args}/get + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{name_with_args}/delete + response: + mediaType: application/json + openAPIDocKey: '200' + call: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{name_with_args}:call/post + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.call_procedure + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/CallProcedureResponse' + transform: + body: |- + {{- $wrapped := printf "{\"call_procedure\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/procedures/methods/get' + - $ref: '#/components/x-stackQL-resources/procedures/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/procedures/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/procedures/methods/delete' + replace: [] + user_defined_functions: + id: snowflake.functions.user_defined_functions + name: user_defined_functions + title: User Defined Functions + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions/post + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions/get + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.user_defined_functions + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListUserDefinedFunctionsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"user_defined_functions\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + get: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{name_with_args}/get + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{name_with_args}/delete + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: >- + #/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{name_with_args}:rename/post + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: >- + #/components/x-stackQL-resources/user_defined_functions/methods/get + - $ref: >- + #/components/x-stackQL-resources/user_defined_functions/methods/list + insert: + - $ref: >- + #/components/x-stackQL-resources/user_defined_functions/methods/create + update: [] + delete: + - $ref: >- + #/components/x-stackQL-resources/user_defined_functions/methods/delete + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/grant.yaml b/providers/src/snowflake/v00.00.00000/services/grants.yaml similarity index 58% rename from providers/src/snowflake/v00.00.00000/services/grant.yaml rename to providers/src/snowflake/v00.00.00000/services/grants.yaml index 64c807b0..8133162c 100644 --- a/providers/src/snowflake/v00.00.00000/services/grant.yaml +++ b/providers/src/snowflake/v00.00.00000/services/grants.yaml @@ -1,36 +1,32 @@ openapi: 3.0.0 servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) info: version: 0.0.1 - title: Snowflake Grant API - description: The Snowflake Grant API is a REST API that you can use to show or manage - privileges that have been provided to users and roles in a Snowflake database. + title: Snowflake Grants API + description: 'The Snowflake REST API surface for the grants service, combining the vendor spec(s): grant.yaml.' contact: name: Snowflake, Inc. url: https://snowflake.com email: support@snowflake.com paths: - /api/v2/grants/{granteeType}/{granteeName}/{securableType}/{securableName}/privileges: + /api/v2/grants/{grantee_type}/{grantee_name}/{securable_type}/{securable_name}/privileges: post: - summary: Grant the specified privilege(s) on the named securable to the named - grantee. - description: Endpoint to indicate that the privileges listed in the request - body should be granted. + summary: Grant the specified privilege(s) on the named securable to the named grantee. + description: Endpoint to indicate that the privileges listed in the request body should be granted. operationId: grantPrivilege deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/securableType' - - $ref: '#/components/parameters/securableName' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/securable_type' + - $ref: '#/components/parameters/securable_name' requestBody: required: true content: @@ -66,23 +62,21 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - /api/v2/grants/{granteeType}/{granteeName}/{bulkGrantType}/{securableTypePlural}/{scopeType}/{scopeName}/privileges: + /api/v2/grants/{grantee_type}/{grantee_name}/{bulk_grant_type}/{securable_type_plural}/{scope_type}/{scope_name}/privileges: post: - summary: Grant the specified privilege(s) on all/future (as specified by bulkGrantType) - securables of this type in a given scope to the named grantee. - description: Endpoint to indicate that the privileges listed in the request - body should be granted to all securables of this type in the given scope. + summary: Grant the specified privilege(s) on all/future (as specified by bulkGrantType) securables of this type in a given scope to the named grantee. + description: Endpoint to indicate that the privileges listed in the request body should be granted to all securables of this type in the given scope. operationId: grantGroupPrivilege deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/bulkGrantType' - - $ref: '#/components/parameters/securableTypePlural' - - $ref: '#/components/parameters/scopeType' - - $ref: '#/components/parameters/scopeName' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/bulk_grant_type' + - $ref: '#/components/parameters/securable_type_plural' + - $ref: '#/components/parameters/scope_type' + - $ref: '#/components/parameters/scope_name' requestBody: required: true content: @@ -118,23 +112,21 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - /api/v2/grants/{granteeType}/{granteeName}/{securableType}/{securableName}/privileges/{privilege}: + /api/v2/grants/{grantee_type}/{grantee_name}/{securable_type}/{securable_name}/privileges/{privilege}: delete: - summary: Revoke the specified privilege on the named securable from the named - grantee. - description: Endpoint to indicate that the privilege listed in the path should - be revoked. + summary: Revoke the specified privilege on the named securable from the named grantee. + description: Endpoint to indicate that the privilege listed in the path should be revoked. operationId: revokePrivilege deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/securableType' - - $ref: '#/components/parameters/securableName' - - $ref: '#/components/parameters/privilege' - - $ref: '#/components/parameters/deleteMode' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/securable_type' + - $ref: '#/components/parameters/securable_name' + - $ref: '#/components/parameters/privilege' + - $ref: '#/components/parameters/deleteMode' responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -164,23 +156,21 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - /api/v2/grants/{granteeType}/{granteeName}/{securableType}/{securableName}/privileges/{privilege}/grant-option: + /api/v2/grants/{grantee_type}/{grantee_name}/{securable_type}/{securable_name}/privileges/{privilege}/grant-option: delete: - summary: Revoke the grant option for the specified privilege on the named securable - from the named grantee. - description: Endpoint to indicate that the grant option for the privilege listed - in the path should be revoked. + summary: Revoke the grant option for the specified privilege on the named securable from the named grantee. + description: Endpoint to indicate that the grant option for the privilege listed in the path should be revoked. operationId: revokePrivilegeGrantOption deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/securableType' - - $ref: '#/components/parameters/securableName' - - $ref: '#/components/parameters/privilege' - - $ref: '#/components/parameters/deleteMode' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/securable_type' + - $ref: '#/components/parameters/securable_name' + - $ref: '#/components/parameters/privilege' + - $ref: '#/components/parameters/deleteMode' responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -210,25 +200,23 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - ? /api/v2/grants/{granteeType}/{granteeName}/{bulkGrantType}/{securableTypePlural}/{scopeType}/{scopeName}/privileges/{privilege} - : delete: - summary: Revoke the specified privilege on the specified all/future securable - in the given scope from the named grantee. - description: Endpoint to indicate that the privilege listed on the group securable - in the given scope should be revoked. + /api/v2/grants/{grantee_type}/{grantee_name}/{bulk_grant_type}/{securable_type_plural}/{scope_type}/{scope_name}/privileges/{privilege}: + delete: + summary: Revoke the specified privilege on the specified all/future securable in the given scope from the named grantee. + description: Endpoint to indicate that the privilege listed on the group securable in the given scope should be revoked. operationId: revokeGroupPrivilege deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/bulkGrantType' - - $ref: '#/components/parameters/securableTypePlural' - - $ref: '#/components/parameters/scopeType' - - $ref: '#/components/parameters/scopeName' - - $ref: '#/components/parameters/privilege' - - $ref: '#/components/parameters/deleteMode' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/bulk_grant_type' + - $ref: '#/components/parameters/securable_type_plural' + - $ref: '#/components/parameters/scope_type' + - $ref: '#/components/parameters/scope_name' + - $ref: '#/components/parameters/privilege' + - $ref: '#/components/parameters/deleteMode' responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -258,25 +246,23 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - ? /api/v2/grants/{granteeType}/{granteeName}/{bulkGrantType}/{securableTypePlural}/{scopeType}/{scopeName}/privileges/{privilege}/grant-option - : delete: - summary: Revoke the grant option for the specified privilege on the specified - all/future securable in the given scope from the named grantee. - description: Endpoint to indicate that the grant option for the privilege listed - on the group securable in the given scope should be revoked. + /api/v2/grants/{grantee_type}/{grantee_name}/{bulk_grant_type}/{securable_type_plural}/{scope_type}/{scope_name}/privileges/{privilege}/grant-option: + delete: + summary: Revoke the grant option for the specified privilege on the specified all/future securable in the given scope from the named grantee. + description: Endpoint to indicate that the grant option for the privilege listed on the group securable in the given scope should be revoked. operationId: revokeGroupPrivilegeGrantOption deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/bulkGrantType' - - $ref: '#/components/parameters/securableTypePlural' - - $ref: '#/components/parameters/scopeType' - - $ref: '#/components/parameters/scopeName' - - $ref: '#/components/parameters/privilege' - - $ref: '#/components/parameters/deleteMode' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/bulk_grant_type' + - $ref: '#/components/parameters/securable_type_plural' + - $ref: '#/components/parameters/scope_type' + - $ref: '#/components/parameters/scope_name' + - $ref: '#/components/parameters/privilege' + - $ref: '#/components/parameters/deleteMode' responses: '200': $ref: '#/components/responses/200SuccessResponse' @@ -306,19 +292,18 @@ paths: $ref: '#/components/responses/503ServiceUnavailable' '504': $ref: '#/components/responses/504GatewayTimeout' - /api/v2/grants/{granteeType}/{granteeName}: + /api/v2/grants/{grantee_type}/{grantee_name}: get: summary: List of privileges associated with this grantee type and name - description: List the roles and privileges granted to the specified grantee - using the output of SHOW GRANTS TO + description: List the roles and privileges granted to the specified grantee using the output of SHOW GRANTS TO operationId: listGrantsTo deprecated: true tags: - - grant + - grant parameters: - - $ref: '#/components/parameters/granteeType' - - $ref: '#/components/parameters/granteeName' - - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/grantee_type' + - $ref: '#/components/parameters/grantee_name' + - $ref: '#/components/parameters/showLimit' responses: '200': description: successful @@ -330,9 +315,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Grant' + $ref: '#/components/schemas/ListGrantsToResponse' '202': $ref: '#/components/responses/202SuccessAcceptedResponse' '400': @@ -361,90 +344,6 @@ paths: $ref: '#/components/responses/504GatewayTimeout' components: parameters: - granteeType: - name: granteeType - description: String that specifies the type of resource that is the privilege - grantee. - required: true - in: path - schema: - example: role - type: string - enum: - - user - - role - - application-role - - database-role - - share - granteeName: - name: granteeName - description: String that specifies the name of the privilege grantee. - required: true - in: path - schema: - example: SYSADMIN - type: string - securableType: - name: securableType - description: String that specifies the type of resource that is being secured - by a privilege. - required: true - in: path - schema: - example: DATABASE - type: string - securableName: - name: securableName - description: String that specifies the name of resource that is being secured - by a privilege. - required: true - in: path - schema: - example: MY_DB - type: string - bulkGrantType: - name: bulkGrantType - description: String that species whether this group privilege should be on ALL - or FUTURE resources of the specified plural type - required: true - in: path - schema: - example: all - type: string - enum: - - all - - future - securableTypePlural: - name: securableTypePlural - description: String that specifies the plural of the type of resource that is - being secured by an ALL/FUTURE privilege. Must be either "schemas" or any - plural object type that can nest under a schema such as "tables" - required: true - in: path - schema: - example: tables - type: string - scopeType: - name: scopeType - description: String that specifies the type of resource that is the scope of - an ALL/FUTURE privilege. Can only be DATABASE or SCHEMA - required: true - in: path - schema: - example: schema - type: string - enum: - - database - - schema - scopeName: - name: scopeName - description: String that specifies the name of resource that is the scope of - an ALL/FUTURE privilege - required: true - in: path - schema: - example: MY_DB.MY_SC - type: string privilege: name: privilege description: String that specifies a privilege to be revoked @@ -455,38 +354,15 @@ components: type: string deleteMode: name: deleteMode - description: If "cascade", recursively revoke the grant from sub-grantees to - which this privilege was re-granted. Acceptable values are "restrict" or "cascade". + description: If "cascade", recursively revoke the grant from sub-grantees to which this privilege was re-granted. Acceptable values are "restrict" or "cascade". required: false in: query schema: type: string example: restrict - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' application: name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. required: true in: path schema: @@ -500,65 +376,41 @@ components: schema: example: TEST_NAME $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) createMode: name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. in: query schema: type: string enum: - - errorIfExists - - orReplace - - ifNotExists + - errorIfExists + - orReplace + - ifNotExists example: ifNotExists default: errorIfExists mode: name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. in: query schema: type: string enum: - - restrict - - cascade + - restrict + - cascade example: restrict ifExists: name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. in: query schema: type: boolean @@ -566,33 +418,28 @@ components: default: false like: name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. in: query schema: type: string example: test_% pattern: name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. + description: Parameter that filters the command output by a regular expression pattern. in: query schema: type: string example: .*data_0.* startsWith: name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. in: query schema: type: string example: test rootOnly: name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). + description: Parameter to filter the command output to return only root resources (resources with no predecessors). in: query schema: type: boolean @@ -600,8 +447,7 @@ components: default: false showLimit: name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. + description: Parameter to limit the maximum number of rows returned by a command. in: query schema: type: integer @@ -610,16 +456,14 @@ components: maximum: 10000 fromName: name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. in: query schema: type: string example: from_test copyGrants: name: copyGrants - description: Query parameter to enable copy grants when creating the object. + description: Parameter to enable copy grants when creating the object. in: query schema: type: boolean @@ -648,26 +492,24 @@ components: schema: type: string enum: - - application/json + - application/json accept: name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. + description: Type of data format accepted by the resource. Currently supports `application/json`. in: header schema: type: string enum: - - application/json + - application/json x-snowflake-authorization-token-type: name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. in: header schema: type: string enum: - - KEYPAIR_JWT - - OAUTH + - KEYPAIR_JWT + - OAUTH x-sfc-session: name: X-Sfc-Session description: Token for the current Snowflake session. @@ -677,6 +519,106 @@ components: type: string description: Snowflake session token. example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + grantee_type: + name: grantee_type + description: String that specifies the type of resource that is the privilege grantee. + required: true + in: path + schema: + example: role + type: string + enum: + - user + - role + - application-role + - database-role + - share + grantee_name: + name: grantee_name + description: String that specifies the name of the privilege grantee. + required: true + in: path + schema: + example: SYSADMIN + type: string + securable_type: + name: securable_type + description: String that specifies the type of resource that is being secured by a privilege. + required: true + in: path + schema: + example: DATABASE + type: string + securable_name: + name: securable_name + description: String that specifies the name of resource that is being secured by a privilege. + required: true + in: path + schema: + example: MY_DB + type: string + bulk_grant_type: + name: bulk_grant_type + description: String that species whether this group privilege should be on ALL or FUTURE resources of the specified plural type + required: true + in: path + schema: + example: all + type: string + enum: + - all + - future + securable_type_plural: + name: securable_type_plural + description: String that specifies the plural of the type of resource that is being secured by an ALL/FUTURE privilege. Must be either "schemas" or any plural object type that can nest under a schema such as "tables" + required: true + in: path + schema: + example: tables + type: string + scope_type: + name: scope_type + description: String that specifies the type of resource that is the scope of an ALL/FUTURE privilege. Can only be DATABASE or SCHEMA + required: true + in: path + schema: + example: schema + type: string + enum: + - database + - schema + scope_name: + name: scope_name + description: String that specifies the name of resource that is the scope of an ALL/FUTURE privilege + required: true + in: path + schema: + example: MY_DB.MY_SC + type: string schemas: Grant: description: Properties of a grant that can be granted to a role or user. @@ -688,8 +630,8 @@ components: items: type: string example: - - CREATE DATABASE - - EXECUTE TASK + - CREATE DATABASE + - EXECUTE TASK grant_option: type: boolean description: Can grantee pass this privilege down? @@ -721,9 +663,7 @@ components: example: SUBADMIN Identifier: type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ example: TEST_NAME ErrorResponse: @@ -737,9 +677,7 @@ components: description: Error code. error_code: type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. request_id: type: string description: Unique request ID. @@ -768,38 +706,27 @@ components: description: Message returned by the server resultHandler: type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. example: code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. PointOfTime: type: object description: Point of time. required: - - point_of_time_type + - point_of_time_type properties: point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms + example: timestamp reference: type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at discriminator: propertyName: point_of_time_type mapping: @@ -808,40 +735,90 @@ components: statement: PointOfTimeStatement PointOfTimeTimestamp: description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' properties: timestamp: type: string - description: Timestamp of the point of time. + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms + description: Point of time identified by an offset in reference to the current time properties: offset: type: string - description: 'Offset from the point of time. Example: `1 year`' + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement PointOfTimeStatement: description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' properties: statement: type: string - description: Statement of the point of time. + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. + description: Snowflake parameter defined at the system, account, user, session, or object level. type: object required: - - name + - name properties: name: type: string @@ -854,8 +831,7 @@ components: description: Default parameter value. dataType: type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. level: type: string description: Level at which parameter is defined. @@ -871,8 +847,7 @@ components: description: Sample snowflake parameter. TargetLag: type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. + description: Specifies the schedule for periodically refreshing the dynamic table. properties: type: description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. @@ -884,43 +859,61 @@ components: DOWNSTREAM: DownstreamLag UserDefinedLag: description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' properties: seconds: type: integer format: int64 description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string example: seconds: 3600 required: - - seconds + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag DownstreamLag: description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + ListGrantsToResponse: + type: object + properties: + grants_to: + type: array + items: + $ref: '#/components/schemas/Grant' securitySchemes: KeyPair: type: http scheme: bearer bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. ExternalOAuth: type: http scheme: bearer bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. SnowflakeOAuth: type: oauth2 flows: implicit: authorizationUrl: /oauth/authorize scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth headers: X-Snowflake-Request-ID: description: Unique ID of the API request. @@ -928,15 +921,10 @@ components: type: string format: uuid Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). schema: type: string - example: ; rel="first",; - rel="next",; - rel="last" + example: ; rel="first",; rel="next",; rel="last" responses: 200SuccessResponse: description: Successful request. @@ -961,8 +949,7 @@ components: Location: schema: type: string - description: Relative path for checking request status or getting the - result, if available. + description: Relative path for checking request status or getting the result, if available. X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' description: Successfully accepted the request, but it is not completed yet. @@ -971,10 +958,7 @@ components: schema: $ref: '#/components/schemas/SuccessAcceptedResponse' 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -983,10 +967,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -995,8 +976,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1005,8 +985,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1015,9 +994,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1026,8 +1003,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1036,10 +1012,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1048,9 +1021,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1059,10 +1030,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1071,8 +1039,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1081,9 +1048,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1092,9 +1057,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1103,9 +1066,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1114,89 +1075,119 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' x-stackQL-resources: - privileges: + grants: + id: snowflake.grants.grants + name: grants + title: Grants methods: - grant_privilege: + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{securable_type}~1{securable_name}~1privileges/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{securableType}~1{securableName}~1privileges/post' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{securable_type}~1{securable_name}~1privileges~1{privilege}/delete' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' - grant_group_privilege: + list_grants_to: operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{bulkGrantType}~1{securableTypePlural}~1{scopeType}~1{scopeName}~1privileges/post' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}/get' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' - revoke_privilege: + objectKey: $.grants_to + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListGrantsToResponse' + transform: + body: |- + {{- $wrapped := printf "{\"grants_to\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/grants/methods/list_grants_to' + insert: + - $ref: '#/components/x-stackQL-resources/grants/methods/grant' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/grants/methods/revoke' + replace: [] + group_grants: + id: snowflake.grants.group_grants + name: group_grants + title: Group Grants + methods: + grant: + config: + requestBodyTranslate: + algorithm: naive operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{securableType}~1{securableName}~1privileges~1{privilege}/delete' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{bulk_grant_type}~1{securable_type_plural}~1{scope_type}~1{scope_name}~1privileges/post' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' - revoke_group_privilege: + revoke: operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{bulkGrantType}~1{securableTypePlural}~1{scopeType}~1{scopeName}~1privileges~1{privilege}/delete' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{bulk_grant_type}~1{securable_type_plural}~1{scope_type}~1{scope_name}~1privileges~1{privilege}/delete' response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: [] insert: - - $ref: '#/components/x-stackQL-resources/privileges/methods/grant_privilege' - - $ref: '#/components/x-stackQL-resources/privileges/methods/grant_group_privilege' + - $ref: '#/components/x-stackQL-resources/group_grants/methods/grant' update: [] delete: - - $ref: '#/components/x-stackQL-resources/privileges/methods/revoke_privilege' - - $ref: '#/components/x-stackQL-resources/privileges/methods/revoke_group_privilege' + - $ref: '#/components/x-stackQL-resources/group_grants/methods/revoke' replace: [] - id: snowflake.grant.privileges - name: privileges - title: Privileges grant_options: + id: snowflake.grants.grant_options + name: grant_options + title: Grant Options methods: - revoke_privilege_grant_option: + revoke: operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{securableType}~1{securableName}~1privileges~1{privilege}~1grant-option/delete' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{securable_type}~1{securable_name}~1privileges~1{privilege}~1grant-option/delete' response: - mediaType: '' - openAPIDocKey: '200' - revoke_group_privilege_grant_option: - operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}~1{bulkGrantType}~1{securableTypePlural}~1{scopeType}~1{scopeName}~1privileges~1{privilege}~1grant-option/delete' - response: - mediaType: '' + mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: [] insert: [] update: [] delete: - - $ref: '#/components/x-stackQL-resources/grant_options/methods/revoke_privilege_grant_option' - - $ref: '#/components/x-stackQL-resources/grant_options/methods/revoke_group_privilege_grant_option' + - $ref: '#/components/x-stackQL-resources/grant_options/methods/revoke' replace: [] - id: snowflake.grant.grant_options - name: grant_options - title: Grant Options - grants_to: + group_grant_options: + id: snowflake.grants.group_grant_options + name: group_grant_options + title: Group Grant Options methods: - list_grants_to: + revoke: operation: - $ref: '#/paths/~1api~1v2~1grants~1{granteeType}~1{granteeName}/get' + $ref: '#/paths/~1api~1v2~1grants~1{grantee_type}~1{grantee_name}~1{bulk_grant_type}~1{securable_type_plural}~1{scope_type}~1{scope_name}~1privileges~1{privilege}~1grant-option/delete' response: mediaType: application/json openAPIDocKey: '200' sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants_to/methods/list_grants_to' + select: [] insert: [] update: [] - delete: [] + delete: + - $ref: '#/components/x-stackQL-resources/group_grant_options/methods/revoke' replace: [] - id: snowflake.grant.grants_to - name: grants_to - title: Grants To security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml b/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml deleted file mode 100644 index ebf7c40f..00000000 --- a/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml +++ /dev/null @@ -1,1943 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Iceberg Table API - description: The Snowflake Iceberg Table API is a REST API that you can use to access, - update, and perform certain actions on Iceberg Table resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables: - get: - summary: List iceberg tables - tags: - - iceberg-table - description: "Lists the Apache Iceberg\u2122 tables for which you have access\ - \ privileges." - operationId: listIcebergTables - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: deep - description: Optionally includes dependency information of the table. - in: query - required: false - schema: - type: boolean - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/IcebergTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a snowflake managed iceberg table (clone and undrop are separate - subresources) - tags: - - iceberg-table - description: Create a snowflake managed iceberg table (clone and undrop are - separate subresources) - operationId: createSnowflakeManagedIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTable' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:as-select: - post: - summary: Create a snowflake managed iceberg table as select - tags: - - iceberg-table - description: Create a snowflake managed iceberg table as select - operationId: createSnowflakeManagedIcebergTableAsSelect - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: query - in: query - required: true - description: The SQL select query to run to set up the table values (and possibly - columns). - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableAsSelect' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-aws-glue-catalog: - post: - summary: Create an unmanaged iceberg table from AWS Glue catalog - tags: - - iceberg-table - description: Create an unmanaged iceberg table from AWS Glue catalog - operationId: createUnmanagedIcebergTableFromAWSGlueCatalog - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableFromAWSGlueCatalog' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-delta: - post: - summary: Create an unmanaged iceberg table from Delta - tags: - - iceberg-table - description: Create an unmanaged iceberg table from Delta - operationId: createUnmanagedIcebergTableFromDelta - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableFromDelta' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-iceberg-files: - post: - summary: Create an unmanaged iceberg table from Iceberg files - tags: - - iceberg-table - description: Create an unmanaged iceberg table from Iceberg files - operationId: createUnmanagedIcebergTableFromIcebergFiles - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableFromIcebergFiles' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-iceberg-rest: - post: - summary: Create an unmanaged iceberg table from Iceberg REST - tags: - - iceberg-table - description: Create an unmanaged iceberg table from Iceberg REST - operationId: createUnmanagedIcebergTableFromIcebergRest - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableFromIcebergRest' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}: - get: - summary: Describe iceberg table - tags: - - iceberg-table - description: Describe an iceberg table - operationId: fetchIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTable' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Drop iceberg table - tags: - - iceberg-table - description: Drop an iceberg table - operationId: dropIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: type - description: Specifies whether the table can be dropped if foreign keys exist - that reference the table. - in: query - required: false - schema: - type: string - enum: - - CASCADE - - RESTRICT - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:resume-recluster: - post: - summary: Resume recluster of an iceberg table - tags: - - iceberg-table - description: Resume recluster of an iceberg table (iceberg tables managed by - an external catalog do not allow clustering) - operationId: resumeReclusterIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:suspend-recluster: - post: - summary: Suspend recluster of an iceberg table - tags: - - iceberg-table - description: Suspend recluster of an iceberg table (iceberg tables managed by - an external catalog do not allow clustering) - operationId: suspendReclusterIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:refresh: - post: - summary: Refreshes the metadata for an Apache Iceberg table that uses an external - Iceberg catalog - tags: - - iceberg-table - description: Refreshes the metadata for an Apache Iceberg table that uses an - external Iceberg catalog - operationId: refreshIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RefreshIcebergTableRequest' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:convert-to-managed: - post: - summary: "Converts an Apache Iceberg\u2122 table that uses an external Iceberg\ - \ catalog into a table that uses Snowflake as the catalog" - tags: - - iceberg-table - description: Convert unmanaged iceberg table to managed iceberg table - operationId: convertToManagedIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConvertToManagedIcebergTableRequest' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:undrop: - post: - summary: Undrop iceberg table - tags: - - iceberg-table - description: Undrop an iceberg table - operationId: undropIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:clone: - post: - summary: Clone a snowflake managed iceberg table - tags: - - iceberg-table - description: Clone a snowflake managed iceberg table - operationId: cloneSnowflakeManagedIcebergTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: targetDatabase - in: query - description: Database of the newly created table. Defaults to the source table's - database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the newly created table. Defaults to the source table's - schema. - schema: - $ref: '#/components/schemas/Identifier' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableClone' - /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:create-like: - post: - summary: Create iceberg table like - tags: - - iceberg-table - description: Creates a new table with the same column definitions as an existing - table, but without copying data from the existing table. - operationId: createSnowflakeManagedIcebergTableLike - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: targetDatabase - in: query - description: Database of the newly created table. Defaults to the source table's - database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the newly created table. Defaults to the source table's - schema. - schema: - $ref: '#/components/schemas/Identifier' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IcebergTableLike' -components: - schemas: - RefreshIcebergTableRequest: - type: object - description: Request model for refreshing iceberg table - properties: - metadata_file_relative_path: - type: string - description: Specifies a metadata file path for a table created from Iceberg - files in object storage. - ConvertToManagedIcebergTableRequest: - type: object - description: Request model for convert to managed iceberg table - properties: - base_location: - type: string - description: The path to a directory where Snowflake can write data and - metadata files for the table. - storage_serialization_policy: - type: string - description: Specifies the storage serialization policy for the table. - enum: - - COMPATIBLE - - OPTIMIZED - IcebergTable: - type: object - description: A Snowflake iceberg table - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the iceberg table - comment: - type: string - description: user comment associated to an object in the dictionary - change_tracking: - type: boolean - description: True if change tracking is enabled, allowing streams and CHANGES - to be used on the entity. - max_data_extension_time_in_days: - type: integer - description: Maximum number of days to extend data retention beyond the - retention period to prevent a stream becoming stale. - external_volume: - type: string - description: Name of an external volume that will be used for persisted - Iceberg metadata and data files. - data_retention_time_in_days: - type: integer - description: number of days to retain the old version of deleted/updated - data - catalog_sync: - type: string - description: Name of the catalog integration to sync this table - catalog: - type: string - description: Name of the catalog integration to use for iceberg tables - storage_serialization_policy: - type: string - description: Storage serialization policy used for managed Iceberg table. - This include encodings and compressions - enum: - - COMPATIBLE - - OPTIMIZED - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the iceberg table was created. - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Database in which the iceberg table is stored - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Schema in which the iceberg table is stored - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the iceberg table - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the iceberg table - iceberg_table_type: - type: string - readOnly: true - description: Type of Iceberg table. UNMANAGED if the table is not managed - by Snowflake. NOT ICEBERG otherwise. - catalog_table_name: - type: string - description: Name of the table as recognized by the catalog. - catalog_namespace: - type: string - description: "Catalog namespace for the table. The namespace defined when\ - \ the table was created. Otherwise, the default namespace associated with\ - \ the catalog integration used by the table. If you\u2019re syncing the\ - \ table to Snowflake Open Catalog, the default is null." - can_write_metadata: - type: string - readOnly: true - description: Signifies whether Snowflake can write metadata to the location - specified by the file_path. - cluster_by: - type: array - items: - type: string - description: Specifies one or more columns or column expressions in the - table as the clustering key. - columns: - type: array - items: - $ref: '#/components/schemas/IcebergTableColumn' - base_location: - type: string - description: The path to a directory where Snowflake can write data and - metadata files for the table. - replace_invalid_characters: - type: boolean - description: Specifies whether to replace invalid characters in the column - names - auto_refresh: - readOnly: true - type: boolean - description: Specifies whether to automatically refresh the table metadata - metadata_file_path: - type: string - description: Specifies the relative path of the Iceberg metadata file to - use for column definitions. - constraints: - type: array - items: - $ref: '#/components/schemas/Constraint' - required: - - name - IcebergTableAsSelect: - type: object - description: Create iceberg table as select - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - columns: - type: array - items: - $ref: '#/components/schemas/IcebergTableColumn' - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - cluster_by: - type: array - description: Specifies one or more columns or column expressions in the - table as the clustering key - items: - type: string - base_location: - type: string - description: Specifies the path to a directory where Snowflake can write - data and metadata files for the table - comment: - type: string - description: Specifies a comment for the table - required: - - name - - base_location - IcebergTableLike: - type: object - description: Create iceberg table as select - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - cluster_by: - type: array - description: Specifies one or more columns or column expressions in the - table as the clustering key - items: - type: string - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - base_location: - type: string - description: Specifies the path to a directory where Snowflake can write - data and metadata files for the table - comment: - type: string - description: Specifies a comment for the table - required: - - name - IcebergTableClone: - type: object - description: Clone iceberg table - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - point_of_time: - $ref: '#/components/schemas/PointOfTime' - required: - - name - IcebergTableFromAWSGlueCatalog: - type: object - description: Create iceberg table from AWS Glue catalog - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - catalog_table_name: - type: string - description: Specifies the table name as recognized by the AWS Glue Data - Catalog. - catalog_namespace: - type: string - description: Specifies the catalog namespace for the table. - replace_invalid_characters: - type: boolean - description: Specifies whether to replace invalid characters in the column - names - auto_refresh: - type: boolean - description: Specifies whether to automatically refresh the table metadata - catalog: - type: string - description: Specifies the name of the catalog integration to use for the - table - comment: - type: string - description: Specifies a comment for the table - required: - - name - - catalog_table_name - IcebergTableFromIcebergFiles: - type: object - description: Create iceberg table from Iceberg files - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - replace_invalid_characters: - type: boolean - description: Specifies whether to replace invalid characters in the column - names - metadata_file_path: - type: string - description: Specifies the relative path of the Iceberg metadata file to - use for column definitions. - catalog: - type: string - description: Specifies the name of the catalog integration to use for the - table - comment: - type: string - description: Specifies a comment for the table - required: - - name - - metadata_file_path - IcebergTableFromDelta: - type: object - description: Create iceberg table from Delta - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - replace_invalid_characters: - type: boolean - description: Specifies whether to replace invalid characters in the column - names - base_location: - type: string - description: "Specifies a relative path from the table\u2019s EXTERNAL_VOLUME\ - \ location to a directory where Snowflake can access your Delta table\ - \ files." - catalog: - type: string - description: Specifies the name of the catalog integration to use for the - table - comment: - type: string - description: Specifies a comment for the table - required: - - name - - base_location - IcebergTableFromIcebergRest: - type: object - description: "Creates or replaces an Apache Iceberg\u2122 table in the current/specified\ - \ schema for an Iceberg REST catalog." - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - external_volume: - type: string - description: Specifies the name of the external volume to use for the table - catalog_table_name: - type: string - description: Specifies the table name as recognized by the AWS Glue Data - Catalog. - catalog_namespace: - type: string - description: Specifies the catalog namespace for the table. - replace_invalid_characters: - type: boolean - description: Specifies whether to replace invalid characters in the column - names - auto_refresh: - type: boolean - description: Specifies whether to automatically refresh the table metadata - catalog: - type: string - description: Specifies the name of the catalog integration to use for the - table - comment: - type: string - description: Specifies a comment for the table - required: - - name - - catalog_table_name - IcebergTableColumn: - type: object - description: A column in the snowflake catalog iceberg table - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Column name - datatype: - type: string - description: The data type for the column - comment: - type: string - description: Specifies a comment for the column - nullable: - type: boolean - description: Argument null return acceptance criteria - default_value: - type: string - description: Default value for the column - required: - - name - - datatype - Constraint: - type: object - description: Constraints define integrity and consistency rules for data stored - in tables. - properties: - name: - type: string - description: Name of the Constraint - column_names: - type: array - items: - type: string - description: Column name for the constraint - constraint_type: - type: string - description: Type of the constraint - discriminator: - propertyName: constraint_type - mapping: - PRIMARY KEY: PrimaryKey - FOREIGN KEY: ForeignKey - UNIQUE: UniqueKey - PrimaryKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: A primary key is the column or columns that contain values that - uniquely identify each row in a table. - UniqueKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: Unique keys are columns in a table that uniquely identify items - in the rows. This sounds a lot like a primary key, but the main difference - is that unique keys can have NULL values. - ForeignKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: Foreign keys link data in one table to the data in another table. - properties: - referenced_table_name: - type: string - referenced_column_names: - type: array - items: - type: string - required: - - referenced_table_name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - iceberg_tables: - methods: - list_iceberg_tables: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_snowflake_managed_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_snowflake_managed_iceberg_table_as_select: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:as-select/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_unmanaged_iceberg_table_from_aws_glue_catalog: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-aws-glue-catalog/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_unmanaged_iceberg_table_from_delta: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-delta/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_unmanaged_iceberg_table_from_iceberg_files: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-iceberg-files/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_unmanaged_iceberg_table_from_iceberg_rest: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-iceberg-rest/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - drop_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - resume_recluster_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:resume-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_recluster_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:suspend-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - refresh_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:refresh/post' - response: - mediaType: '' - openAPIDocKey: '200' - convert_to_managed_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:convert-to-managed/post' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - clone_snowflake_managed_iceberg_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_snowflake_managed_iceberg_table_like: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:create-like/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/list_iceberg_tables' - - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/fetch_iceberg_table' - insert: - - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/create_snowflake_managed_iceberg_table' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/drop_iceberg_table' - replace: [] - id: snowflake.iceberg_table.iceberg_tables - name: iceberg_tables - title: Iceberg Tables -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/image-repository.yaml b/providers/src/snowflake/v00.00.00000/services/image-repository.yaml deleted file mode 100644 index 3f8c8a1e..00000000 --- a/providers/src/snowflake/v00.00.00000/services/image-repository.yaml +++ /dev/null @@ -1,975 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Image Repository API - description: The Snowflake Image Repository API is a REST API that you can use to - access, update, and perform common actions on Image Repository resource in Snowflake. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories: - get: - summary: Lists image repositories. - tags: - - image-repository - description: Lists the image repositories under a specified database and schema. - operationId: listImageRepositories - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ImageRepository' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Creates an image repository in the specified database and schema. - tags: - - image-repository - description: Creates an image repository in the specified database, schema, - and create mode. The `createMode` query parameter specifies what action to - take based on whether the repository already exists. See the ImageRepository - component definition for what is required to be provided in the request body. - operationId: createImageRepository - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ImageRepository' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories/{name}: - get: - summary: Fetches an image repository. - tags: - - image-repository - description: Fetches a named image repository in a specified database and schema. - operationId: fetchImageRepository - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/ImageRepository' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Deletes an image repository. - tags: - - image-repository - description: Deletes an image repository with the given name. If you enable - the `ifExists` query parameter, the operation succeeds even if the object - does not exist. Otherwise, a 404 failure is returned if the object does not - exist. - operationId: deleteImageRepository - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/image-repositories/{name}/images: - get: - summary: List images in the image repository. - tags: - - image-repository - description: List images in the given image repository. - operationId: listImagesInRepository - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Image' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Image: - type: object - description: A image in a Snowflake image repository. - properties: - created_on: - type: string - description: Date and time when the image was uploaded to the image repository. - readOnly: true - image_name: - type: string - description: Image name. - readOnly: true - tags: - type: string - description: Image tags. - readOnly: true - digest: - type: string - description: SHA256 digest of the image. - readOnly: true - image_path: - type: string - description: Image path (database_name/schema_name/repository_name/image_name:image_tag). - readOnly: true - ImageRepository: - type: object - description: A Snowflake image repository. - properties: - name: - $ref: '#/components/schemas/Identifier' - database_name: - $ref: '#/components/schemas/Identifier' - readOnly: true - schema_name: - $ref: '#/components/schemas/Identifier' - readOnly: true - created_on: - type: string - description: Time the image repository was created. - format: date-time - readOnly: true - repository_url: - type: string - description: Current URL of the image repository. - readOnly: true - owner: - type: string - description: Identifier for the current owner of the image repository. - readOnly: true - owner_role_type: - type: string - description: Role type of the image repository owner. - readOnly: true - example: - name: image_repository_name - database_name: test_db - schema_name: test_schema - created_on: '2024-06-18T01:01:01.111111' - repository_url: https://www.snowflake.com - owner: IMAGE_ADMIN - owner_role_type: ADMIN - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - image_repositories: - methods: - list_image_repositories: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_image_repository: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_image_repository: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_image_repository: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/image_repositories/methods/list_image_repositories' - - $ref: '#/components/x-stackQL-resources/image_repositories/methods/fetch_image_repository' - insert: - - $ref: '#/components/x-stackQL-resources/image_repositories/methods/create_image_repository' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/image_repositories/methods/delete_image_repository' - replace: [] - id: snowflake.image_repository.image_repositories - name: image_repositories - title: Image Repositories - images: - methods: - list_images_in_repository: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1image-repositories~1{name}~1images/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/images/methods/list_images_in_repository' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.image_repository.images - name: images - title: Images -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/integrations.yaml b/providers/src/snowflake/v00.00.00000/services/integrations.yaml new file mode 100644 index 00000000..a2e12a34 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/integrations.yaml @@ -0,0 +1,2856 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Integrations API + description: >- + The Snowflake REST API surface for the integrations service, combining the + vendor spec(s): api-integration.yaml, catalog-integration.yaml, + external-volume.yaml, notification-integration.yaml. + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/api-integrations: + get: + summary: List API integrations + tags: + - api-integration + description: List API integrations + operationId: listAPIIntegrations + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListAPIIntegrationsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create an API integration + tags: + - api-integration + description: Create an API integration + operationId: createAPIIntegration + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ApiIntegration' + /api/v2/api-integrations/{name}: + get: + summary: Fetch an API integration + tags: + - api-integration + description: Fetch an API integration + operationId: fetchAPIIntegration + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ApiIntegration' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete an API integration + tags: + - api-integration + description: Delete an API integration + operationId: deleteAPIIntegration + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/catalog-integrations: + get: + summary: List catalog integrations. + tags: + - catalog-integration + description: List catalog integrations. + operationId: listCatalogIntegrations + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListCatalogIntegrationsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a catalog integration. + tags: + - catalog-integration + description: Create a catalog integration. + operationId: createCatalogIntegration + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CatalogIntegration' + /api/v2/catalog-integrations/{name}: + get: + summary: Fetch a catalog integration. + tags: + - catalog-integration + description: Fetch a catalog integration. + operationId: fetchCatalogIntegration + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/CatalogIntegration' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a catalog integration. + tags: + - catalog-integration + description: Delete a catalog integration. + operationId: deleteCatalogIntegration + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/external-volumes: + get: + summary: List external volumes + tags: + - external-volume + description: List external volumes + operationId: listExternalVolumes + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListExternalVolumesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create an external volume + tags: + - external-volume + description: Create an external volume + operationId: createExternalVolume + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalVolume' + /api/v2/external-volumes/{name}: + get: + summary: Fetch an external volume + tags: + - external-volume + description: Fetch an external volume + operationId: fetchExternalVolume + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalVolume' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete an external volume + tags: + - external-volume + description: Delete an external volume + operationId: deleteExternalVolume + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/external-volumes/{name}:undrop: + post: + summary: Undrop an external volume + tags: + - external-volume + description: Undrop an external volume + operationId: undropExternalVolume + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/notification-integrations: + get: + summary: List notification integrations + tags: + - notification-integration + description: List notification integrations + operationId: listNotificationIntegrations + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListNotificationIntegrationsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a notification integration + tags: + - notification-integration + description: Create a notification integration + operationId: createNotificationIntegration + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationIntegration' + /api/v2/notification-integrations/{name}: + get: + summary: Fetch a notification integration + tags: + - notification-integration + description: Fetch a notification integration + operationId: fetchNotificationIntegration + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationIntegration' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a notification integration + tags: + - notification-integration + description: Delete a notification integration + operationId: deleteNotificationIntegration + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/api-integrations/{api_integration_name}: + parameters: [] + put: + summary: Create an (or alter an existing) API integration + tags: + - api-integration + description: >- + Create an (or alter an existing) API integration. Note that API_KEY is + not currently altered by this operation and is supported for a + newly-created object only. Unsetting API_BLOCKED_PREFIXES is also + unsupported. + operationId: createOrAlterAPIIntegration + parameters: + - name: api_integration_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ApiIntegration' +components: + schemas: + ApiIntegration: + type: object + description: A Snowflake API integration object. + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the API integration. + api_hook: + $ref: '#/components/schemas/ApiHook' + api_allowed_prefixes: + type: array + items: + type: string + description: >- + A comma-separated list of endpoints and resources that Snowflake can + access. + api_blocked_prefixes: + type: array + items: + type: string + description: >- + A comma-separated list of endpoints and resources that are not + allowed to be called from Snowflake. + nullable: true + enabled: + type: boolean + description: Whether the API integration is enabled. + comment: + type: string + description: Comment for the API integration. + nullable: true + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the API integration was created. + required: + - name + - api_hook + - api_allowed_prefixes + - enabled + ApiHook: + type: object + properties: + type: + type: string + enum: + - AWS + - AZURE + - GC + - GIT + description: Type of ApiHook, can be AWS, AZURE, GC or GIT. + required: + - type + discriminator: + propertyName: type + mapping: + AWS: AwsHook + AZURE: AzureHook + GC: GoogleCloudHook + GIT: GitHook + AwsHook: + type: object + properties: + api_provider: + type: string + enum: + - AWS_API_GATEWAY + - AWS_PRIVATE_API_GATEWAY + - AWS_GOV_API_GATEWAY + - AWS_GOV_PRIVATE_API_GATEWAY + api_aws_role_arn: + type: string + description: The ARN (Amazon resource name) of the IAM role. + api_key: + $ref: '#/components/schemas/ApiKey' + type: + type: string + enum: + - AWS + - AZURE + - GC + - GIT + description: Type of ApiHook, can be AWS, AZURE, GC or GIT. + required: + - api_provider + - api_aws_role_arn + - type + discriminator: + propertyName: type + mapping: + AWS: AwsHook + AZURE: AzureHook + GC: GoogleCloudHook + GIT: GitHook + AzureHook: + type: object + properties: + api_provider: + type: string + enum: + - AZURE_API_MANAGEMENT + - AZURE_PRIVATE_API_MANAGEMENT + azure_tenant_id: + type: string + description: >- + The ID of the Office 365 tenant that all Azure API Management + instances belong to. + azure_ad_application_id: + type: string + description: The application ID of the Azure Active Directory application. + api_key: + $ref: '#/components/schemas/ApiKey' + type: + type: string + enum: + - AWS + - AZURE + - GC + - GIT + description: Type of ApiHook, can be AWS, AZURE, GC or GIT. + required: + - api_provider + - azure_tenant_id + - azure_ad_application_id + - type + discriminator: + propertyName: type + mapping: + AWS: AwsHook + AZURE: AzureHook + GC: GoogleCloudHook + GIT: GitHook + GoogleCloudHook: + type: object + properties: + api_provider: + type: string + enum: + - GOOGLE_API_GATEWAY + google_audience: + type: string + description: >- + Used as an audience claim when generating the JTW (JSON Web Token) + to authenticate to the Google API Gateway. + api_key: + $ref: '#/components/schemas/ApiKey' + type: + type: string + enum: + - AWS + - AZURE + - GC + - GIT + description: Type of ApiHook, can be AWS, AZURE, GC or GIT. + required: + - api_provider + - google_audience + - type + discriminator: + propertyName: type + mapping: + AWS: AwsHook + AZURE: AzureHook + GC: GoogleCloudHook + GIT: GitHook + GitHook: + type: object + properties: + allow_any_secret: + type: boolean + default: false + description: >- + Whether to allow any Snowflake secret when accessing the Git + repository. This setting is ignored if + allowed_authentication_secrets is present. + allowed_authentication_secrets: + type: array + items: + type: string + description: >- + A comma-separated list of fully-qualified Snowflake secret names + that UDF or procedure handler code can use when accessing the Git + repository. + nullable: true + allowed_api_authentication_integrations: + type: array + items: + type: string + description: >- + A comma-separated list of Snowflake security integration names that + UDF or procedure handler code can use when accessing the Git + repository. If empty, allow no integrations. + nullable: true + type: + type: string + enum: + - AWS + - AZURE + - GC + - GIT + description: Type of ApiHook, can be AWS, AZURE, GC or GIT. + required: + - type + discriminator: + propertyName: type + mapping: + AWS: AwsHook + AZURE: AzureHook + GC: GoogleCloudHook + GIT: GitHook + ApiKey: + type: string + description: >- + An alphanumeric string that is used to identify API clients and control + access to the API, also called a subscription key. + nullable: true + Identifier: + type: string + description: >- + A Snowflake object identifier. If the identifier contains spaces or + special characters, the entire string must be enclosed in double quotes. + Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: >- + Error code, same as `code` above. This property has been deprecated + and will be removed in a future release, but is temporarily + supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: >- + Opaque result ID used for checking for request completion through + one or more subsequent completion check operations. + example: + code: '392604' + message: >- + Request execution in progress. Use the provided location header or + result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: >- + The difference in seconds from the current time in the form -N where + N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: >- + Query ID of a statement to use as the reference point (e.g. + 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: >- + Type of the point of time. Possible values include: + + - `timestamp`: Exact time using the standard timezone format. + Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative + to 'now.' in the form -N where N can be an integer or arithmetic + expression. Example: `-120` - `statement`: ID of a query statement + to use as the reference point for Time + Travel. + + For more information, see + https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: >- + Relation to the point of time. Currently, the API supports `at` and + `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: >- + Snowflake parameter defined at the system, account, user, session, or + object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: >- + Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or + STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + CatalogIntegration: + type: object + description: Catalog integration + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the catalog integration. + catalog: + $ref: '#/components/schemas/Catalog' + description: Type of catalog and its parameters. + table_format: + type: string + enum: + - ICEBERG + description: Table format of the catalog. + enabled: + type: boolean + description: >- + whether this catalog integration is available to use for Iceberg + tables. + comment: + type: string + description: Comment. + type: + type: string + readOnly: true + description: Type of the integration. Always CATALOG. + category: + type: string + readOnly: true + description: Category of the integration. Always CATALOG. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the catalog integration was created. + required: + - name + - catalog + - table_format + - enabled + Catalog: + type: object + properties: + catalog_source: + type: string + enum: + - GLUE + - OBJECT_STORE + - POLARIS + description: Type of external catalog + required: + - catalog_source + discriminator: + propertyName: catalog_source + mapping: + GLUE: Glue + OBJECT_STORE: ObjectStore + POLARIS: Polaris + Glue: + type: object + properties: + glue_aws_role_arn: + type: string + description: ARN for AWS role to assume + glue_catalog_id: + type: string + description: Glue catalog id + glue_region: + type: string + description: >- + AWS region of the Glue catalog. Must be specified if the Snowflake + account is not hosted on AWS. + catalog_namespace: + type: string + description: >- + default AWS Glue catalog namespace for all Iceberg table that use + this catalog integration + catalog_source: + type: string + enum: + - GLUE + - OBJECT_STORE + - POLARIS + description: Type of external catalog + required: + - glue_aws_role_arn + - glue_catalog_id + - catalog_namespace + - catalog_source + discriminator: + propertyName: catalog_source + mapping: + GLUE: Glue + OBJECT_STORE: ObjectStore + POLARIS: Polaris + ObjectStore: + type: object + properties: + catalog_source: + type: string + enum: + - GLUE + - OBJECT_STORE + - POLARIS + description: Type of external catalog + required: + - catalog_source + discriminator: + propertyName: catalog_source + mapping: + GLUE: Glue + OBJECT_STORE: ObjectStore + POLARIS: Polaris + Polaris: + type: object + properties: + catalog_namespace: + type: string + description: >- + Default Polaris namespace used by all Iceberg tables associated with + this catalog integration + rest_config: + $ref: '#/components/schemas/RestConfig' + description: Information about the Polaris catalog account and catalog name. + rest_authentication: + $ref: '#/components/schemas/RestAuthentication' + description: >- + Authentication details that Snowflake uses to connect to the Polaris + catalog. + catalog_source: + type: string + enum: + - GLUE + - OBJECT_STORE + - POLARIS + description: Type of external catalog + required: + - catalog_namespace + - rest_config + - rest_authentication + - catalog_source + discriminator: + propertyName: catalog_source + mapping: + GLUE: Glue + OBJECT_STORE: ObjectStore + POLARIS: Polaris + RestConfig: + type: object + properties: + catalog_uri: + type: string + description: Customer's Polaris account locator URL + warehouse: + type: string + description: Name of the catalog to use in Polaris + required: + - catalog_uri + - warehouse + RestAuthentication: + type: object + properties: + type: + type: string + enum: + - OAUTH + description: Authentication type. + required: + - type + discriminator: + propertyName: type + mapping: + OAUTH: OAuth + OAuth: + type: object + properties: + oauth_client_id: + type: string + description: >- + The client ID of the OAuth2 credential associated with the Polaris + service connection. + oauth_client_secret: + type: string + description: >- + The secret for the OAuth2 credential associated with the Polaris + service connection. + oauth_allowed_scopes: + type: array + items: + type: string + description: >- + The scope of the OAuth token. Only one scope is included in the + Iceberg REST API specification, but catalogs can support more than + one scope in their implementation. + type: + type: string + enum: + - OAUTH + description: Authentication type. + required: + - oauth_client_id + - oauth_client_secret + - oauth_allowed_scopes + - type + discriminator: + propertyName: type + mapping: + OAUTH: OAuth + ExternalVolume: + type: object + description: A Snowflake external volume + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: >- + String that specifies the identifier (the name) for the external + volume; must be unique in your account. + storage_locations: + type: array + items: + $ref: '#/components/schemas/StorageLocation' + description: >- + Set of named cloud storage locations in different regions and, + optionally, cloud platforms. + allow_writes: + type: boolean + description: >- + Specifies whether write operations are allowed for the external + volume; must be set to TRUE for Iceberg tables that use Snowflake as + the catalog. + comment: + type: string + description: String (literal) that specifies a comment for the external volume. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the external volume was created. + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the external volume + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the external volume + required: + - name + - storage_locations + StorageLocation: + type: object + properties: + name: + type: string + description: '' + storage_provider: + type: string + enum: + - S3 + - S3GOV + - GCS + - AZURE + description: Specifies the cloud storage provider that stores your data files. + required: + - name + - storage_provider + discriminator: + propertyName: storage_provider + mapping: + S3: StorageLocationS3 + S3GOV: StorageLocationS3Gov + GCS: StorageLocationGcs + AZURE: StorageLocationAzure + StorageLocationS3: + properties: + storage_aws_role_arn: + type: string + description: >- + Specifies the case-sensitive Amazon Resource Name (ARN) of the AWS + identity and access management (IAM) role that grants privileges on + the S3 bucket containing your data files. + storage_base_url: + type: string + description: Specifies the base URL for your cloud storage location. + storage_aws_external_id: + type: string + description: >- + Optionally specifies an external ID that Snowflake uses to establish + a trust relationship with AWS. + encryption: + $ref: '#/components/schemas/Encryption' + description: >- + Specifies the properties needed to encrypt data on the external + volume. + name: + type: string + description: '' + storage_provider: + type: string + enum: + - S3 + - S3GOV + - GCS + - AZURE + description: Specifies the cloud storage provider that stores your data files. + required: + - storage_aws_role_arn + - storage_base_url + - name + - storage_provider + type: object + discriminator: + propertyName: storage_provider + mapping: + S3: StorageLocationS3 + S3GOV: StorageLocationS3Gov + GCS: StorageLocationGcs + AZURE: StorageLocationAzure + Encryption: + type: object + properties: + type: + type: string + enum: + - NONE + - AWS_SSE_S3 + - AWS_SSE_KMS + - GCS_SSE_KMS + description: Specifies the encryption type used. + kms_key_id: + type: string + description: >- + Specifies the ID for the Cloud KMS-managed key used to encrypt files + written to the bucket. + required: + - type + StorageLocationS3Gov: + properties: + storage_aws_role_arn: + type: string + description: >- + Specifies the case-sensitive Amazon Resource Name (ARN) of the AWS + identity and access management (IAM) role that grants privileges on + the S3 bucket containing your data files. + storage_base_url: + type: string + description: Specifies the base URL for your cloud storage location. + storage_aws_external_id: + type: string + description: >- + Optionally specifies an external ID that Snowflake uses to establish + a trust relationship with AWS. + encryption: + $ref: '#/components/schemas/Encryption' + description: >- + Specifies the properties needed to encrypt data on the external + volume. + name: + type: string + description: '' + storage_provider: + type: string + enum: + - S3 + - S3GOV + - GCS + - AZURE + description: Specifies the cloud storage provider that stores your data files. + required: + - storage_aws_role_arn + - storage_base_url + - name + - storage_provider + type: object + discriminator: + propertyName: storage_provider + mapping: + S3: StorageLocationS3 + S3GOV: StorageLocationS3Gov + GCS: StorageLocationGcs + AZURE: StorageLocationAzure + StorageLocationGcs: + properties: + storage_base_url: + type: string + description: Specifies the base URL for your cloud storage location. + encryption: + $ref: '#/components/schemas/Encryption' + description: >- + Specifies the properties needed to encrypt data on the external + volume. + name: + type: string + description: '' + storage_provider: + type: string + enum: + - S3 + - S3GOV + - GCS + - AZURE + description: Specifies the cloud storage provider that stores your data files. + required: + - storage_base_url + - name + - storage_provider + type: object + discriminator: + propertyName: storage_provider + mapping: + S3: StorageLocationS3 + S3GOV: StorageLocationS3Gov + GCS: StorageLocationGcs + AZURE: StorageLocationAzure + StorageLocationAzure: + properties: + azure_tenant_id: + type: string + description: >- + Specifies the ID for your Office 365 tenant that the allowed and + blocked storage accounts belong to. + storage_base_url: + type: string + description: Specifies the base URL for your cloud storage location. + name: + type: string + description: '' + storage_provider: + type: string + enum: + - S3 + - S3GOV + - GCS + - AZURE + description: Specifies the cloud storage provider that stores your data files. + required: + - azure_tenant_id + - storage_base_url + - name + - storage_provider + type: object + discriminator: + propertyName: storage_provider + mapping: + S3: StorageLocationS3 + S3GOV: StorageLocationS3Gov + GCS: StorageLocationGcs + AZURE: StorageLocationAzure + NotificationIntegration: + type: object + description: A Snowflake notification + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the notification. + enabled: + type: boolean + description: Whether the notification integration is enabled. + comment: + type: string + description: Comment for the notification integration. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the notification was created. + notification_hook: + $ref: '#/components/schemas/NotificationHook' + required: + - name + - notification_hook + NotificationHook: + type: object + properties: + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationEmail: + properties: + allowed_recipients: + type: array + items: + type: string + description: >- + A comma-separated list of quoted email addresses that can receive + notification emails from this integration. + default_recipients: + type: array + items: + type: string + description: >- + A comma-separated list of default recipients for messages sent with + this integration. + default_subject: + type: string + description: the default subject line for messages sent with this integration. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationWebhook: + properties: + webhook_url: + type: string + description: The URL for the webhook. The URL must use the https:// protocol. + webhook_secret: + $ref: '#/components/schemas/WebhookSecret' + description: The secret to use with this integration. + webhook_body_template: + type: string + description: >- + A template for the body of the HTTP request to send for the + notification. + webhook_headers: + type: object + additionalProperties: + type: string + description: >- + A list of HTTP headers and values to include in the HTTP request for + the webhook. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + required: + - webhook_url + - type + type: object + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + WebhookSecret: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: The name of the secret. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: The database which stores the secret. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: The schema which stores the secret. + required: + - name + - database_name + - schema_name + NotificationQueueAwsSnsOutbound: + properties: + aws_sns_topic_arn: + type: string + description: >- + Amazon Resource Name (ARN) of the Amazon SNS (SNS) topic to which + notifications are pushed. + aws_sns_role_arn: + type: string + description: >- + ARN of the IAM role that has permissions to publish messages to the + SNS topic. + sf_aws_iam_user_arn: + type: string + readOnly: true + description: ARN for the Snowflake IAM user created for your account. + sf_aws_external_id: + type: string + readOnly: true + description: External ID for the Snowflake IAM user created for your account. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationQueueAzureEventGridOutbound: + properties: + azure_event_grid_topic_endpoint: + type: string + description: Event Grid topic endpoint to which Snowpipe pushes notifications. + azure_tenant_id: + type: string + description: >- + ID of the Azure Active Directory tenant used for identity + management. + azure_consent_url: + type: string + readOnly: true + description: URL to the Microsoft permissions request page. + azure_multi_tenant_app_name: + type: string + readOnly: true + description: Name of the Snowflake client application created for your account. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationQueueGcpPubsubOutbound: + properties: + gcp_pubsub_topic_name: + type: string + description: >- + Identification of the Pub/Sub topic to which Snowpipe pushes + notifications. + gcp_pubsub_service_account: + type: string + readOnly: true + description: >- + Google Cloud Platform (GCP) service account created for your + account. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationQueueAzureEventGridInbound: + properties: + azure_storage_queue_primary_uri: + type: string + description: >- + the queue ID for the Azure Queue Storage queue created for Event + Grid notifications. + azure_tenant_id: + type: string + description: >- + the ID of the Azure Active Directory tenant used for identity + management. + azure_consent_url: + type: string + readOnly: true + description: URL to the Microsoft permissions request page. + azure_multi_tenant_app_name: + type: string + readOnly: true + description: Name of the Snowflake client application created for your account. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + NotificationQueueGcpPubsubInbound: + properties: + gcp_pubsub_subscription_name: + type: string + description: >- + Pub/Sub topic subscription ID used to allow Snowflake access to + event messages. + gcp_pubsub_service_account: + type: string + readOnly: true + description: >- + Google Cloud Platform (GCP) service account created for your + account. + type: + type: string + enum: + - EMAIL + - WEBHOOK + - QUEUE_AWS_SNS_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_OUTBOUND + - QUEUE_GCP_PUBSUB_OUTBOUND + - QUEUE_AZURE_EVENT_GRID_INBOUND + - QUEUE_GCP_PUBSUB_INBOUND + description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK + type: object + required: + - type + discriminator: + propertyName: type + mapping: + EMAIL: NotificationEmail + WEBHOOK: NotificationWebhook + QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound + QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound + QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound + QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound + QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound + ListAPIIntegrationsResponse: + type: object + properties: + apiintegrations: + type: array + items: + $ref: '#/components/schemas/ApiIntegration' + ListCatalogIntegrationsResponse: + type: object + properties: + catalog_integrations: + type: array + items: + $ref: '#/components/schemas/CatalogIntegration' + ListExternalVolumesResponse: + type: object + properties: + external_volumes: + type: array + items: + $ref: '#/components/schemas/ExternalVolume' + ListNotificationIntegrationsResponse: + type: object + properties: + notification_integrations: + type: array + items: + $ref: '#/components/schemas/NotificationIntegration' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: >- + Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token + is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: >- + Configure External Oauth with Snowflake (see External + OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to + `OAUTH` and set the Token to the auth token received from the external + Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: >- + Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is + snowflakeOAuth + parameters: + application: + name: application + description: >- + Identifier (i.e. name) for the application to which the resource + belongs. You can use the `/api/v2/applications/{application}` GET + request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: >- + Parameter allowing support for different modes of resource creation. + Possible values include: + + - `errorIfExists`: Throws an error if you try to create a resource that + already exists. + + - `orReplace`: Automatically replaces the existing resource with the + current one. + + - `ifNotExists`: Creates a new resource when an alter is requested for a + non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: >- + Parameter determines whether the revoke operation succeeds or fails for + the privileges, based on the whether the privileges had been re-granted + to another role. + + - restrict: If the privilege being revoked has been re-granted to + another role, the REVOKE command fails. + + - cascade: If the privilege being revoked has been re-granted, the + REVOKE command recursively revokes these dependent grants. If the same + privilege on an object has been granted to the target role by a + different grantor (parallel grant), that grant is not affected and the + target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: >- + Parameter that specifies how to handle the request for a resource that + does not exist: + + - `true`: The endpoint does not throw an error if the resource does not + exist. It returns a 200 success response, but does not take any action + on the resource. + + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: >- + Parameter to filter the command output by resource name. Uses + case-insensitive pattern matching, with support for SQL wildcard + characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: >- + Parameter that filters the command output by a regular expression + pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: >- + Parameter to filter the command output based on the string of characters + that appear at the beginning of the object name. Uses case-sensitive + pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: >- + Parameter to filter the command output to return only root resources + (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: >- + Parameter to enable fetching rows only following the first row whose + object name matches the specified string. Case-sensitive and does not + have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: >- + Type of data format accepted by the resource. Currently supports + `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: >- + Type of the Snowflake authorization token. Currently, keypair-jwt + (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: >- + Identifier (i.e. name) for the database to which the resource belongs. + You can use the `/api/v2/databases` GET request to get a list of + available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: >- + Identifier (i.e. name) for the schema to which the resource belongs. You + can use the `/api/v2/databases/{database}/schemas` GET request to get a + list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: >- + Links to the page of results (e.g. the first page, the last page, etc.). + The header can include multiple 'url' entries with different 'rel' + attribute values that specify the page to return ('first', 'next', + 'prev', and 'last'). + schema: + type: string + example: >- + ; + rel="first",; + rel="next",; + rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: >- + Relative path for checking request status or getting the result, + if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: >- + Bad Request. The request payload is invalid or malformed. This happens + if the application didn't send the correct request payload. The response + body may include the error code and message indicating the actual cause. + The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: >- + Unauthorized. The request is not authorized. This happens if the + attached access token is invalid or missing. The response body may + include the error code and message indicating the actual cause, e.g., + expired, invalid token. The application must obtain a new access token + for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: >- + Forbidden. The request is forbidden. This can also happen if the request + is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: >- + Not Found. The request endpoint is not valid. This happens if the API + endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: >- + Method Not Allowed. The request method doesn't match the supported API. + This happens, for example, if the application calls the API with GET + method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: >- + Request Timeout. This indicates that the request from the client timed + out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: >- + Conflict. The requested operation could not be performed due to a + conflicting state that could not be resolved. This usually happens when + a CREATE request was performed when there is a pre-existing resource + with the same name, and also without one of the options + orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: >- + Gone. This error is primarily intended to assist the task of web + maintenance by notifying the recipient that the resource is + intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: >- + The request header Content-Type includes an unsupported media type. The + API supports application/json only. If none specified, the request + payload is taken as JSON, but if any other media type is specified, this + error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: >- + Limit Exceeded. The number of requests hit the rate limit. The + application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: >- + Internal Server Error. The server hit an unrecoverable system error. The + response body may include the error code and message for further + guidance. The application owner may need to reach out the customer + support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: >- + Service Unavailable. The request was not processed due to server side + timeouts. The application may retry with backoff. The jittered backoff + is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: >- + Gateway Timeout. The request was not processed due to server side + timeouts. The application may retry with backoff. The jittered backoff + is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + api_integrations: + id: snowflake.integrations.api_integrations + name: api_integrations + title: Api Integrations + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1api-integrations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.apiintegrations + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListAPIIntegrationsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"apiintegrations\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1api-integrations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1api-integrations~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1api-integrations~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1api-integrations~1{api_integration_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_integrations/methods/get' + - $ref: '#/components/x-stackQL-resources/api_integrations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/api_integrations/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/api_integrations/methods/delete' + replace: + - $ref: >- + #/components/x-stackQL-resources/api_integrations/methods/create_or_alter + catalog_integrations: + id: snowflake.integrations.catalog_integrations + name: catalog_integrations + title: Catalog Integrations + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1catalog-integrations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.catalog_integrations + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListCatalogIntegrationsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"catalog_integrations\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1catalog-integrations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1catalog-integrations~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1catalog-integrations~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/get' + - $ref: '#/components/x-stackQL-resources/catalog_integrations/methods/list' + insert: + - $ref: >- + #/components/x-stackQL-resources/catalog_integrations/methods/create + update: [] + delete: + - $ref: >- + #/components/x-stackQL-resources/catalog_integrations/methods/delete + replace: [] + external_volumes: + id: snowflake.integrations.external_volumes + name: external_volumes + title: External Volumes + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1external-volumes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.external_volumes + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListExternalVolumesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"external_volumes\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1external-volumes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1external-volumes~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1external-volumes~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1external-volumes~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/external_volumes/methods/get' + - $ref: '#/components/x-stackQL-resources/external_volumes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/external_volumes/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/external_volumes/methods/delete' + replace: [] + notification_integrations: + id: snowflake.integrations.notification_integrations + name: notification_integrations + title: Notification Integrations + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1notification-integrations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.notification_integrations + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListNotificationIntegrationsResponse' + transform: + body: >- + {{- $wrapped := printf "{\"notification_integrations\":%s}" . + -}} + + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1notification-integrations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1notification-integrations~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1notification-integrations~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: >- + #/components/x-stackQL-resources/notification_integrations/methods/get + - $ref: >- + #/components/x-stackQL-resources/notification_integrations/methods/list + insert: + - $ref: >- + #/components/x-stackQL-resources/notification_integrations/methods/create + update: [] + delete: + - $ref: >- + #/components/x-stackQL-resources/notification_integrations/methods/delete + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/managed-account.yaml b/providers/src/snowflake/v00.00.00000/services/managed-account.yaml deleted file mode 100644 index 13aefc67..00000000 --- a/providers/src/snowflake/v00.00.00000/services/managed-account.yaml +++ /dev/null @@ -1,862 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Managed Account API - description: The Snowflake Managed Account API is a REST API that you can use to - access, update, and perform certain actions on Managed Account resource in Snowflake. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/managed-accounts: - get: - summary: List managed accounts. - tags: - - managed-account - description: Lists the accessible managed accounts. - operationId: listManagedAccounts - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ManagedAccount' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a managed accounts. - tags: - - managed-account - description: Creates a managed account. You must provide the full managed account - definition when creating a managed account. - operationId: createManagedAccount - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ManagedAccount' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/managed-accounts/{name}: - delete: - summary: Delete a managed account. - tags: - - managed-account - description: Removes a managed account, including all objects created in the - account, and immediately restricts access to the account. Currently used by - data providers to create reader accounts for their consumers. For more details, - see Manage reader accounts. - operationId: deleteManagedAccount - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - ManagedAccount: - type: object - description: Snowflake account object. - properties: - name: - $ref: '#/components/schemas/Identifier' - description: Name of the account. - cloud: - type: string - readOnly: true - description: Cloud in which the managed account is located. For reader accounts, - this is always the same as the cloud for the provider account. - region: - type: string - readOnly: true - description: Region in which the managed account is located. For reader - accounts, this is always the same as the region for the provider account. - locator: - type: string - readOnly: true - description: Legacy identifier for the account. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time the account was created. - url: - type: string - readOnly: true - description: Account URL that is used to connect to the account, in the - account name format. The account identifier in this format follows the - pattern -. - account_locator_url: - type: string - readOnly: true - description: Account URL that is used to connect to the account, in the - legacy account locator format. - comment: - type: string - description: Optional comment in which to store information related to the - account. - admin_name: - type: string - description: Name of the account administrator. - writeOnly: true - nullable: true - admin_password: - type: string - description: Password for the account administrator. - writeOnly: true - nullable: true - format: password - account_type: - type: string - description: Type of the account. - enum: - - READER - default: READER - required: - - name - - admin_name - - admin_password - - account_type - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - managed_accounts: - methods: - list_managed_accounts: - operation: - $ref: '#/paths/~1api~1v2~1managed-accounts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_managed_account: - operation: - $ref: '#/paths/~1api~1v2~1managed-accounts/post' - response: - mediaType: '' - openAPIDocKey: '200' - delete_managed_account: - operation: - $ref: '#/paths/~1api~1v2~1managed-accounts~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/list_managed_accounts' - insert: - - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/create_managed_account' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/managed_accounts/methods/delete_managed_account' - replace: [] - id: snowflake.managed_account.managed_accounts - name: managed_accounts - title: Managed Accounts -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -tags: -- name: managed-account diff --git a/providers/src/snowflake/v00.00.00000/services/network-policy.yaml b/providers/src/snowflake/v00.00.00000/services/network-policy.yaml deleted file mode 100644 index 11d0d35f..00000000 --- a/providers/src/snowflake/v00.00.00000/services/network-policy.yaml +++ /dev/null @@ -1,891 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Network Policy API - description: The Snowflake Network Policy API is a REST API that you can use to - access, update, and perform certain actions on Network Policy resource in a Snowflake - database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/network-policies: - get: - summary: List network policies - tags: - - network-policy - description: List network policies - operationId: listNetworkPolicies - parameters: [] - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NetworkPolicy' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a network policy - tags: - - network-policy - description: Create a network policy - operationId: createNetworkPolicy - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkPolicy' - /api/v2/network-policies/{name}: - get: - summary: Fetch a network policy - tags: - - network-policy - description: Fetch a network policy - operationId: fetchNetworkPolicy - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkPolicy' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a network policy - tags: - - network-policy - description: Delete a network policy - operationId: deleteNetworkPolicy - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - NetworkPolicy: - type: object - description: A Snowflake network policy - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the network policy - allowed_network_rule_list: - type: array - items: - type: string - description: List of names of allowed network rules in a network policy - blocked_network_rule_list: - type: array - items: - type: string - description: List of names of blocked network rules in a network policy - allowed_ip_list: - type: array - items: - type: string - description: List of allowed IPs in a network policy - blocked_ip_list: - type: array - items: - type: string - description: List of blocked IPs in a network policy - comment: - type: string - description: user comment associated to an object in the dictionary - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the network policy was created. - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the network policy - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the network policy - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - network_policies: - methods: - list_network_policies: - operation: - $ref: '#/paths/~1api~1v2~1network-policies/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_network_policy: - operation: - $ref: '#/paths/~1api~1v2~1network-policies/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_network_policy: - operation: - $ref: '#/paths/~1api~1v2~1network-policies~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_network_policy: - operation: - $ref: '#/paths/~1api~1v2~1network-policies~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/network_policies/methods/list_network_policies' - - $ref: '#/components/x-stackQL-resources/network_policies/methods/fetch_network_policy' - insert: - - $ref: '#/components/x-stackQL-resources/network_policies/methods/create_network_policy' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/network_policies/methods/delete_network_policy' - replace: [] - id: snowflake.network_policy.network_policies - name: network_policies - title: Network Policies diff --git a/providers/src/snowflake/v00.00.00000/services/notebook.yaml b/providers/src/snowflake/v00.00.00000/services/notebook.yaml deleted file mode 100644 index b30c2d35..00000000 --- a/providers/src/snowflake/v00.00.00000/services/notebook.yaml +++ /dev/null @@ -1,1235 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Notebook API - description: The Snowflake Notebook API is a REST API that you can use to access, - update, and perform certain actions on Notebook resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks: - get: - summary: List notebooks - tags: - - notebook - description: List notebooks - operationId: listNotebooks - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Notebook' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a notebook - tags: - - notebook - description: Create a notebook - operationId: createNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Notebook' - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}: - get: - summary: Fetch a notebook - tags: - - notebook - description: Fetch a notebook - operationId: fetchNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Notebook' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a notebook - tags: - - notebook - description: Delete a notebook - operationId: deleteNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:execute: - post: - summary: Execute a Notebook - tags: - - notebook - description: Execute a Notebook - operationId: executeNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/asyncExec' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:rename: - post: - summary: Changes the name of the notebook to new name. - tags: - - notebook - description: Changes the name of the notebook to new name. The new identifier - must be unique for the schema. - operationId: renameNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: targetDatabase - description: Database of the target resource. Defaults to the source's database - in: query - required: false - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - name: targetSchema - description: Schema of the target resource. Defaults to the source's schema - in: query - required: false - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - name: targetName - description: Name of the target resource. - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:add-live-version: - post: - summary: Adds a LIVE version to the notebook - tags: - - notebook - description: Adds a LIVE version to the notebook - operationId: addLiveVersionNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - name: fromLast - description: Sets the LIVE version to the LAST version of the notebook - in: query - required: false - schema: - type: boolean - - name: comment - description: Sets a comment for the notebook or version of the notebook - in: query - required: false - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/notebooks/{name}:commit: - post: - summary: Commits the LIVE version of the notebook - tags: - - notebook - description: If a Git connection is set up for the notebook, commits the LIVE - version of the notebook to the Git repository - operationId: commitNotebook - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - name: version - description: live version of the alias - in: query - required: false - schema: - type: string - - name: comment - description: Sets a comment for the notebook or version of the notebook - in: query - required: false - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Notebook: - type: object - description: A Snowflake notebook - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the notebook - version: - type: string - description: User specified version alias - fromLocation: - type: string - description: Location to copy the file from. This must be a Snowflake stage - location. - main_file: - type: string - description: Name + path of the file for the Notebook - comment: - type: string - description: user comment associated to an object in the dictionary - default_version: - type: string - description: The default version name of a file based entity. - query_warehouse: - type: string - description: Warehouse against which the queries issued by the Streamlit - app are run against - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the notebook was created. - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Database in which the notebook is stored - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Schema in which the notebook is stored - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the notebook - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the notebook - url_id: - type: string - readOnly: true - description: Unique ID associated with the notebook object. - title: - type: string - readOnly: true - description: User facing title of the Streamlit app or an Organization Profile - default_packages: - type: string - readOnly: true - description: Default packages of the notebook - user_packages: - type: string - readOnly: true - description: User packages of the notebook - runtime_name: - type: string - readOnly: true - description: The runtime to run the Streamlit or Notebook on. If this is - not set, the warehouse is assumed - compute_pool: - type: string - readOnly: true - description: Compute pool name where the snowservice runs - import_urls: - type: array - items: - type: string - readOnly: true - description: List of urls - external_access_integrations: - type: array - items: - type: string - readOnly: true - description: List of external access integrations attached to this function - external_access_secrets: - type: string - readOnly: true - description: Secrets to be used with this function for external access - idle_auto_shutdown_time_seconds: - type: integer - format: int64 - readOnly: true - description: Sets the time in seconds for when to shutdown an idle Notebook. - default_version_details: - $ref: '#/components/schemas/VersionDetails' - readOnly: true - last_version_details: - $ref: '#/components/schemas/VersionDetails' - readOnly: true - live_version_location_uri: - type: string - readOnly: true - description: The current version location - budget: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Name of the budget if the notebook is monitored by a budget - required: - - name - VersionDetails: - type: object - description: The version details of a file based entity - properties: - name: - type: string - readOnly: true - description: The last version name - alias: - type: string - readOnly: true - description: The default/last version alias of a file based entity. - location_url: - type: string - readOnly: true - description: The default/last version location. - source_location_uri: - type: string - readOnly: true - description: The default/last version source location. - git_commit_hash: - type: string - readOnly: true - description: The default/last version git commit# - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - notebooks: - methods: - list_notebooks: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - execute_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:execute/post' - response: - mediaType: '' - openAPIDocKey: '200' - rename_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:rename/post' - response: - mediaType: '' - openAPIDocKey: '200' - add_live_version_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:add-live-version/post' - response: - mediaType: '' - openAPIDocKey: '200' - commit_notebook: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1notebooks~1{name}:commit/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/notebooks/methods/list_notebooks' - - $ref: '#/components/x-stackQL-resources/notebooks/methods/fetch_notebook' - insert: - - $ref: '#/components/x-stackQL-resources/notebooks/methods/create_notebook' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/notebooks/methods/delete_notebook' - replace: [] - id: snowflake.notebook.notebooks - name: notebooks - title: Notebooks -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml b/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml deleted file mode 100644 index e8d68aed..00000000 --- a/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml +++ /dev/null @@ -1,1046 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Notification Integration API - description: The Snowflake Notification Integration API is a REST API that you can - use to access, update, and perform certain actions on Notification Integration - resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/notification-integrations: - get: - summary: List notification integrations - tags: - - notification-integration - description: List notification integrations - operationId: listNotificationIntegrations - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a notification integration - tags: - - notification-integration - description: Create a notification integration - operationId: createNotificationIntegration - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationIntegration' - /api/v2/notification-integrations/{name}: - get: - summary: Fetch a notification integration - tags: - - notification-integration - description: Fetch a notification integration - operationId: fetchNotificationIntegration - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationIntegration' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a notification integration - tags: - - notification-integration - description: Delete a notification integration - operationId: deleteNotificationIntegration - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - NotificationIntegration: - type: object - description: A Snowflake notification - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the notification. - enabled: - type: boolean - description: Whether the notification integration is enabled. - comment: - type: string - description: Comment for the notification integration. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the notification was created. - notification_hook: - $ref: '#/components/schemas/NotificationHook' - required: - - name - - notification_hook - NotificationHook: - type: object - properties: - type: - type: string - enum: - - EMAIL - - WEBHOOK - - QUEUE_AWS_SNS_OUTBOUND - - QUEUE_AZURE_EVENT_GRID_OUTBOUND - - QUEUE_GCP_PUBSUB_OUTBOUND - - QUEUE_AZURE_EVENT_GRID_INBOUND - - QUEUE_GCP_PUBSUB_INBOUND - description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK - required: - - type - discriminator: - propertyName: type - mapping: - EMAIL: NotificationEmail - WEBHOOK: NotificationWebhook - QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound - QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound - QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound - QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound - QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound - NotificationEmail: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - allowed_recipients: - type: array - items: - type: string - description: A comma-separated list of quoted email addresses that can receive - notification emails from this integration. - default_recipients: - type: array - items: - type: string - description: A comma-separated list of default recipients for messages sent - with this integration. - default_subject: - type: string - description: the default subject line for messages sent with this integration. - NotificationWebhook: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - webhook_url: - type: string - description: The URL for the webhook. The URL must use the https:// protocol. - webhook_secret: - $ref: '#/components/schemas/WebhookSecret' - description: The secret to use with this integration. - webhook_body_template: - type: string - description: A template for the body of the HTTP request to send for the - notification. - webhook_headers: - type: object - additionalProperties: - type: string - description: A list of HTTP headers and values to include in the HTTP request - for the webhook. - required: - - webhook_url - WebhookSecret: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: The name of the secret. - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: The database which stores the secret. - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: The schema which stores the secret. - required: - - name - - database_name - - schema_name - NotificationQueueAwsSnsOutbound: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - aws_sns_topic_arn: - type: string - description: Amazon Resource Name (ARN) of the Amazon SNS (SNS) topic to - which notifications are pushed. - aws_sns_role_arn: - type: string - description: ARN of the IAM role that has permissions to publish messages - to the SNS topic. - sf_aws_iam_user_arn: - type: string - readOnly: true - description: ARN for the Snowflake IAM user created for your account. - sf_aws_external_id: - type: string - readOnly: true - description: External ID for the Snowflake IAM user created for your account. - NotificationQueueAzureEventGridOutbound: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - azure_event_grid_topic_endpoint: - type: string - description: Event Grid topic endpoint to which Snowpipe pushes notifications. - azure_tenant_id: - type: string - description: ID of the Azure Active Directory tenant used for identity management. - azure_consent_url: - type: string - readOnly: true - description: URL to the Microsoft permissions request page. - azure_multi_tenant_app_name: - type: string - readOnly: true - description: Name of the Snowflake client application created for your account. - NotificationQueueGcpPubsubOutbound: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - gcp_pubsub_topic_name: - type: string - description: Identification of the Pub/Sub topic to which Snowpipe pushes - notifications. - gcp_pubsub_service_account: - type: string - readOnly: true - description: Google Cloud Platform (GCP) service account created for your - account. - NotificationQueueAzureEventGridInbound: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - azure_storage_queue_primary_uri: - type: string - description: the queue ID for the Azure Queue Storage queue created for - Event Grid notifications. - azure_tenant_id: - type: string - description: the ID of the Azure Active Directory tenant used for identity - management. - azure_consent_url: - type: string - readOnly: true - description: URL to the Microsoft permissions request page. - azure_multi_tenant_app_name: - type: string - readOnly: true - description: Name of the Snowflake client application created for your account. - NotificationQueueGcpPubsubInbound: - allOf: - - $ref: '#/components/schemas/NotificationHook' - properties: - gcp_pubsub_subscription_name: - type: string - description: Pub/Sub topic subscription ID used to allow Snowflake access - to event messages. - gcp_pubsub_service_account: - type: string - readOnly: true - description: Google Cloud Platform (GCP) service account created for your - account. - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - notification_integrations: - methods: - list_notification_integrations: - operation: - $ref: '#/paths/~1api~1v2~1notification-integrations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_notification_integration: - operation: - $ref: '#/paths/~1api~1v2~1notification-integrations/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_notification_integration: - operation: - $ref: '#/paths/~1api~1v2~1notification-integrations~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_notification_integration: - operation: - $ref: '#/paths/~1api~1v2~1notification-integrations~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/notification_integrations/methods/list_notification_integrations' - - $ref: '#/components/x-stackQL-resources/notification_integrations/methods/fetch_notification_integration' - insert: - - $ref: '#/components/x-stackQL-resources/notification_integrations/methods/create_notification_integration' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/notification_integrations/methods/delete_notification_integration' - replace: [] - id: snowflake.notification_integration.notification_integrations - name: notification_integrations - title: Notification Integrations -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/pipe.yaml b/providers/src/snowflake/v00.00.00000/services/pipe.yaml deleted file mode 100644 index 905d9565..00000000 --- a/providers/src/snowflake/v00.00.00000/services/pipe.yaml +++ /dev/null @@ -1,990 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Pipe API - description: The Snowflake Pipe API is a REST API that you can use to access, update, - and perform certain actions on Pipe resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/pipes: - get: - summary: List pipes - tags: - - pipe - description: List pipes - operationId: listPipes - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Pipe' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a pipe - tags: - - pipe - description: Create a pipe - operationId: createPipe - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Pipe' - /api/v2/databases/{database_name}/schemas/{schema_name}/pipes/{name}: - get: - summary: Fetch a pipe - tags: - - pipe - description: Fetch a pipe - operationId: fetchPipe - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/Pipe' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a pipe - tags: - - pipe - description: Delete a pipe - operationId: deletePipe - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/pipes/{name}:refresh: - post: - summary: Refresh the pipe - tags: - - pipe - description: Refresh the pipe - operationId: refreshPipe - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: prefix - description: Path (or prefix) appended to the stage reference in the pipe - definition. The path limits the set of files to load. - in: query - required: false - schema: - type: string - - name: modified_after - description: Timestamp (in ISO-8601 format) of the oldest data files to copy - into the Snowpipe ingest queue based on the LAST_MODIFIED date (i.e. date - when a file was staged) - in: query - required: false - schema: - type: string - format: date-time - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Pipe: - type: object - description: A Snowflake pipe - properties: - name: - type: string - description: Name of the pipe - comment: - type: string - description: user comment associated to an object in the dictionary - auto_ingest: - type: boolean - description: TRUE if all files from stage need to be auto-ingested - error_integration: - type: string - description: Link to integration object that point to a user provided Azure - storage queue / SQS. When present, errors (e.g. ingest failure for Snowpipe - or a user task failure or replication failure) will be sent to this queue - to notify customers - aws_sns_topic: - type: string - description: Optional, if provided, auto_ingest pipe will only receive messages - from this SNS topic. - integration: - type: string - description: Link to integration object that ties a user provided storage - queue to an auto_ingest enabled pipe. Required for auto_ingest to work - on azure. - copy_statement: - type: string - description: COPY INTO statement used to load data from queued files - into a Snowflake table. This statement serves as the text/definition for - the pipe and is displayed in the SHOW PIPES output - pattern: (?i)^COPY INTO .* - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the pipe was created. - database_name: - type: string - readOnly: true - description: Database in which the pipe is stored - schema_name: - type: string - readOnly: true - description: Schema in which the pipe is stored - owner: - type: string - readOnly: true - description: Role that owns the pipe - pattern: - type: string - readOnly: true - description: PATTERN copy option value in the COPY INTO
statement - in the pipe definition, if the copy option was specified. - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the pipe - invalid_reason: - type: string - readOnly: true - description: Displays some detailed information for your pipes that may - have issues - budget: - type: string - readOnly: true - description: Name of the budget if the pipe is monitored by a budget - required: - - name - - copy_statement - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - pipes: - methods: - list_pipes: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_pipe: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_pipe: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_pipe: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - refresh_pipe: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}:refresh/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/pipes/methods/list_pipes' - - $ref: '#/components/x-stackQL-resources/pipes/methods/fetch_pipe' - insert: - - $ref: '#/components/x-stackQL-resources/pipes/methods/create_pipe' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/pipes/methods/delete_pipe' - replace: [] - id: snowflake.pipe.pipes - name: pipes - title: Pipes -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/pipelines.yaml b/providers/src/snowflake/v00.00.00000/services/pipelines.yaml new file mode 100644 index 00000000..34068d71 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/pipelines.yaml @@ -0,0 +1,3972 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Pipelines API + description: 'The Snowflake REST API surface for the pipelines service, combining the vendor spec(s): alert.yaml, pipe.yaml, sequence.yaml, stage.yaml, task.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases/{database_name}/schemas/{schema_name}/alerts: + get: + summary: List alerts + tags: + - alert + description: List alerts + operationId: listAlerts + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListAlertsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create an alert + tags: + - alert + description: Create an alert + operationId: createAlert + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Alert' + /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}: + get: + summary: Fetch an alert + tags: + - alert + description: Fetch an alert + operationId: fetchAlert + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/Alert' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete an alert + tags: + - alert + description: Delete an alert + operationId: deleteAlert + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}:clone: + post: + summary: Create a new alert by cloning from the specified resource + tags: + - alert + description: Create a new alert by cloning from the specified resource + operationId: cloneAlert + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: targetDatabase + description: Database of the newly created resource. Defaults to the source's database + in: query + required: true + schema: + type: string + - name: targetSchema + description: Schema of the newly created resource. Defaults to the source's schema + in: query + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AlertClone' + /api/v2/databases/{database_name}/schemas/{schema_name}/alerts/{name}:execute: + post: + summary: Execute an alert + tags: + - alert + description: Execute an alert + operationId: executeAlert + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/pipes: + get: + summary: List pipes + tags: + - pipe + description: List pipes + operationId: listPipes + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListPipesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a pipe + tags: + - pipe + description: Create a pipe + operationId: createPipe + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Pipe' + /api/v2/databases/{database_name}/schemas/{schema_name}/pipes/{name}: + get: + summary: Fetch a pipe + tags: + - pipe + description: Fetch a pipe + operationId: fetchPipe + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/Pipe' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a pipe + tags: + - pipe + description: Delete a pipe + operationId: deletePipe + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/pipes/{name}:refresh: + post: + summary: Refresh the pipe + tags: + - pipe + description: Refresh the pipe + operationId: refreshPipe + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: prefix + description: Path (or prefix) appended to the stage reference in the pipe definition. The path limits the set of files to load. + in: query + required: false + schema: + type: string + - name: modified_after + description: Timestamp (in ISO-8601 format) of the oldest data files to copy into the Snowpipe ingest queue based on the LAST_MODIFIED date (i.e. date when a file was staged) + in: query + required: false + schema: + type: string + format: date-time + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/sequences: + get: + summary: List sequences + tags: + - sequence + description: List sequences + operationId: listSequences + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListSequencesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a sequence + tags: + - sequence + description: Create a sequence + operationId: createSequence + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Sequence' + /api/v2/databases/{database_name}/schemas/{schema_name}/sequences/{name}: + get: + summary: Fetch a sequence + tags: + - sequence + description: Fetch a sequence + operationId: fetchSequence + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Sequence' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a sequence + tags: + - sequence + description: Delete a sequence + operationId: deleteSequence + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/sequences/{name}:clone: + post: + summary: Create a new sequence by cloning from the specified resource + tags: + - sequence + description: Create a new sequence by cloning from the specified resource + operationId: cloneSequence + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Sequence' + /api/v2/databases/{database_name}/schemas/{schema_name}/sequences/{name}:rename: + post: + summary: Rename a sequence with a new identifier + tags: + - sequence + description: Rename a sequence with a new identifier + operationId: renameSequence + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/stages: + get: + summary: List stages + tags: + - stage + description: Lists stages under the database and schema, with show options as query parameters. + operationId: listStages + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListStagesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a stage + tags: + - stage + description: Create a stage, with standard create modifiers as query parameters. See the Stage component definition for what is required to be provided in the request body. + operationId: createStage + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Stage' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}: + get: + summary: Fetch a stage + tags: + - stage + description: Fetch a stage using the describe command output. + operationId: fetchStage + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Stage' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a stage + tags: + - stage + description: Delete a stage with the stage name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. + operationId: deleteStage + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}/files: + get: + summary: List files in the stage. + tags: + - stage + description: List files in the stage -- this is equivalent to LIST @stage. + operationId: listFiles + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/pattern' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListFilesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}/files/{file_path}:presigned-url: + post: + summary: Generate a presigned url and optionally encryption materials. + tags: + - stage + description: Generate a presigned url and optionally encryption materials for uploading and downloading files. + operationId: getPresignedUrl + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - name: file_path + description: The full stage path of the file. + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PresignedUrlRequest' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/FileTransferMaterial' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks: + get: + summary: List tasks + tags: + - task + description: Lists tasks under the database and schema, with show options as query parameters. + operationId: listTasks + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/rootOnly' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListTasksResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a task + tags: + - task + description: Create a task, with standard create modifiers as query parameters. See the Task component definition for what is required to be provided in the request body. + operationId: createTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + example: + name: name_example + warehouse: REGRESS + schedule: + schedule_type: MINUTES_TYPE + minutes: 10 + predecessors: + - task1 + - task2 + - task3 + comment: test_comment + definition: select 1 + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}: + get: + summary: Fetch a task + tags: + - task + description: Fetch a task using the describe command output. + operationId: fetchTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a task + tags: + - task + description: Delete a task with the task name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. + operationId: deleteTask + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:execute: + post: + summary: Execute a task object. + tags: + - task + description: Execute a task -- this is equivalent to EXECUTE IMMEDIATE. + operationId: executeTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/asyncExec' + - name: retryLast + in: query + description: Retry the last failed run of the DAG. + schema: + type: boolean + default: false + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:resume: + post: + summary: Resume a suspended task. + tags: + - task + description: Resumes a suspended task object. This is equivalento an ALTER TASK ... RESUME. + operationId: resumeTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:suspend: + post: + summary: Suspend a running task. + tags: + - task + description: Suspends a running task. This is equivalent to an ALTER TASK ... SUSPEND. + operationId: suspendTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/dependents: + get: + summary: Fetch the dependent tasks of a task + tags: + - task + description: This operation returns a list of the dependent tasks of the task with identifier {name}. + operationId: fetchTaskDependents + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - name: recursive + in: query + description: Specifies whether to limit the output to include only direct child tasks or to include all recursive child tasks. + schema: + type: boolean + default: true + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/FetchTaskDependentsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/current_graphs: + get: + deprecated: true + summary: Get the graph runs that are executing or scheduled for the task for the next 8 days. + tags: + - task + description: This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. + operationId: getCurrentGraphsDeprecated + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: resultLimit + schema: + type: integer + description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/GetCurrentGraphsDeprecatedResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + x-stackql-bare-array-wrap: + wrapperKey: current_graphs_deprecated + wrapperName: GetCurrentGraphsDeprecatedResponse + mediaType: application/json + scalar: false + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/current-graphs: + get: + summary: Get the graph runs that are executing or scheduled for the task for the next 8 days. + tags: + - task + description: This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. + operationId: getCurrentGraphs + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: resultLimit + schema: + type: integer + description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/GetCurrentGraphsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/complete_graphs: + get: + deprecated: true + summary: Get the graph runs that are completed for the task. + tags: + - task + description: This function returns details for graph runs that are completed. + operationId: getCompleteGraphsDeprecated + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: resultLimit + schema: + type: integer + description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. + - in: query + name: errorOnly + schema: + type: boolean + description: Whether to only return results for tasks runs that have failed. Default is false. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/GetCompleteGraphsDeprecatedResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + x-stackql-bare-array-wrap: + wrapperKey: complete_graphs_deprecated + wrapperName: GetCompleteGraphsDeprecatedResponse + mediaType: application/json + scalar: false + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/complete-graphs: + get: + summary: Get the graph runs that are completed for the task. + tags: + - task + description: This function returns details for graph runs that are completed. + operationId: getCompleteGraphs + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - in: query + name: resultLimit + schema: + type: integer + description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. + - in: query + name: errorOnly + schema: + type: boolean + description: Whether to only return results for tasks runs that have failed. Default is false. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/GetCompleteGraphsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{task_name}: + parameters: [] + put: + summary: Create a (or alter an existing) task + tags: + - task + description: Create a (or alter an existing) task. Even if the operation is just an alter, the full property set must be provided. + operationId: createOrAlterTask + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: task_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + Alert: + type: object + description: A Snowflake alert + properties: + name: + type: string + description: Name of the alert + comment: + type: string + description: user comment associated to an object in the dictionary + schedule: + $ref: '#/components/schemas/Schedule' + description: The schedule the alert runs under + warehouse: + type: string + description: The warehouse the alert runs in + condition: + type: string + description: The SQL statement that must be evaluated to determine whether to trigger the alert + action: + type: string + description: The SQL statement to execute when the alert is triggered + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the alert was created. + database_name: + type: string + readOnly: true + description: Database in which the alert is stored + schema_name: + type: string + readOnly: true + description: Schema in which the alert is stored + owner: + type: string + readOnly: true + description: Role that owns the alert + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the alert + state: + type: string + readOnly: true + description: The current state of the alert + required: + - name + - schedule + - condition + - action + Schedule: + type: object + properties: + schedule_type: + type: string + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE + required: + - schedule_type + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + SCHEDULE_TYPE: MinutesSchedule + CronSchedule: + type: object + properties: + cron_expr: + type: string + description: A cron expression for the scheduled execution. + timezone: + type: string + description: The time zone for the schedule. + schedule_type: + type: string + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE + required: + - cron_expr + - timezone + - schedule_type + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + SCHEDULE_TYPE: MinutesSchedule + MinutesSchedule: + type: object + properties: + minutes: + type: integer + schedule_type: + type: string + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE + required: + - minutes + - schedule_type + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + SCHEDULE_TYPE: MinutesSchedule + AlertClone: + type: object + properties: + name: + type: string + description: Name of the alert + point_of_time: + $ref: '#/components/schemas/PointOfTime' + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + required: + - name + PointOfTime: + type: object + properties: + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + type: object + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)). + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - timestamp + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + type: object + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - offset + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + type: object + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - statement + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Pipe: + type: object + description: A Snowflake pipe + properties: + name: + type: string + description: Name of the pipe + comment: + type: string + description: user comment associated to an object in the dictionary + auto_ingest: + type: boolean + description: TRUE if all files from stage need to be auto-ingested + error_integration: + type: string + description: Link to integration object that point to a user provided Azure storage queue / SQS. When present, errors (e.g. ingest failure for Snowpipe or a user task failure or replication failure) will be sent to this queue to notify customers + aws_sns_topic: + type: string + description: Optional, if provided, auto_ingest pipe will only receive messages from this SNS topic. + integration: + type: string + description: Link to integration object that ties a user provided storage queue to an auto_ingest enabled pipe. Required for auto_ingest to work on azure. + copy_statement: + type: string + description: COPY INTO
statement used to load data from queued files into a Snowflake table. This statement serves as the text/definition for the pipe and is displayed in the SHOW PIPES output + pattern: (?i)^COPY INTO .* + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the pipe was created. + database_name: + type: string + readOnly: true + description: Database in which the pipe is stored + schema_name: + type: string + readOnly: true + description: Schema in which the pipe is stored + owner: + type: string + readOnly: true + description: Role that owns the pipe + pattern: + type: string + readOnly: true + description: PATTERN copy option value in the COPY INTO
statement in the pipe definition, if the copy option was specified. + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the pipe + invalid_reason: + type: string + readOnly: true + description: Displays some detailed information for your pipes that may have issues + budget: + type: string + readOnly: true + description: Name of the budget if the pipe is monitored by a budget + required: + - name + - copy_statement + PointOfTime_pipe: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp_pipe: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset_pipe: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement_pipe: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Sequence: + type: object + description: A Snowflake sequence + properties: + start: + type: integer + format: int64 + description: First value returned by the sequence + increment: + type: integer + format: int64 + description: Step interval of the sequence + ordered: + type: boolean + description: Whether or not the values are generated in increasing or decreasing order + comment: + type: string + description: Comment for the sequence + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the sequence + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the sequence was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the sequence is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the sequence is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the sequence + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the sequence + required: + - name + PointOfTime_sequence: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp_sequence: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset_sequence: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement_sequence: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PresignedUrlRequest: + type: object + description: Request object to get presigned url of a file + properties: + expiration_time: + description: Expiration time of the generated presigned url in seconds. + type: integer + FileTransferMaterial: + type: object + description: Materials for uploading and downloading stage files + properties: + presigned_url: + type: string + description: Presigned url for file transfer, only works for Server Side Encrypted Stages. + StageFile: + type: object + description: A file on a snowflake stage. + properties: + name: + type: string + description: Name of the file. + size: + type: string + description: Size of the file. + readOnly: true + md5: + type: string + description: md5 hash of the file. + readOnly: true + last_modified: + type: string + description: Date and time when the file was last modified. + readOnly: true + Stage: + type: object + description: A Snowflake stage. + properties: + name: + $ref: '#/components/schemas/Identifier' + description: String that specifies the identifier (i.e. name) for the stage. + kind: + type: string + enum: + - PERMANENT + - TEMPORARY + default: PERMANENT + description: Specifies whether the stage is permanent or temporary. + url: + type: string + description: URL for the external stage; blank for an internal stage. + endpoint: + type: string + description: The S3-compatible API endpoint associated with the stage; always NULL for stages that are not S3-compatible. + storage_integration: + $ref: '#/components/schemas/Identifier' + description: Storage integration associated with the stage; always NULL for an internal stage. + comment: + type: string + description: Specifies a comment for the stage. + credentials: + $ref: '#/components/schemas/Credentials' + writeOnly: true + description: Credentials of the stage. + encryption: + type: object + description: Encryption parameters of the stage. + writeOnly: true + properties: + type: + type: string + enum: + - SNOWFLAKE_FULL + - SNOWFLAKE_SSE + - AWS_CSE + - AWS_SSE_S3 + - AWS_SSE_KMS + - GCS_SSE_KMS + - AZURE_CSE + - NONE + description: Specifies the encryption type used. + master_key: + type: string + format: password + description: Specifies the client-side master key used to encrypt the files in the bucket. The master key must be a 128-bit or 256-bit key in Base64-encoded form. + kms_key_id: + type: string + description: Optionally specifies the ID for the KMS-managed key used to encrypt files unloaded into the bucket. + directory_table: + type: object + description: Directory table parameters of the stage. + properties: + enable: + type: boolean + default: false + description: Specifies whether to add a directory table to the stage. When the value is TRUE, a directory table is created with the stage. + refresh_on_create: + type: boolean + default: true + description: Specifies whether to automatically refresh the directory table metadata once, immediately after the stage is created. + auto_refresh: + type: boolean + default: false + description: Specifies whether Snowflake should enable triggering automatic refreshes of the directory table metadata when new or updated data files are available in the named external stage specified in the URL value. + notification_integration: + type: string + description: Specifies the name of the notification integration used to automatically refresh the directory table metadata. + created_on: + type: string + description: Date and time when the stage was created. + format: date-time + readOnly: true + has_credentials: + type: boolean + description: Indicates that the external stage has access credentials; always false for an internal stage. + readOnly: true + has_encryption_key: + type: boolean + description: Indicates that the external stage contains encrypted files; always false for an internal stage. + readOnly: true + owner: + type: string + description: Role that owns the stage. + readOnly: true + owner_role_type: + type: string + description: The type of role that owns the object, either ROLE or DATABASE_ROLE. If a Snowflake Native App owns the object, the value is APPLICATION. Snowflake returns NULL if you delete the object because a deleted object does not have an owner role. + readOnly: true + region: + type: string + description: Region where the stage is located. + readOnly: true + cloud: + type: string + description: Cloud provider; always NULL for an internal stage. + readOnly: true + example: + name: stage_name + required: + - name + Credentials: + type: object + description: Specifies the credentials of the stage. + properties: + credential_type: + description: Type of the credential, can be either AWS or AZURE. + type: string + discriminator: + propertyName: credential_type + mapping: + AWS: AwsCredentials + AZURE: AzureCredentials + AwsCredentials: + description: Specifies the AWS credentials of the stage. + properties: + aws_key_id: + type: string + format: password + description: Scoped credentials generated by AWS Security Token Service (STS). + aws_secret_key: + type: string + format: password + description: Scoped credentials generated by AWS Security Token Service (STS). + aws_token: + type: string + format: password + description: Scoped credentials generated by AWS Security Token Service (STS). + aws_role: + type: string + description: Omit the security credentials and access keys and, instead, identify the role using AWS_ROLE and specify the AWS role ARN (Amazon Resource Name). + credential_type: + description: Type of the credential, can be either AWS or AZURE. + type: string + type: object + discriminator: + propertyName: credential_type + mapping: + AWS: AwsCredentials + AZURE: AzureCredentials + AzureCredentials: + description: Specifies the Azure credentials of the stage. + properties: + azure_sas_token: + type: string + format: password + description: Specifies the SAS (shared access signature) token for connecting to Azure. + credential_type: + description: Type of the credential, can be either AWS or AZURE. + type: string + type: object + discriminator: + propertyName: credential_type + mapping: + AWS: AwsCredentials + AZURE: AzureCredentials + PointOfTime_stage: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp_stage: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset_stage: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement_stage: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + TaskRun: + type: object + description: A task run executing a standalone task or a DAG of tasks starting from the root task. + properties: + root_task_name: + type: string + description: The name of the root task in the current task run. + readOnly: true + database_name: + type: string + description: The name of the current database for the task run. + readOnly: true + schema_name: + type: string + description: The name of the current schema for the task run. + readOnly: true + state: + type: string + description: The current state of the task run. + enum: + - SCHEDULED + - EXECUTING + - SUCCEEDED + - FAILED + - CANCELLED + - SKIPPED + readOnly: true + first_error_task_name: + type: string + description: The name of the first task throwing an error in the task run. + readOnly: true + first_error_code: + type: integer + description: The first error code thrown in the task run. + readOnly: true + first_error_message: + type: string + description: The first error message thrown in the task run. + readOnly: true + scheduled_time: + type: string + description: The scheduled time for the task run. + format: date-time + readOnly: true + query_start_time: + type: string + description: The start time for the task run query. + format: date-time + readOnly: true + next_scheduled_time: + type: string + description: The next upcoming time for the task run. + format: date-time + readOnly: true + completed_time: + type: string + description: The time this task run was last completed. + format: date-time + readOnly: true + root_task_id: + type: string + description: The unique task ID for the root task. + readOnly: true + graph_version: + type: integer + description: The current version of the DAG on the task run. + readOnly: true + run_id: + type: integer + description: The unique ID for the current task run. + readOnly: true + example: + root_task_name: root_task + database_name: test_db + schema_name: test_schema + state: SCHEDULED + first_error_task_name: test_task + first_error_code: 0 + first_error_message: ERROR + scheduled_time: '2024-06-18T01:01:01.111111' + query_start_time: '2024-06-18T01:01:01.111111' + next_scheduled_time: '2024-06-18T01:01:01.111111' + completed_time: '2024-06-18T01:01:01.111111' + root_task_id: '0' + graph_version: 0 + run_id: 0 + required: + - root_task_name + - database_name + - schema_name + - state + - scheduled_time + - next_scheduled_time + - root_task_id + - graph_version + - run_id + Task: + type: object + description: A Snowflake task, used to execute SQL code. + properties: + name: + $ref: '#/components/schemas/Identifier' + description: String that specifies the identifier (i.e. name) for the task. + warehouse: + $ref: '#/components/schemas/Identifier' + description: Specifies the virtual warehouse that provides compute resources for task runs. Omit this parameter to use serverless compute resources for runs of this task. + schedule: + $ref: '#/components/schemas/TaskSchedule' + description: Specifies the schedule for periodically running the task. + comment: + type: string + description: Specifies a comment for the task. + finalize: + type: string + description: Specifies the name of the root task that the finalizer task is associated with. + task_auto_retry_attempts: + type: integer + description: Root task settable only. Specifies the number of automatic task graph retry attempts. Valid range is 0 to 30. When not specified, no retry would happen. + minimum: 0 + maximum: 30 + config: + type: object + additionalProperties: true + description: Task Config + session_parameters: + type: object + additionalProperties: true + description: Session Parameters for the task at runtime. + definition: + type: string + description: The SQL definition for the task. Any one of single SQL statement, call to stored procedure, or procedural logic using Snowflake scripting. + predecessors: + type: array + description: Specifies one or more predecessor tasks for the current task + items: + type: string + description: The identifier for the task. + task_relations: + type: string + description: Displays the relationship between the root task and its corresponding finalizer tasks. + readOnly: true + user_task_managed_initial_warehouse_size: + type: string + description: Specifies the size of the compute resources to provision for the first run of the task. This parameter only applies to serverless tasks. + target_completion_interval: + $ref: '#/components/schemas/MinutesSchedule_task' + description: Specifies the desired task completion time. This parameter only applies to serverless tasks. + serverless_task_min_statement_size: + type: string + description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. + serverless_task_max_statement_size: + type: string + description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. + user_task_timeout_ms: + type: integer + description: Specifies the time limit on a single run of the task before it times out (in milliseconds). + suspend_task_after_num_failures: + type: integer + description: Specifies the number of consecutive failed task runs after which the current task is suspended automatically. + condition: + type: string + description: Specifies a Boolean SQL expression condition; multiple conditions joined with AND/OR are supported + allow_overlapping_execution: + type: boolean + description: Specifies whether to allow multiple instances of the DAG to run concurrently. + error_integration: + type: string + description: Specifies the name of the notification integration used to communicate with Amazon SNS, MS Azure Event Grid, or Google Pub/Sub. + created_on: + type: string + description: The time the task was created on. + format: date-time + readOnly: true + id: + type: string + description: An ID for the current task. + readOnly: true + owner: + type: string + description: The role that owns the task. + readOnly: true + owner_role_type: + type: string + description: The role type of the task owner. + readOnly: true + state: + type: string + description: The state of the task. Must be one of started or suspended. + readOnly: true + enum: + - started + - suspended + last_committed_on: + type: string + description: The time the task was last committed on. + readOnly: true + format: date-time + last_suspended_on: + type: string + description: The time the task was last suspended on. + readOnly: true + format: date-time + database_name: + type: string + description: The name of the parent database for the task. + readOnly: true + schema_name: + type: string + description: The name of the parent schema for the task. + readOnly: true + example: + name: name_example + schedule: + schedule_type: MINUTES_TYPE + minutes: 10 + comment: test_comment + config: + output_dir: /temp/test_directory/ + learning_rate: '0.1' + definition: this task does... + predecessors: + - task1 + - task2 + - task3 + user_task_managed_initial_warehouse_size: SMALL + target_completion_interval: + schedule_type: MINUTES_TYPE + minutes: 5 + serverless_task_min_statement_size: XSMALL + serverless_task_max_statement_size: MEDIUM + user_task_timeout_ms: 10 + suspend_task_after_num_failures: 3 + condition: select 1 + allow_overlapping_execution: false + error_integration: my_notification_int + created_on: '2024-06-18T01:01:01.111111' + id: task_id + owner: TASK_ADMIN + owner_role_type: ADMIN + state: started + last_committed_on: '2024-06-18T01:01:01.111111' + last_suspended_on: '2024-06-18T01:01:01.111111' + database_name: TESTDB + schema_name: TESTSCHEMA + required: + - name + - definition + TaskSchedule: + type: object + description: Specifies the schedule for periodically running the task. + properties: + schedule_type: + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. + type: string + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + MINUTES_TYPE: MinutesSchedule + CronSchedule_task: + description: A cron schedule for executing a task at a specified interval. + properties: + cron_expr: + type: string + description: A cron expression for the task execution. + timezone: + type: string + description: The time zone for the schedule. + schedule_type: + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. + type: string + example: + cron_expr: '* * * * ? *' + timezone: america/los_angeles + required: + - cron_expr + - timezone + type: object + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + MINUTES_TYPE: MinutesSchedule + MinutesSchedule_task: + description: A schedule for executing a task at specified intervals of minutes. + properties: + minutes: + type: integer + description: The number of minutes between each task run. + schedule_type: + description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. + type: string + example: + minutes: 10 + required: + - minutes + type: object + discriminator: + propertyName: schedule_type + mapping: + CRON_TYPE: CronSchedule + MINUTES_TYPE: MinutesSchedule + PointOfTime_task: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp_task: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset_task: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement_task: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + ListAlertsResponse: + type: object + properties: + alerts: + type: array + items: + $ref: '#/components/schemas/Alert' + ListPipesResponse: + type: object + properties: + pipes: + type: array + items: + $ref: '#/components/schemas/Pipe' + ListSequencesResponse: + type: object + properties: + sequences: + type: array + items: + $ref: '#/components/schemas/Sequence' + ListStagesResponse: + type: object + properties: + stages: + type: array + items: + $ref: '#/components/schemas/Stage' + ListFilesResponse: + type: object + properties: + files: + type: array + items: + $ref: '#/components/schemas/StageFile' + ListTasksResponse: + type: object + properties: + tasks: + type: array + items: + $ref: '#/components/schemas/Task' + FetchTaskDependentsResponse: + type: object + properties: + task_dependents: + type: array + items: + $ref: '#/components/schemas/Task' + GetCurrentGraphsDeprecatedResponse: + type: object + properties: + current_graphs_deprecated: + type: array + items: + $ref: '#/components/schemas/TaskRun' + GetCurrentGraphsResponse: + type: object + properties: + current_graphs: + type: array + items: + $ref: '#/components/schemas/TaskRun' + GetCompleteGraphsDeprecatedResponse: + type: object + properties: + complete_graphs_deprecated: + type: array + items: + $ref: '#/components/schemas/TaskRun' + GetCompleteGraphsResponse: + type: object + properties: + complete_graphs: + type: array + items: + $ref: '#/components/schemas/TaskRun' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + alerts: + id: snowflake.pipelines.alerts + name: alerts + title: Alerts + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.alerts + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListAlertsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"alerts\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + execute: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1alerts~1{name}:execute/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/alerts/methods/get' + - $ref: '#/components/x-stackQL-resources/alerts/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/alerts/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/alerts/methods/delete' + replace: [] + pipes: + id: snowflake.pipelines.pipes + name: pipes + title: Pipes + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.pipes + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListPipesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"pipes\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + refresh: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1pipes~1{name}:refresh/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pipes/methods/get' + - $ref: '#/components/x-stackQL-resources/pipes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/pipes/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/pipes/methods/delete' + replace: [] + sequences: + id: snowflake.pipelines.sequences + name: sequences + title: Sequences + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.sequences + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListSequencesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"sequences\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1sequences~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sequences/methods/get' + - $ref: '#/components/x-stackQL-resources/sequences/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sequences/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sequences/methods/delete' + replace: [] + stages: + id: snowflake.pipelines.stages + name: stages + title: Stages + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.stages + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListStagesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"stages\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/stages/methods/get' + - $ref: '#/components/x-stackQL-resources/stages/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/stages/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/stages/methods/delete' + replace: [] + stage_files: + id: snowflake.pipelines.stage_files + name: stage_files + title: Stage Files + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}~1files/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.files + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListFilesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"files\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + presigned_url: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}~1files~1{file_path}:presigned-url/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/stage_files/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tasks: + id: snowflake.pipelines.tasks + name: tasks + title: Tasks + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.tasks + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListTasksResponse' + transform: + body: |- + {{- $wrapped := printf "{\"tasks\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + execute: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:execute/post' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{task_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tasks/methods/get' + - $ref: '#/components/x-stackQL-resources/tasks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/tasks/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tasks/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tasks/methods/create_or_alter' + task_dependents: + id: snowflake.pipelines.task_dependents + name: task_dependents + title: Task Dependents + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1dependents/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.task_dependents + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/FetchTaskDependentsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"task_dependents\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/task_dependents/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + task_current_graphs: + id: snowflake.pipelines.task_current_graphs + name: task_current_graphs + title: Task Current Graphs + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1current-graphs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.current_graphs + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/GetCurrentGraphsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"current_graphs\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/task_current_graphs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + task_complete_graphs: + id: snowflake.pipelines.task_complete_graphs + name: task_complete_graphs + title: Task Complete Graphs + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1complete-graphs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.complete_graphs + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/GetCompleteGraphsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"complete_graphs\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/task_complete_graphs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/procedure.yaml b/providers/src/snowflake/v00.00.00000/services/procedure.yaml deleted file mode 100644 index f73a17c3..00000000 --- a/providers/src/snowflake/v00.00.00000/services/procedure.yaml +++ /dev/null @@ -1,1468 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Procedure API - description: The Snowflake Procedure API is a REST API that you can use to access, - update, and perform certain actions on Procedure resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/procedures: - get: - summary: List procedures - tags: - - procedure - description: List procedures - operationId: listProcedures - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Procedure' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a procedure - tags: - - procedure - description: Create a procedure - operationId: createProcedure - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Procedure' - /api/v2/databases/{database_name}/schemas/{schema_name}/procedures/{nameWithArgs}: - get: - summary: Fetch a procedure - tags: - - procedure - description: Fetch a procedure - operationId: fetchProcedure - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Procedure' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a procedure - tags: - - procedure - description: Delete a procedure - operationId: deleteProcedure - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/procedures/{nameWithArgs}:call: - post: - summary: Call a procedure - tags: - - procedure - description: Call a procedure - operationId: callProcedure - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: {} - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CallArgumentList' -components: - schemas: - Procedure: - type: object - description: A Snowflake procedure - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the procedure - execute_as: - type: string - enum: - - CALLER - - OWNER - description: What permissions should the procedure execution be called with - is_secure: - type: boolean - description: Specifies whether the function/procedure is secure or not - arguments: - type: array - items: - $ref: '#/components/schemas/Argument' - description: List of arguments for the function/procedure - return_type: - $ref: '#/components/schemas/ReturnType' - description: Return type of the function/procedure. Should be a SQL data - type or a table - language_config: - $ref: '#/components/schemas/FunctionLanguage' - description: Language that the function/procedure is written in - comment: - type: string - description: Specifies a comment for the function/procedure - body: - type: string - description: Function/procedure definition - created_on: - type: string - format: date-time - readOnly: true - description: The date and time when the function/procedure was created - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The name of the schema in which the function/procedure exists. - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The name of the database in which the function/procedure exists. - min_num_arguments: - type: integer - readOnly: true - description: The minimum number of arguments - max_num_arguments: - type: integer - readOnly: true - description: The maximum number of arguments - owner: - type: string - readOnly: true - description: Role that owns the function/procedure - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the function/procedure - is_builtin: - type: boolean - readOnly: true - description: If the function/procedure is built-in or not (user-defined) - required: - - name - - arguments - - return_type - - language_config - - body - Argument: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Argument name - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Argument data type - default_value: - type: string - description: Default value of the argument - required: - - name - - datatype - ReturnType: - type: object - properties: - type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Type of the return, can be either DATATYPE or TABLE - required: - - type - discriminator: - propertyName: type - mapping: - DATATYPE: ReturnDataType - TABLE: ReturnTable - ReturnDataType: - allOf: - - $ref: '#/components/schemas/ReturnType' - properties: - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Return data type - nullable: - type: boolean - description: Argument null return acceptance criteria - required: - - datatype - ReturnTable: - allOf: - - $ref: '#/components/schemas/ReturnType' - properties: - column_list: - type: array - items: - $ref: '#/components/schemas/ColumnType' - description: List of table columns to return - ColumnType: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Argument name - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Argument data type - required: - - name - - datatype - FunctionLanguage: - type: object - properties: - language: - type: string - description: 'Language that the function/procedure is written in. Possible - values include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL' - called_on_null_input: - type: boolean - description: Decide if the function/procedure can receive null input - required: - - language - discriminator: - propertyName: language - mapping: - JAVA: JavaFunction - PYTHON: PythonFunction - SCALA: ScalaFunction - JAVASCRIPT: JavaScriptFunction - SQL: SQLFunction - BaseLanguage: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - properties: - runtime_version: - type: string - description: Runtime version of the function's/procedure's specified language - packages: - type: array - items: - type: string - description: Packages to include with the function/procedure - imports: - type: array - items: - type: string - description: List of imports - handler: - type: string - description: Fully qualified method name including the package and the class - required: - - runtime_version - - packages - - handler - JavaFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - external_access_integrations: - type: array - items: - type: string - description: List of external access integrations attached to this function/procedure - secrets: - type: object - additionalProperties: - type: string - description: Secrets to be used with this function/procedure for external - access - target_path: - type: string - description: Specifies where Snowflake should write the compiled code for - inline procedures - PythonFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - external_access_integrations: - type: array - items: - type: string - description: List of external access integrations attached to this function/procedure - secrets: - type: object - additionalProperties: - type: string - description: Secrets to be used with this function/procedure for external - access - ScalaFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - target_path: - type: string - description: Specifies where Snowflake should write the compiled code for - inline function/procedures - JavaScriptFunction: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - SQLFunction: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - CallArgumentList: - type: object - properties: - call_arguments: - type: array - items: - $ref: '#/components/schemas/CallArgument' - description: Call Argument list - required: - - call_arguments - CallArgument: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the call argument - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Call argument data type - value: - description: Value of the call argument - required: - - name - - datatype - - value - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - procedures: - methods: - list_procedures: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_procedure: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_procedure: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{nameWithArgs}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_procedure: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{nameWithArgs}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - call_procedure: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1procedures~1{nameWithArgs}:call/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/procedures/methods/list_procedures' - - $ref: '#/components/x-stackQL-resources/procedures/methods/fetch_procedure' - insert: - - $ref: '#/components/x-stackQL-resources/procedures/methods/create_procedure' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/procedures/methods/delete_procedure' - replace: [] - id: snowflake.procedure.procedures - name: procedures - title: Procedures -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/result.yaml b/providers/src/snowflake/v00.00.00000/services/result.yaml deleted file mode 100644 index 777411cb..00000000 --- a/providers/src/snowflake/v00.00.00000/services/result.yaml +++ /dev/null @@ -1,708 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Result API - description: The Snowflake Result API is a REST API that you can use to check request - status and fetch request response. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/results/{result_handler}: - get: - summary: Check result status or fetch request - tags: - - result - description: Get result status or the result when it is ready. - operationId: fetchResult - parameters: - - name: result_handler - in: path - required: true - schema: - type: string - description: The opaque result id. - - name: page - in: query - required: false - schema: - type: integer - format: int64 - minimum: 0 - default: 0 - description: Number of the page of results to return. The number can range - from 0 to the total number of pages minus 1. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: {} - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - schemas: - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - results: - methods: - fetch_result: - operation: - $ref: '#/paths/~1api~1v2~1results~1{result_handler}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.result.results - name: results - title: Results -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/role.yaml b/providers/src/snowflake/v00.00.00000/services/role.yaml deleted file mode 100644 index 4682f80f..00000000 --- a/providers/src/snowflake/v00.00.00000/services/role.yaml +++ /dev/null @@ -1,1461 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Role API - description: The Snowflake Role API is a REST API that you can use to access, update, - and perform certain actions on Role resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/roles: - get: - summary: List roles - tags: - - role - description: List roles - operationId: listRoles - parameters: - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Role' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a role - tags: - - role - description: Create a role - operationId: createRole - parameters: - - $ref: '#/components/parameters/createMode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Role' - /api/v2/roles/{name}: - delete: - summary: Delete a role - tags: - - role - description: Delete a role - operationId: deleteRole - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/roles/{name}/grants: - get: - summary: List all grants to the role - tags: - - role - description: List all grants to the role - operationId: listGrants - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Grant' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Grant privileges to the role - tags: - - role - description: Grant privileges to the role - operationId: grantPrivileges - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/roles/{name}/grants:revoke: - post: - summary: Revoke grants from the role - tags: - - role - description: Revoke grants from the role - operationId: revokeGrants - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/mode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/roles/{name}/grants-of: - get: - summary: List all grants of the role - tags: - - role - description: List all grants of the role - operationId: listGrantsOf - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GrantOf' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/roles/{name}/grants-on: - get: - summary: List all grants on the role - tags: - - role - description: List all grants on the role - operationId: listGrantsOn - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GrantOn' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/roles/{name}/future-grants: - get: - summary: List all future grants to the role - tags: - - role - description: List all future grants to the role - operationId: listFutureGrants - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Grant' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Grant future privileges to the role - tags: - - role - description: Grant future privileges to the role - operationId: grantFuturePrivileges - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - /api/v2/roles/{name}/future-grants:revoke: - post: - summary: Revoke future grants from the role - tags: - - role - description: Revoke future grants from the role - operationId: revokeFutureGrants - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/mode' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' -components: - schemas: - Role: - type: object - description: A Snowflake role - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the role. - comment: - type: string - description: Comment of the role. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the role was created. - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Specifies the role that owns this role. - is_default: - type: boolean - readOnly: true - description: Specifies whether the role being fetched is the user's default - role. - is_current: - type: boolean - readOnly: true - description: Specifies whether the role being fetched is the user's current - role. - is_inherited: - type: boolean - readOnly: true - description: Specifies whether the role used to run the command inherits - the specified role. - assigned_to_users: - type: integer - format: int64 - readOnly: true - description: The number of users to whom this role has been assigned. - granted_to_roles: - type: integer - format: int64 - readOnly: true - description: The number of roles to which this role has been granted. - granted_roles: - type: integer - format: int64 - readOnly: true - description: The number of roles that have been granted to this role. - required: - - name - Grant: - type: object - properties: - securable: - $ref: '#/components/schemas/Securable' - description: Securable of the grant - containing_scope: - $ref: '#/components/schemas/ContainingScope' - description: Containing scope of the grant - securable_type: - type: string - description: Type of the securable to be granted. - grant_option: - type: boolean - description: If true, allows the recipient role to grant the privileges - to other roles. - privileges: - type: array - items: - type: string - description: List of privileges to be granted. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - granted_by: - type: string - readOnly: true - description: The role that granted this privilege to this grantee - required: - - securable_type - Securable: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable if applicable. - service: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Service name of the securable if applicable. - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the securable if applicable. - required: - - name - ContainingScope: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable scope if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable scope if applicable. - required: - - database - GrantOf: - type: object - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - role: - type: string - readOnly: true - description: The name of the role - granted_to: - type: string - readOnly: true - description: The type of the grantee, can be USER or ROLE - grantee_name: - type: string - readOnly: true - description: The name of the grantee - granted_by: - type: string - readOnly: true - description: The role that granted this role to this grantee - GrantOn: - type: object - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - privilege: - type: string - readOnly: true - description: The name of the privilege - granted_on: - type: string - readOnly: true - description: The type of of the role - name: - type: string - readOnly: true - description: The name of the role - granted_to: - type: string - readOnly: true - description: The type of the grantee - grantee_name: - type: string - readOnly: true - description: The name of the grantee - grant_option: - type: string - readOnly: true - description: If true, allows the recipient role to grant the privileges - to other roles. - granted_by: - type: string - readOnly: true - description: The role that granted this privilege to this grantee - granted_by_role_type: - type: string - readOnly: true - description: Type of the role that granted this privilege to this grantee - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - roles: - methods: - list_roles: - operation: - $ref: '#/paths/~1api~1v2~1roles/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_role: - operation: - $ref: '#/paths/~1api~1v2~1roles/post' - response: - mediaType: '' - openAPIDocKey: '200' - delete_role: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/roles/methods/list_roles' - insert: - - $ref: '#/components/x-stackQL-resources/roles/methods/create_role' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/roles/methods/delete_role' - replace: [] - id: snowflake.role.roles - name: roles - title: Roles - grants: - methods: - list_grants: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - grant_privileges: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants/post' - response: - mediaType: '' - openAPIDocKey: '200' - revoke_grants: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants:revoke/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants/methods/list_grants' - insert: - - $ref: '#/components/x-stackQL-resources/grants/methods/grant_privileges' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/grants/methods/revoke_grants' - replace: [] - id: snowflake.role.grants - name: grants - title: Grants - grants_of: - methods: - list_grants_of: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants-of/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants_of/methods/list_grants_of' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.role.grants_of - name: grants_of - title: Grants Of - grants_on: - methods: - list_grants_on: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants-on/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants_on/methods/list_grants_on' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.role.grants_on - name: grants_on - title: Grants On - future_grants: - methods: - list_future_grants: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - grant_future_privileges: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants/post' - response: - mediaType: '' - openAPIDocKey: '200' - revoke_future_grants: - operation: - $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants:revoke/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/list_future_grants' - insert: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/grant_future_privileges' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/future_grants/methods/revoke_future_grants' - replace: [] - id: snowflake.role.future_grants - name: future_grants - title: Future Grants -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/roles.yaml b/providers/src/snowflake/v00.00.00000/services/roles.yaml new file mode 100644 index 00000000..83d692b5 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/roles.yaml @@ -0,0 +1,2916 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Roles API + description: 'The Snowflake REST API surface for the roles service, combining the vendor spec(s): database-role.yaml, role.yaml, user.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases/{database_name}/database-roles: + get: + summary: List database roles + tags: + - database-role + description: List database roles + operationId: listDatabaseRoles + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatabaseRolesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a database role + tags: + - database-role + description: Create a database role + operationId: createDatabaseRole + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseRole' + /api/v2/databases/{database_name}/database-roles/{name}: + delete: + summary: Delete a database role + tags: + - database-role + description: Delete a database role + operationId: deleteDatabaseRole + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/database-roles/{name}:clone: + post: + summary: Create a new database role by cloning from the specified resource + tags: + - database-role + description: Create a new database role by cloning from the specified resource + operationId: cloneDatabaseRole + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseRoleClone' + /api/v2/databases/{database_name}/database-roles/{name}/grants: + get: + summary: List all grants to the role + tags: + - database-role + description: List all grants to the role + operationId: listDatabaseRoleGrants + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatabaseRoleGrantsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Grant privileges to the role + tags: + - database-role + description: Grant privileges to the role + operationId: grantDatabaseRolePrivileges + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/databases/{database_name}/database-roles/{name}/grants:revoke: + post: + summary: Revoke grants from the role + tags: + - database-role + description: Revoke grants from the role + operationId: revokeDatabaseRoleGrants + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/mode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/databases/{database_name}/database-roles/{name}/future-grants: + get: + summary: List all future grants to the role + tags: + - database-role + description: List all future grants to the role + operationId: listDatabaseRoleFutureGrants + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListDatabaseRoleFutureGrantsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Grant future privileges to the role + tags: + - database-role + description: Grant future privileges to the role + operationId: grantDatabaseRoleFuturePrivileges + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/databases/{database_name}/database-roles/{name}/future-grants:revoke: + post: + summary: Revoke future grants from the role + tags: + - database-role + description: Revoke future grants from the role + operationId: revokeDatabaseRoleFutureGrants + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/mode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/roles: + get: + summary: List roles + tags: + - role + description: List roles + operationId: listRoles + parameters: + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListRolesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a role + tags: + - role + description: Create a role + operationId: createRole + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + /api/v2/roles/{name}: + delete: + summary: Delete a role + tags: + - role + description: Delete a role + operationId: deleteRole + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/roles/{name}/grants: + get: + summary: List all grants to the role + tags: + - role + description: List all grants to the role + operationId: listRoleGrants + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListRoleGrantsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Grant privileges to the role + tags: + - role + description: Grant privileges to the role + operationId: grantRolePrivileges + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/roles/{name}/grants:revoke: + post: + summary: Revoke grants from the role + tags: + - role + description: Revoke grants from the role + operationId: revokeRoleGrants + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/mode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/roles/{name}/grants-of: + get: + summary: List all grants of the role + tags: + - role + description: List all grants of the role + operationId: listGrantsOf + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListGrantsOfResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/roles/{name}/grants-on: + get: + summary: List all grants on the role + tags: + - role + description: List all grants on the role + operationId: listGrantsOn + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListGrantsOnResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/roles/{name}/future-grants: + get: + summary: List all future grants to the role + tags: + - role + description: List all future grants to the role + operationId: listRoleFutureGrants + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListRoleFutureGrantsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Grant future privileges to the role + tags: + - role + description: Grant future privileges to the role + operationId: grantRoleFuturePrivileges + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/roles/{name}/future-grants:revoke: + post: + summary: Revoke future grants from the role + tags: + - role + description: Revoke future grants from the role + operationId: revokeRoleFutureGrants + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/mode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + /api/v2/users: + post: + summary: Create a user + tags: + - user + description: Create a user according to the parameters given + operationId: createUser + parameters: + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/User' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + get: + summary: List users in the system. + tags: + - user + description: Lists the users in the system. + operationId: listUsers + parameters: + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListUsersResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/users/{name}: + get: + parameters: + - $ref: '#/components/parameters/name' + summary: Fetch information about a user + tags: + - user + description: Fetch user information using the result of the DESCRIBE command + operationId: fetchUser + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a user + tags: + - user + description: Delete a user with the given name. + operationId: deleteUser + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/users/{name}/grants: + get: + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/showLimit' + summary: List all grants to the user + tags: + - user + description: List all grants to the user + operationId: listUserGrants + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListUserGrantsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Grant a role to the user + tags: + - user + description: Grant a role to the user + operationId: grantUserPrivileges + parameters: + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant_user' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/users/{name}/grants:revoke: + post: + summary: Revoke grants from the user + tags: + - user + description: Revoke grants from the user + operationId: revokeUserGrants + parameters: + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Grant_user' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/users/{user_name}: + parameters: [] + put: + summary: Create a (or alter an existing) user. + description: Create a (or alter an existing) user. Even if the operation is just an alter, the full property set must be provided. Note that password is not currently altered by this operation but is supported for a newly-created object. + operationId: createOrAlterUser + tags: + - user + parameters: + - name: user_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/User' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + DatabaseRole: + type: object + description: A Snowflake database role + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the database role + comment: + type: string + description: User comment associated to an object in the dictionary + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the database role was created + granted_to_roles: + type: integer + format: int64 + readOnly: true + description: How many roles this database role has been granted to + granted_to_database_roles: + type: integer + format: int64 + readOnly: true + description: How many database roles this database role has been granted to + granted_database_roles: + type: integer + format: int64 + readOnly: true + description: How many database roles this database role has been granted + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the database role + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the database role + required: + - name + DatabaseRoleClone: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the database role + required: + - name + Grant: + type: object + properties: + securable: + $ref: '#/components/schemas/Securable' + description: Securable of the grant + containing_scope: + $ref: '#/components/schemas/ContainingScope' + description: Containing scope of the grant + securable_type: + type: string + description: Type of the securable to be granted. + grant_option: + type: boolean + description: If true, allows the recipient role to grant the privileges to other roles. + privileges: + type: array + items: + type: string + description: List of privileges to be granted. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + granted_by: + type: string + readOnly: true + description: The role that granted this privilege to this grantee + required: + - securable_type + Securable: + type: object + properties: + database: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name of the securable if applicable. + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name of the securable if applicable. + service: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Service name of the securable if applicable. + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the securable if applicable. + required: + - name + ContainingScope: + type: object + properties: + database: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name of the securable scope if applicable. + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name of the securable scope if applicable. + required: + - database + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Role: + type: object + description: A Snowflake role + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the role. + comment: + type: string + description: Comment of the role. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the role was created. + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Specifies the role that owns this role. + is_default: + type: boolean + readOnly: true + description: Specifies whether the role being fetched is the user's default role. + is_current: + type: boolean + readOnly: true + description: Specifies whether the role being fetched is the user's current role. + is_inherited: + type: boolean + readOnly: true + description: Specifies whether the role used to run the command inherits the specified role. + assigned_to_users: + type: integer + format: int64 + readOnly: true + description: The number of users to whom this role has been assigned. + granted_to_roles: + type: integer + format: int64 + readOnly: true + description: The number of roles to which this role has been granted. + granted_roles: + type: integer + format: int64 + readOnly: true + description: The number of roles that have been granted to this role. + required: + - name + GrantOf: + type: object + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + role: + type: string + readOnly: true + description: The name of the role + granted_to: + type: string + readOnly: true + description: The type of the grantee, can be USER or ROLE + grantee_name: + type: string + readOnly: true + description: The name of the grantee + granted_by: + type: string + readOnly: true + description: The role that granted this role to this grantee + GrantOn: + type: object + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + privilege: + type: string + readOnly: true + description: The name of the privilege + granted_on: + type: string + readOnly: true + description: The type of of the role + name: + type: string + readOnly: true + description: The name of the role + granted_to: + type: string + readOnly: true + description: The type of the grantee + grantee_name: + type: string + readOnly: true + description: The name of the grantee + grant_option: + type: string + readOnly: true + description: If true, allows the recipient role to grant the privileges to other roles. + granted_by: + type: string + readOnly: true + description: The role that granted this privilege to this grantee + granted_by_role_type: + type: string + readOnly: true + description: Type of the role that granted this privilege to this grantee + User: + description: Properties of user. + type: object + required: + - name + properties: + name: + type: string + description: User name + example: jackpatel + password: + type: string + format: password + description: Password + login_name: + type: string + description: Login name + display_name: + type: string + description: Display name + first_name: + type: string + description: First name + middle_name: + type: string + description: Middle name + last_name: + type: string + description: Last name + email: + type: string + description: Email address + must_change_password: + type: boolean + description: Does this user need to change their password (e.g., after assigning a temp password) + disabled: + type: boolean + description: Has this user been disabled from the system + days_to_expiry: + type: integer + description: How many days until this user expires + mins_to_unlock: + type: integer + description: How many minutes until the account is unlocked after multiple failed logins + default_warehouse: + type: string + description: The default warehouse to use when this user starts a session + default_namespace: + type: string + description: The default namespace to use when this user starts a session + default_role: + type: string + description: The default role to use when this user starts a session + default_secondary_roles: + type: string + description: The default secondary roles of this user to use when starting a session. Only valid set values are ALL or NONE. Default is ALL after 2024-07 BCR. + enum: + - ALL + - NONE + default: ALL + mins_to_bypass_mfa: + type: integer + description: How many minutes until MFA is required again + rsa_public_key: + type: string + description: RSA public key of the user + rsa_public_key_2: + type: string + description: Second RSA public key of the user + comment: + type: string + description: Comment about the user. + example: A distinguished user + type: + type: string + description: Indicates the type of user (PERSON | SERVICE | LEGACY_SERVICE) + enable_unredacted_query_syntax_error: + type: boolean + description: Whether to show unredacted query syntax errors in the query history. + network_policy: + type: string + description: Specifies an existing network policy is active for the user. Otherwise, use account default. + created_on: + type: string + readOnly: true + format: date-time + last_successful_login: + type: string + readOnly: true + format: date-time + expires_at: + type: string + readOnly: true + format: date-time + locked_until: + type: string + readOnly: true + format: date-time + has_password: + type: boolean + readOnly: true + has_rsa_public_key: + type: boolean + readOnly: true + rsa_public_key_fp: + type: string + readOnly: true + description: Fingerprint of the user's RSA public key + rsa_public_key_2_fp: + type: string + readOnly: true + description: Fingerprint of the user's second RSA public key + ext_authn_duo: + type: boolean + readOnly: true + ext_authn_uid: + type: string + readOnly: true + owner: + type: string + readOnly: true + snowflake_lock: + type: boolean + readOnly: true + default: false + description: Whether the user, account, or organization is locked by Snowflake. + snowflake_support: + type: boolean + readOnly: true + default: false + description: Whether Snowflake Support is allowed to use the user or account + mins_to_bypass_network_policy: + type: integer + readOnly: true + description: Temporary bypass network policy on the user for a specified number of minutes + password_last_set: + type: string + readOnly: true + format: date-time + custom_landing_page_url: + type: string + readOnly: true + custom_landing_page_url_flush_next_ui_load: + type: boolean + readOnly: true + default: false + description: Whether or not to flush the custom landing page of the user on next UI load + Grant_user: + type: object + properties: + securable: + $ref: '#/components/schemas/Securable_user' + description: Securable of the grant + containing_scope: + $ref: '#/components/schemas/ContainingScope' + description: Containing scope of the grant + securable_type: + type: string + description: Type of the securable to be granted. Only ROLE is supported + privileges: + type: array + items: + type: string + description: List of privileges to be granted. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the grant was created + granted_by: + type: string + readOnly: true + description: The role that granted this privilege to this grantee + required: + - securable_type + Securable_user: + type: object + properties: + database: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name of the securable if applicable. + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name of the securable if applicable. + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the securable if applicable. + required: + - name + ListDatabaseRolesResponse: + type: object + properties: + database_roles: + type: array + items: + $ref: '#/components/schemas/DatabaseRole' + ListDatabaseRoleGrantsResponse: + type: object + properties: + database_role_grants: + type: array + items: + $ref: '#/components/schemas/Grant' + ListDatabaseRoleFutureGrantsResponse: + type: object + properties: + database_role_future_grants: + type: array + items: + $ref: '#/components/schemas/Grant' + ListRolesResponse: + type: object + properties: + roles: + type: array + items: + $ref: '#/components/schemas/Role' + ListRoleGrantsResponse: + type: object + properties: + role_grants: + type: array + items: + $ref: '#/components/schemas/Grant' + ListGrantsOfResponse: + type: object + properties: + grants_of: + type: array + items: + $ref: '#/components/schemas/GrantOf' + ListGrantsOnResponse: + type: object + properties: + grants_on: + type: array + items: + $ref: '#/components/schemas/GrantOn' + ListRoleFutureGrantsResponse: + type: object + properties: + role_future_grants: + type: array + items: + $ref: '#/components/schemas/Grant' + ListUsersResponse: + type: object + properties: + users: + type: array + items: + $ref: '#/components/schemas/User' + ListUserGrantsResponse: + type: object + properties: + user_grants: + type: array + items: + $ref: '#/components/schemas/Grant_user' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + database_roles: + id: snowflake.roles.database_roles + name: database_roles + title: Database Roles + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.database_roles + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListDatabaseRolesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"database_roles\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/database_roles/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/database_roles/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/database_roles/methods/delete' + replace: [] + database_role_grants: + id: snowflake.roles.database_role_grants + name: database_role_grants + title: Database Role Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.database_role_grants + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListDatabaseRoleGrantsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"database_role_grants\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1grants:revoke/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/database_role_grants/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/database_role_grants/methods/grant' + update: [] + delete: [] + replace: [] + database_role_future_grants: + id: snowflake.roles.database_role_future_grants + name: database_role_future_grants + title: Database Role Future Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.database_role_future_grants + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListDatabaseRoleFutureGrantsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"database_role_future_grants\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1database-roles~1{name}~1future-grants:revoke/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/database_role_future_grants/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/database_role_future_grants/methods/grant' + update: [] + delete: [] + replace: [] + roles: + id: snowflake.roles.roles + name: roles + title: Roles + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1roles/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.roles + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListRolesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"roles\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1roles/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/roles/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/roles/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/roles/methods/delete' + replace: [] + role_grants: + id: snowflake.roles.role_grants + name: role_grants + title: Role Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.role_grants + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListRoleGrantsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"role_grants\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants:revoke/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/role_grants/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/role_grants/methods/grant' + update: [] + delete: [] + replace: [] + role_grants_of: + id: snowflake.roles.role_grants_of + name: role_grants_of + title: Role Grants Of + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants-of/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.grants_of + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListGrantsOfResponse' + transform: + body: |- + {{- $wrapped := printf "{\"grants_of\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/role_grants_of/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + role_grants_on: + id: snowflake.roles.role_grants_on + name: role_grants_on + title: Role Grants On + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1grants-on/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.grants_on + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListGrantsOnResponse' + transform: + body: |- + {{- $wrapped := printf "{\"grants_on\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/role_grants_on/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + role_future_grants: + id: snowflake.roles.role_future_grants + name: role_future_grants + title: Role Future Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.role_future_grants + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListRoleFutureGrantsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"role_future_grants\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1roles~1{name}~1future-grants:revoke/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/role_future_grants/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/role_future_grants/methods/grant' + update: [] + delete: [] + replace: [] + users: + id: snowflake.roles.users + name: users + title: Users + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1users/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1api~1v2~1users/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.users + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListUsersResponse' + transform: + body: |- + {{- $wrapped := printf "{\"users\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + get: + operation: + $ref: '#/paths/~1api~1v2~1users~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1users~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1users~1{user_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/users/methods/get' + - $ref: '#/components/x-stackQL-resources/users/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/users/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/users/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/users/methods/create_or_alter' + user_grants: + id: snowflake.roles.user_grants + name: user_grants + title: User Grants + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1users~1{name}~1grants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.user_grants + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListUserGrantsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"user_grants\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + grant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1users~1{name}~1grants/post' + response: + mediaType: application/json + openAPIDocKey: '200' + revoke: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1users~1{name}~1grants:revoke/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user_grants/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/user_grants/methods/grant' + update: [] + delete: [] + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/schema.yaml b/providers/src/snowflake/v00.00.00000/services/schema.yaml deleted file mode 100644 index 98347442..00000000 --- a/providers/src/snowflake/v00.00.00000/services/schema.yaml +++ /dev/null @@ -1,1187 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Schema API - description: The Snowflake Schema API is a REST API that you can use to access, - update, and perform certain actions on a Snowflake schema. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas: - get: - summary: List schemas. - tags: - - schema - description: Lists the accessible schemas. - operationId: listSchemas - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: history - in: query - description: 'Whether to include dropped schemas that have not yet been purged. - Default: `false`.' - schema: - type: boolean - default: false - responses: - '200': - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a schema. - tags: - - schema - description: Creates a schema, with modifiers as query parameters. You must - provide the full schema definition when creating a schema. - operationId: createSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/createMode' - - name: kind - in: query - description: Type of schema to create. Currently, Snowflake supports only - `transient` and `permanent` (also represented by the empty string). - schema: - type: string - default: '' - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{name}:clone: - post: - summary: Clone a schema. - tags: - - schema - description: Clones an existing schema, with modifiers as query parameters. - You must provide the full schema definition when cloning an existing schema. - operationId: cloneSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: kind - in: query - description: Type of schema to clone. Currently, Snowflake supports only `transient` - and `permanent` (also represented by the empty string). - schema: - type: string - default: '' - deprecated: true - - name: targetDatabase - in: query - description: Database of the newly created schema. Defaults to the source - schema's database. - schema: - $ref: '#/components/schemas/Identifier' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaClone' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{name}:undrop: - post: - summary: Undrop a schema. - tags: - - schema - description: Undrops schema. - operationId: undropSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{name}: - get: - tags: - - schema - description: Fetches a schema. - operationId: fetchSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a new, or alters an existing, schema. - tags: - - schema - description: Creates a new, or alters an existing, schema. You must provide - the full schema definition even when altering an existing schema. - operationId: createOrAlterSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - name: kind - in: query - description: Type of schema to create. Currently, Snowflake supports only - `transient` and `permanent` (also represented by the empty string). - schema: - type: string - default: '' - deprecated: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a schema. - tags: - - schema - description: Deletes the specified schema. If you enable the `ifExists` parameter, - the operation succeeds even if the schema does not exist. Otherwise, a 404 - failure is returned if the schema does not exist. if the drop is unsuccessful. - operationId: deleteSchema - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: restrict - in: query - description: 'Whether to drop the schema if foreign keys exist that reference - any tables in the schema. - - - `true`: Return a warning about existing foreign key references and don''t - drop the schema. - - - `false`: Drop the schema and all objects in the database, including tables - with primary or unique keys that are referenced by foreign keys in other - tables. - - Default: `false`.' - schema: - type: boolean - default: false - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Schema: - type: object - description: Snowflake schema definition. - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time the schema was created. - name: - $ref: '#/components/schemas/Identifier' - description: Name of the schema. - kind: - type: string - enum: - - PERMANENT - - TRANSIENT - default: PERMANENT - description: Schema type, permanent (default) or transient. - is_default: - type: boolean - readOnly: true - description: Default schema for a user. - is_current: - type: boolean - readOnly: true - description: Current schema for the session. - database_name: - type: string - readOnly: true - description: Database that the schema belongs to - owner: - type: string - readOnly: true - description: Name of the role that owns the schema. - comment: - type: string - description: Optional comment in which to store information related to the - schema. - options: - type: string - readOnly: true - managed_access: - type: boolean - default: false - description: Whether this schema is a managed access schema that centralizes - privilege management with the schema owner. - retention_time: - type: integer - readOnly: true - description: Number of days that historical data is retained for Time Travel. - dropped_on: - type: string - format: date-time - readOnly: true - nullable: true - description: Date and time the schema was dropped. - owner_role_type: - type: string - readOnly: true - description: Type of role that owns the object, either `ROLE` or `DATABASE_ROLE`. - budget: - type: string - readOnly: true - description: Budget that defines a monthly spending limit on the compute - costs for a Snowflake account or a custom group of Snowflake objects. - data_retention_time_in_days: - type: integer - description: Number of days for which Time Travel actions (CLONE and UNDROP) - can be performed on the schema, as well as specifying the default Time - Travel retention time for all tables created in the schema - default_ddl_collation: - type: string - description: Specifies a default collation specification for all tables - added to the schema. You an override the default at the schema and individual - table levels. - log_level: - type: string - description: Severity level of messages that should be ingested and made - available in the active event table. Currently, Snowflake supports only - `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. - pipe_execution_paused: - type: boolean - description: Whether pipe execution is paused. - max_data_extension_time_in_days: - type: integer - description: Maximum number of days for which Snowflake can extend the data - retention period for tables in the schema to prevent streams on the tables - from becoming stale. - suspend_task_after_num_failures: - type: integer - description: Specifies the number of consecutive failed task runs after - which the current task is suspended automatically. - trace_level: - type: string - description: How trace events are ingested into the event table. Currently, - Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. - user_task_managed_initial_warehouse_size: - type: string - description: Size of the compute resources to provision for the first run - of the serverless task, before a task history is available for Snowflake - to determine an ideal size. - user_task_timeout_ms: - type: integer - description: Time limit, in milliseconds, for a single run of the task before - it times out. - serverless_task_min_statement_size: - type: string - description: Specifies the minimum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. - serverless_task_max_statement_size: - type: string - description: Specifies the maximum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. - required: - - name - SchemaClone: - type: object - description: Schema clone definition. - allOf: - - $ref: '#/components/schemas/Schema' - properties: - point_of_time: - $ref: '#/components/schemas/PointOfTime' - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - schemas: - methods: - list_schemas: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas/post' - response: - mediaType: '' - openAPIDocKey: '200' - clone_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_schema: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/schemas/methods/list_schemas' - - $ref: '#/components/x-stackQL-resources/schemas/methods/fetch_schema' - insert: - - $ref: '#/components/x-stackQL-resources/schemas/methods/create_schema' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/schemas/methods/delete_schema' - replace: - - $ref: '#/components/x-stackQL-resources/schemas/methods/create_or_alter_schema' - id: snowflake.schema.schemas - name: schemas - title: Schemas -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/security.yaml b/providers/src/snowflake/v00.00.00000/services/security.yaml new file mode 100644 index 00000000..593b0709 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/security.yaml @@ -0,0 +1,2678 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Security API + description: 'The Snowflake REST API surface for the security service, combining the vendor spec(s): network-policy.yaml, network-rule.yaml, password-policy.yaml, secret.yaml, tag.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/network-policies: + get: + summary: List network policies + tags: + - network-policy + description: List network policies + operationId: listNetworkPolicies + parameters: [] + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListNetworkPoliciesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a network policy + tags: + - network-policy + description: Create a network policy + operationId: createNetworkPolicy + parameters: + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkPolicy' + /api/v2/network-policies/{name}: + get: + summary: Fetch a network policy + tags: + - network-policy + description: Fetch a network policy + operationId: fetchNetworkPolicy + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkPolicy' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a network policy + tags: + - network-policy + description: Delete a network policy + operationId: deleteNetworkPolicy + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/network-rules: + get: + summary: List network rules + tags: + - network-rule + description: List network rules + operationId: listNetworkRules + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListNetworkRulesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a network rule + tags: + - network-rule + description: Create a network rule + operationId: createNetworkRule + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRule' + /api/v2/databases/{database_name}/schemas/{schema_name}/network-rules/{name}: + get: + summary: Fetch a network rule + tags: + - network-rule + description: Fetch a network rule + operationId: fetchNetworkRule + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRule' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a network rule + tags: + - network-rule + description: Delete a network rule + operationId: deleteNetworkRule + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/password-policies: + get: + summary: List password policies + tags: + - password-policy + description: List password policies + operationId: listPasswordPolicies + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListPasswordPoliciesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a password policy + tags: + - password-policy + description: Create a password policy + operationId: createPasswordPolicy + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordPolicy' + /api/v2/databases/{database_name}/schemas/{schema_name}/password-policies/{name}: + get: + summary: Fetch a password policy + tags: + - password-policy + description: Fetch a password policy + operationId: fetchPasswordPolicy + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordPolicy' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a password policy + tags: + - password-policy + description: Delete a password policy + operationId: deletePasswordPolicy + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/password-policies/{name}:rename: + post: + summary: Rename a password policy with a new identifier + tags: + - password-policy + description: Rename a password policy with a new identifier + operationId: renamePasswordPolicy + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/secrets: + get: + summary: List secrets + tags: + - secret + description: List secrets + operationId: listSecrets + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListSecretsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a secret + tags: + - secret + description: Create a secret + operationId: createSecret + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Secret' + /api/v2/databases/{database_name}/schemas/{schema_name}/secrets/{name}: + get: + summary: Fetch a secret + tags: + - secret + description: Fetch a secret + operationId: fetchSecret + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Secret' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a secret + tags: + - secret + description: Delete a secret + operationId: deleteSecret + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tags: + get: + summary: List tags + tags: + - tag + description: List tags + operationId: listTags + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListTagsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a tag + tags: + - tag + description: Create a tag + operationId: createTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + /api/v2/databases/{database_name}/schemas/{schema_name}/tags/{name}: + get: + summary: Fetch a tag + tags: + - tag + description: Fetch a tag + operationId: fetchTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a tag + tags: + - tag + description: Delete a tag + operationId: deleteTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tags/{name}:undrop: + post: + summary: Undrop a tag + tags: + - tag + description: Undrop a tag + operationId: undropTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tags/{name}:rename: + post: + summary: Rename a tag with a new identifier + tags: + - tag + description: Rename a tag with a new identifier + operationId: renameTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: false + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetName + description: Name of the target resource. + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tags/{tag_name}: + parameters: [] + put: + summary: Create or update a tag + tags: + - tag + description: Create or update a tag + operationId: createOrAlterTag + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: tag_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' +components: + schemas: + NetworkPolicy: + type: object + description: A Snowflake network policy + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the network policy + allowed_network_rule_list: + type: array + items: + type: string + description: List of names of allowed network rules in a network policy + blocked_network_rule_list: + type: array + items: + type: string + description: List of names of blocked network rules in a network policy + allowed_ip_list: + type: array + items: + type: string + description: List of allowed IPs in a network policy + blocked_ip_list: + type: array + items: + type: string + description: List of blocked IPs in a network policy + comment: + type: string + description: user comment associated to an object in the dictionary + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the network policy was created. + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the network policy + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the network policy + required: + - name + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + NetworkRule: + type: object + description: A Snowflake network rule + properties: + type: + type: string + description: Type of the network rule + mode: + type: string + description: 'Specifies what is restricted by the network rule. Possible values: INGRESS, INTERNAL_STAGE, EGRESS' + value_list: + type: array + items: + type: string + description: List of values in a network rule + comment: + type: string + description: Comment for the network rule + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the network rule + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the network rule was created + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the network rule is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the network rule is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the network rule + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the network rule + required: + - type + - name + PasswordPolicy: + type: object + description: A Snowflake password policy + properties: + comment: + type: string + description: Comment for the password policy + password_min_length: + type: integer + description: Minimum length of new password. + password_max_length: + type: integer + description: Maximum length of new password. + password_min_upper_case_chars: + type: integer + description: Minimum number of uppercase characters in new password. + password_min_lower_case_chars: + type: integer + description: Minimum number of lowercase characters in new password. + password_min_numeric_chars: + type: integer + description: Minimum number of numeric characters in new password. + password_min_special_chars: + type: integer + description: Minimum number of special characters in new password. + password_min_age_days: + type: integer + description: Period after a password is changed during which a password cannot be changed again, in days. + password_max_age_days: + type: integer + description: Period after which password must be changed, in days. + password_max_retries: + type: integer + description: Number of attempts users have to enter the correct password before their account is locked. + password_lockout_time_mins: + type: integer + description: Period of time for which users will be locked after entering their password incorrectly many times (specified by MAX_RETRIES), in minutes + password_history: + type: integer + description: Number of distinct passwords that a user must create before re-using a previous password + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the password policy + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the password policy was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the password policy is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the password policy is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the password policy + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the password policy + required: + - name + Secret: + type: object + description: A Snowflake secret + properties: + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - type + - name + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + PasswordSecret: + properties: + username: + type: string + description: Name of the user. + password: + type: string + description: Password of the user + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - username + - password + - type + - name + type: object + description: A Snowflake secret + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + Oauth2Secret: + properties: + oauth_refresh_token: + type: string + description: OAuth secret refresh token + oauth_refresh_token_expiry_time: + type: string + description: 'Date or timestamp (UTC) when OAuth refresh token will expire. Possible formats: YYYY-MM-DD, YYYY-MM-DD HH24:MI:SS' + oauth_scopes: + type: array + items: + type: string + description: Scopes represented during OAuth Flow + api_authentication: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: API provider's authentication server integration name + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - api_authentication + - type + - name + type: object + description: A Snowflake secret + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + GenericStringSecret: + properties: + secret_string: + type: string + description: Generic secret string + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - secret_string + - type + - name + type: object + description: A Snowflake secret + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + SymmetricKeySecret: + properties: + algorithm: + type: string + description: Key secret's algorithm name + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - algorithm + - type + - name + type: object + description: A Snowflake secret + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + CloudProviderTokenSecret: + properties: + api_authentication: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: API provider's authentication server integration name + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + required: + - api_authentication + - type + - name + type: object + description: A Snowflake secret + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + JwtKeyPairSecret: + properties: + algorithm: + type: string + description: Key secret's algorithm name + key_length: + type: integer + description: Size of key used in secret. + type: + type: string + description: Type of the secret + comment: + type: string + description: user comment associated to an object in the dictionary + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the secret + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the secret was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the secret is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the secret is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the secret + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the secret + type: object + description: A Snowflake secret + required: + - type + - name + discriminator: + propertyName: type + mapping: + PASSWORD: PasswordSecret + OAUTH2: Oauth2Secret + GENERIC_STRING: GenericStringSecret + SYMMETRIC_KEY: SymmetricKeySecret + CLOUD_PROVIDER_TOKEN: CloudProviderTokenSecret + JWT_KEY_PAIR: JwtKeyPairSecret + Tag: + type: object + description: A Snowflake tag + properties: + allowed_values: + type: array + items: + type: string + description: Possible string values that can be assigned with the tag when the tag is set on an object + propagate: + type: string + description: Specifies that the tag will be automatically propagated from source objects to target objects + on_conflict: + type: string + description: Specifies what happens when there is a conflict between the values of propagated tags + comment: + type: string + description: Comment for the tag + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the tag + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the tag was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the tag is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the tag is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the tag + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the tag + required: + - name + ListNetworkPoliciesResponse: + type: object + properties: + network_policies: + type: array + items: + $ref: '#/components/schemas/NetworkPolicy' + ListNetworkRulesResponse: + type: object + properties: + network_rules: + type: array + items: + $ref: '#/components/schemas/NetworkRule' + ListPasswordPoliciesResponse: + type: object + properties: + password_policies: + type: array + items: + $ref: '#/components/schemas/PasswordPolicy' + ListSecretsResponse: + type: object + properties: + secrets: + type: array + items: + $ref: '#/components/schemas/Secret' + ListTagsResponse: + type: object + properties: + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + network_policies: + id: snowflake.security.network_policies + name: network_policies + title: Network Policies + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1network-policies/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.network_policies + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListNetworkPoliciesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"network_policies\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1network-policies/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1network-policies~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1network-policies~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/network_policies/methods/get' + - $ref: '#/components/x-stackQL-resources/network_policies/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/network_policies/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/network_policies/methods/delete' + replace: [] + network_rules: + id: snowflake.security.network_rules + name: network_rules + title: Network Rules + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1network-rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.network_rules + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListNetworkRulesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"network_rules\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1network-rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1network-rules~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1network-rules~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/network_rules/methods/get' + - $ref: '#/components/x-stackQL-resources/network_rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/network_rules/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/network_rules/methods/delete' + replace: [] + password_policies: + id: snowflake.security.password_policies + name: password_policies + title: Password Policies + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1password-policies/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.password_policies + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListPasswordPoliciesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"password_policies\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1password-policies/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1password-policies~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1password-policies~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1password-policies~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/password_policies/methods/get' + - $ref: '#/components/x-stackQL-resources/password_policies/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/password_policies/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/password_policies/methods/delete' + replace: [] + secrets: + id: snowflake.security.secrets + name: secrets + title: Secrets + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1secrets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.secrets + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListSecretsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"secrets\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1secrets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1secrets~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1secrets~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/secrets/methods/get' + - $ref: '#/components/x-stackQL-resources/secrets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/secrets/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/secrets/methods/delete' + replace: [] + tags: + id: snowflake.security.tags + name: tags + title: Tags + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.tags + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListTagsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"tags\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tags~1{tag_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tags/methods/get' + - $ref: '#/components/x-stackQL-resources/tags/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/tags/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tags/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tags/methods/create_or_alter' +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/service.yaml b/providers/src/snowflake/v00.00.00000/services/service.yaml deleted file mode 100644 index 1d148dfd..00000000 --- a/providers/src/snowflake/v00.00.00000/services/service.yaml +++ /dev/null @@ -1,2006 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Services API - description: The Snowflake Services API is a REST API that you can use to access, - update, and perform certain actions on Services resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/services: - get: - summary: List services - tags: - - service - description: Lists the services under the database and schema. - operationId: listServices - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Service' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a service - tags: - - service - description: Create a service, with standard create modifiers as query parameters. - See the Service component definition for what is required to be provided in - the request body. - operationId: createService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - `errorIfExists`: Throws an error if - you try to create a resource that already exists. - `ifNotExists`: Creates - a new resource when an alter is requested for a non-existent resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - ifNotExists - example: errorIfExists - default: errorIfExists - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Service' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services:execute-job: - post: - summary: Execute a job service - tags: - - service - description: Create and execute a job service. See the JobService component - definition for what is required to be provided in the request body. - operationId: executeJobService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/JobService' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}: - get: - description: Fetch a service. - tags: - - service - operationId: fetchService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Service' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) service. - tags: - - service - description: Create a (or alter an existing) service. Even if the operation - is just an alter, the full property set must be provided. - operationId: createOrAlterService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Service' - responses: - '200': - description: Successful request - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a service - tags: - - service - description: Delete a service with the given name. If ifExists is used, the - operation will succeed even if the object does not exist. Otherwise, there - will be a failure if the drop is unsuccessful. - operationId: deleteService - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/logs: - get: - description: Fetch the logs for a given service. - tags: - - service - operationId: fetchServiceLogs - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: instanceId - description: ID of the service instance, starting with 0. - required: true - schema: - type: integer - - in: query - name: containerName - description: Container name as specified in the service specification file. - required: true - schema: - type: string - - in: query - name: numLines - schema: - type: integer - description: Number of trailing log lines to retrieve. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: object - properties: - system$get_service_logs: - type: string - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/status: - get: - description: Fetch the status for a given service. - tags: - - service - operationId: fetchServiceStatus - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: timeout - schema: - type: integer - description: Number of seconds to wait for the service to reach a steady state - (for example, READY) before returning the status. If the service does not - reach a steady state within the specified time, Snowflake returns the current - state. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: object - properties: - system$get_service_status: - type: string - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/containers: - get: - description: List all the containers of the service - tags: - - service - operationId: listServiceContainers - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServiceContainer' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/instances: - get: - description: List all the instances of the service - tags: - - service - operationId: listServiceInstances - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServiceInstance' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/roles: - get: - description: List all the service roles of the service - tags: - - service - operationId: listServiceRoles - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServiceRole' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{service}/roles/{name}/grants-of: - get: - description: List all the grants of the service role - tags: - - service - operationId: listServiceRoleGrantsOf - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/service' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GrantOf' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{service}/roles/{name}/grants: - get: - description: List all the grants given to the service role - tags: - - service - operationId: listServiceRoleGrantsTo - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/service' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServiceRoleGrantTo' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}:resume: - post: - description: Resume a service. - tags: - - service - operationId: resumeService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}:suspend: - post: - description: Suspend a service. - tags: - - service - operationId: suspendService - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/services/{name}/endpoints: - get: - summary: List the endpoints in a service. - description: Lists the endpoints in a Snowpark Container Services service (or - a job service). - tags: - - service - operationId: showServiceEndpoints - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServiceEndpoint' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - parameters: - service: - name: service - description: Name of the service that contains the service role. - required: true - in: path - schema: - $ref: '#/components/schemas/Identifier' - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - schemas: - ServiceSpecInlineText: - description: Specifies service specification with inline text. - allOf: - - $ref: '#/components/schemas/ServiceSpec' - properties: - spec_text: - type: string - description: Specifies service specification. You can use a pair of dollar - signs ($$) to delimit the beginning and ending of the specification string. - required: - - spec_text - ServiceSpecStageFile: - description: Specifies service specification with a stage file. - allOf: - - $ref: '#/components/schemas/ServiceSpec' - properties: - stage: - type: string - description: Specifies the Snowflake internal stage where the specification - file is stored; for example, @tutorial_stage. - spec_file: - type: string - description: Specifies the path to the service specification file on the - stage; for example, 'some-dir/echo_spec.yaml'. - required: - - stage - - spec_file - ServiceSpec: - type: object - description: Specifies service specification. - properties: - spec_type: - type: string - description: Type of the service specification, can be `from_file` or `from_inline`. - discriminator: - propertyName: spec_type - mapping: - from_file: ServiceSpecStageFile - from_inline: ServiceSpecInlineText - writeOnly: true - Service: - allOf: - - $ref: '#/components/schemas/JobService' - - type: object - description: A Snowflake service object. - properties: - auto_resume: - type: boolean - description: Specifies whether to automatically resume a service when - a service function or ingress is called. - current_instances: - type: integer - description: The current number of instances for the service. - readOnly: true - target_instances: - type: integer - description: The target number of service instances that should be running - as determined by Snowflake. - readOnly: true - min_ready_instances: - type: integer - description: The minimum number of ready service instances to declare - the service as READY. - min_instances: - type: integer - description: Specifies the minimum number of service instances to run. - max_instances: - type: integer - description: Specifies the maximum number of service instances to run. - database_name: - $ref: '#/components/schemas/Identifier' - description: The name of the parent database for the service. - readOnly: true - schema_name: - $ref: '#/components/schemas/Identifier' - description: The name of the parent schema for the service. - readOnly: true - owner: - type: string - description: Role that owns the service. - readOnly: true - dns_name: - type: string - description: Snowflake-assiged DNS name of the service. The DNS name enables - service-to-service communications. - readOnly: true - created_on: - type: string - description: Timestamp when the service was created. - format: date-time - readOnly: true - updated_on: - type: string - description: Timestamp when the service was last updated. - format: date-time - readOnly: true - resumed_on: - type: string - description: Timestamp when the service was last resumed. - format: date-time - readOnly: true - suspended_on: - type: string - description: Timestamp when the service was last suspended. - format: date-time - readOnly: true - auto_suspend_secs: - type: integer - description: Number of seconds of inactivity after which the service will - be automatically suspended. The default value is 0 which represents - the service will not be automatically suspended. - format: int64 - owner_role_type: - type: string - description: The role type of the service owner. - readOnly: true - is_job: - type: boolean - description: True if the service is a job service; false otherwise. - readOnly: true - spec_digest: - type: string - description: The unique and immutable identifier representing the service - spec content. - readOnly: true - is_upgrading: - type: boolean - description: TRUE, if Snowflake is in the process of upgrading the service. - readOnly: true - managing_object_domain: - type: string - description: The domain of the managing object (for example, the domain - of the notebook that manages the service). NULL if the service is not - managed by a Snowflake entity. - readOnly: true - managing_object_name: - type: string - description: The name of the managing object (for example, the name of - the notebook that manages the service). NULL if the service is not managed - by a Snowflake entity. - readOnly: true - example: - min_ready_instances: 1 - min_instances: 2 - max_instances: 5 - database_name: testdb - schema_name: testschema - owner: SYSADMIN - is_job: false - JobService: - type: object - description: A Snowflake job service object. - writeOnly: true - properties: - name: - $ref: '#/components/schemas/Identifier' - description: String that specifies the identifier (that is, the name) for - the service. - status: - type: string - description: The current status of the service. - compute_pool: - type: string - description: Specifies the name of the compute pool in your account on which - to run the service. - spec: - $ref: '#/components/schemas/ServiceSpec' - description: Specifies service specification. - external_access_integrations: - type: array - description: Specifies the names of the external access integrations that - allow your service to access external sites. - items: - type: string - query_warehouse: - $ref: '#/components/schemas/Identifier' - description: Warehouse to use if a service container connects to Snowflake - to execute a query but does not explicitly specify a warehouse to use. - comment: - type: string - description: Specifies a comment for the service. - is_async_job: - type: boolean - description: True if the service is an async job service; false otherwise. - required: - - name - - compute_pool - - spec - example: - name: service_name - compute_pool: compute_pool_name - spec: - spec_type: from_file - stage: '@stage_name' - spec_file: spec_file.yaml - ServiceEndpoint: - type: object - properties: - name: - type: string - description: User-friendly endpoint name that represents the corresponding - port. - port: - type: integer - description: The network port the service is listening on. NULL, when portRange - is specified. - portRange: - type: string - description: The network port range the service is listening on. NULL, when - port is specified. - protocol: - type: string - description: Supported network protocol (TCP, HTTP, or HTTPS). - default: HTTP - is_public: - type: boolean - description: True, if the endpoint is public, accessible from internet. - default: false - ingress_url: - type: string - description: Endpoint URL accessible from the internet. - readOnly: true - example: - name: endpoint - port: 8080 - protocol: HTTPS - is_public: true - ingress_url: abcd-org-acc.snowflakecomputing.app - ServiceContainer: - type: object - properties: - database_name: - $ref: '#/components/schemas/Identifier' - description: Database in which the service is created. - readOnly: true - schema_name: - $ref: '#/components/schemas/Identifier' - description: Schema in which the service is created. - readOnly: true - service_name: - $ref: '#/components/schemas/Identifier' - description: The name of the service. - readOnly: true - service_status: - type: string - description: The current status of the service. - readOnly: true - instance_id: - type: string - description: ID of the service instance (this is the index of the service - instance starting from 0). - readOnly: true - instance_status: - type: string - description: The current status of the service instance. - readOnly: true - container_name: - type: string - description: Name of the container. - readOnly: true - status: - type: string - description: Service container status. - readOnly: true - message: - type: string - description: Additional clarification about status. - readOnly: true - image_name: - type: string - description: Image name used to create the service container. - readOnly: true - image_digest: - type: string - description: The unique and immutable identifier representing the image - content. - readOnly: true - restart_count: - type: integer - description: Number of times Snowflake restarted the service. - readOnly: true - start_time: - type: string - description: Date and time when the container started. - readOnly: true - example: - database_name: testdb - schema_name: testschema - service_name: myservice - instance_id: '0' - container_name: main - status: PENDING - message: Pending scheduling. - image_name: /db/schema/repo/image:1.0 - image_digest: abcdefd - restart_count: 0 - start_time: 2023-01-01 00:00:00+00:00 - ServiceInstance: - type: object - properties: - database_name: - $ref: '#/components/schemas/Identifier' - description: Database in which the service is created. - readOnly: true - schema_name: - $ref: '#/components/schemas/Identifier' - description: Schema in which the service is created. - readOnly: true - service_name: - $ref: '#/components/schemas/Identifier' - description: The name of the service. - readOnly: true - service_status: - type: string - description: The current status of the service. - readOnly: true - instance_id: - type: string - description: ID of the service instance (this is the index of the service - instance starting from 0). - readOnly: true - status: - type: string - description: The current status of the service instance. - readOnly: true - spec_digest: - type: string - description: The unique and immutable identifier that represents the service - specification content. - readOnly: true - creation_time: - type: string - description: The time when Snowflake started creating the service instance. - readOnly: true - start_time: - type: string - description: The time when Snowflake acknowledged the service instance is - running on a node. - readOnly: true - example: - database_name: testdb - schema_name: testschema - service_name: myservice - instance_id: '0' - status: PENDING - spec_digest: abcdefg - creation_time: 2023-01-01 00:00:00+00:00 - start_time: 2023-01-01 00:00:00+00:00 - ServiceRole: - type: object - properties: - created_on: - type: string - format: date-time - description: Date and time when the service role was created - readOnly: true - name: - type: string - description: Service role name - readOnly: true - comment: - type: string - description: Comment, if any, for the service role - readOnly: true - example: - created_on: 2023-01-01 00:00:00+00:00 - name: testrole - comment: This is a service role. - GrantOf: - type: object - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - role: - type: string - readOnly: true - description: The name of the service role - granted_to: - type: string - readOnly: true - description: The type of the grantee, can be USER or ROLE - grantee_name: - type: string - readOnly: true - description: The name of the grantee - granted_by: - type: string - readOnly: true - description: The name of role that granted the service role to the grantee - example: - created_on: 2023-01-01 00:00:00+00:00 - role: db.schema.service.svc_role - granted_to: role - grantee_name: test_role - granted_by: sysadmin - ServiceRoleGrantTo: - type: object - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - privilege: - type: string - readOnly: true - description: The name of the privilege - granted_on: - type: string - readOnly: true - description: The type of of the securable - name: - type: string - readOnly: true - description: The name of the securable - granted_to: - type: string - readOnly: true - description: The type of the grantee - grantee_name: - type: string - readOnly: true - description: The name of the grantee - example: - created_on: 2023-01-01 00:00:00+00:00 - privilege: usage - granted_on: service_endpoint - name: db.schema.service!svc_role - granted_to: service role - grantee_name: all_endpoints_usage - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - services: - methods: - list_services: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services/post' - response: - mediaType: '' - openAPIDocKey: '200' - execute_job_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services:execute-job/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - resume_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/services/methods/list_services' - - $ref: '#/components/x-stackQL-resources/services/methods/fetch_service' - insert: - - $ref: '#/components/x-stackQL-resources/services/methods/create_service' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/services/methods/delete_service' - replace: - - $ref: '#/components/x-stackQL-resources/services/methods/create_or_alter_service' - id: snowflake.service.services - name: services - title: Services - logs: - methods: - fetch_service_logs: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1logs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logs/methods/fetch_service_logs' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.logs - name: logs - title: Logs - status: - methods: - fetch_service_status: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1status/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/status/methods/fetch_service_status' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.status - name: status - title: Status - containers: - methods: - list_service_containers: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1containers/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/containers/methods/list_service_containers' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.containers - name: containers - title: Containers - instances: - methods: - list_service_instances: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1instances/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/instances/methods/list_service_instances' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.instances - name: instances - title: Instances - roles: - methods: - list_service_roles: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1roles/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/roles/methods/list_service_roles' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.roles - name: roles - title: Roles - grants_of: - methods: - list_service_role_grants_of: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{service}~1roles~1{name}~1grants-of/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants_of/methods/list_service_role_grants_of' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.grants_of - name: grants_of - title: Grants Of - grants: - methods: - list_service_role_grants_to: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{service}~1roles~1{name}~1grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants/methods/list_service_role_grants_to' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.grants - name: grants - title: Grants - endpoints: - methods: - show_service_endpoints: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1services~1{name}~1endpoints/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/endpoints/methods/show_service_endpoints' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.service.endpoints - name: endpoints - title: Endpoints -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml b/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml index 8285fcd6..612437ba 100644 --- a/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml +++ b/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml @@ -1,40 +1,85 @@ openapi: 3.0.0 servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) info: - version: 2.0.0 - title: Snowflake SQL API - description: 'The Snowflake SQL API is a REST API that you can use to access and - update data in a Snowflake database. ' + version: 0.0.1 + title: Snowflake Sqlapi API + description: 'The Snowflake REST API surface for the sqlapi service, combining the vendor spec(s): result.yaml, sqlapi.yaml.' contact: name: Snowflake, Inc. url: https://snowflake.com email: support@snowflake.com paths: + /api/v2/results/{result_handler}: + get: + summary: Check result status or fetch request + tags: + - result + description: Get result status or the result when it is ready. + operationId: fetchResult + parameters: + - name: result_handler + in: path + required: true + schema: + type: string + description: The opaque result id. + - name: page + in: query + required: false + schema: + type: integer + format: int64 + minimum: 0 + default: 0 + description: Number of the page of results to return. The number can range from 0 to the total number of pages minus 1. + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: {} + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' /api/v2/statements: - parameters: - - $ref: '#/components/parameters/requestId' - - $ref: '#/components/parameters/async' - - $ref: '#/components/parameters/nullable' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/userAgent' - - $ref: '#/components/parameters/snowflakeAuthorizationTokenType' post: operationId: SubmitStatement summary: Submits a SQL statement for execution. - description: Submits one or more statements for execution. You can specify that - the statement should be executed asynchronously. + description: Submits one or more statements for execution. You can specify that the statement should be executed asynchronously. tags: - - statements + - statements security: - - keyPair: [] - - ExternalOAuth: [] - - snowflakeOAuth: [] + - keyPair: [] + - ExternalOAuth_sqlapi: [] + - snowflakeOAuth: [] requestBody: required: true description: Specifies the SQL statement to execute and the statement context. @@ -44,45 +89,32 @@ paths: type: object properties: statement: - description: 'SQL statement or batch of SQL statements to execute. - You can specify query, DML and DDL statements. The following statements - are not supported: PUT, GET, USE, ALTER SESSION, BEGIN, COMMIT, - ROLLBACK, statements that set session variables, and statements - that create temporary tables and stages.' + description: 'SQL statement or batch of SQL statements to execute. You can specify query, DML and DDL statements. The following statements are not supported: PUT, GET, USE, ALTER SESSION, BEGIN, COMMIT, ROLLBACK, statements that set session variables, and statements that create temporary tables and stages.' type: string timeout: - description: Timeout in seconds for statement execution. If the - execution of a statement takes longer than the specified timeout, - the execution is automatically canceled. To set the timeout to - the maximum value (604800 seconds), set timeout to 0. + description: Timeout in seconds for statement execution. If the execution of a statement takes longer than the specified timeout, the execution is automatically canceled. To set the timeout to the maximum value (604800 seconds), set timeout to 0. type: integer format: int64 minimum: 0 example: 10 database: - description: Database in which the statement should be executed. - The value in this field is case-sensitive. + description: Database in which the statement should be executed. The value in this field is case-sensitive. type: string example: TESTDB schema: - description: Schema in which the statement should be executed. The - value in this field is case-sensitive. + description: Schema in which the statement should be executed. The value in this field is case-sensitive. type: string example: TESTSCHEMA warehouse: - description: Warehouse to use when executing the statement. The - value in this field is case-sensitive. + description: Warehouse to use when executing the statement. The value in this field is case-sensitive. type: string example: TESTWH role: - description: Role to use when executing the statement. The value - in this field is case-sensitive. + description: Role to use when executing the statement. The value in this field is case-sensitive. type: string example: TESTROLE bindings: - description: Values of bind variables in the SQL statement. When - executing the statement, Snowflake replaces placeholders ('?' - and ':name') in the statement with these specified values. + description: Values of bind variables in the SQL statement. When executing the statement, Snowflake replaces placeholders ('?' and ':name') in the statement with these specified values. type: object properties: {} example: @@ -93,8 +125,7 @@ paths: type: TEXT value: teststring parameters: - description: Session parameters that should be set before executing - the statement. + description: Session parameters that should be set before executing the statement. type: object properties: timezone: @@ -102,8 +133,7 @@ paths: type: string example: america/los_angeles query_tag: - description: Query tag that you want to associate with the SQL - statement. + description: Query tag that you want to associate with the SQL statement. type: string example: tag-1234 binary_output_format: @@ -135,9 +165,7 @@ paths: type: string example: YYYY-MM-DDTHH24:MI:SS.FF6 TZHTZM multi_statement_count: - description: Number of statements to execute when using multi-statement - capability. 0 implies variable number of statements. Negative - numbers are not allowed. + description: Number of statements to execute when using multi-statement capability. 0 implies variable number of statements. Negative numbers are not allowed. type: integer example: 4 default: 1 @@ -153,15 +181,14 @@ paths: value: '123' responses: '200': - description: The statement was executed successfully, and the response includes - any data requested. + description: The statement was executed successfully, and the response includes any data requested. content: application/json: schema: $ref: '#/components/schemas/ResultSet' headers: link: - $ref: '#/components/headers/Link' + $ref: '#/components/headers/Link_sqlapi' links: GetStatementStatus: operationId: GetStatementStatus @@ -172,130 +199,115 @@ paths: parameters: statementHandle: $response.body#/resultMetaData.statementHandle '202': - description: The execution of the statement is still in progress. Use GET - /statements/ and specify the statement handle to check the status of the - statement execution. + description: The execution of the statement is still in progress. Use GET /statements/ and specify the statement handle to check the status of the statement execution. content: application/json: schema: $ref: '#/components/schemas/QueryStatus' '400': - $ref: '#/components/responses/400BadRequest' + $ref: '#/components/responses/400BadRequest_sqlapi' '401': - $ref: '#/components/responses/401Unauthorized' + $ref: '#/components/responses/401Unauthorized_sqlapi' '403': - $ref: '#/components/responses/403Forbidden' + $ref: '#/components/responses/403Forbidden_sqlapi' '404': - $ref: '#/components/responses/404NotFound' + $ref: '#/components/responses/404NotFound_sqlapi' '405': - $ref: '#/components/responses/405MethodNotAllowed' + $ref: '#/components/responses/405MethodNotAllowed_sqlapi' '408': - description: The execution of the statement exceeded the timeout period. - The execution of the statement was cancelled. + description: The execution of the statement exceeded the timeout period. The execution of the statement was cancelled. content: application/json: schema: $ref: '#/components/schemas/QueryStatus' '415': - $ref: '#/components/responses/415UnsupportedMediaType' + $ref: '#/components/responses/415UnsupportedMediaType_sqlapi' '422': - description: An error occurred when executing the statement. Check the error - code and error message for details. + description: An error occurred when executing the statement. Check the error code and error message for details. content: application/json: schema: $ref: '#/components/schemas/QueryFailureStatus' '429': - $ref: '#/components/responses/429LimitExceeded' + $ref: '#/components/responses/429LimitExceeded_sqlapi' '500': - $ref: '#/components/responses/500InternalServerError' + $ref: '#/components/responses/500InternalServerError_sqlapi' '503': - $ref: '#/components/responses/503ServiceUnavailable' + $ref: '#/components/responses/503ServiceUnavailable_sqlapi' '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/statements/{statementHandle}: - parameters: - - $ref: '#/components/parameters/statementHandle' - - $ref: '#/components/parameters/requestId' - - $ref: '#/components/parameters/partition' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/userAgent' - - $ref: '#/components/parameters/snowflakeAuthorizationTokenType' + $ref: '#/components/responses/504GatewayTimeout_sqlapi' + parameters: + - $ref: '#/components/parameters/requestId' + - $ref: '#/components/parameters/async' + - $ref: '#/components/parameters/nullable' + /api/v2/statements/{statement_handle}: get: operationId: GetStatementStatus summary: Checks the status of the execution of a statement - description: Checks the status of the execution of the statement with the specified - statement handle. If the statement was executed successfully, the operation - returns the requested partition of the result set. + description: Checks the status of the execution of the statement with the specified statement handle. If the statement was executed successfully, the operation returns the requested partition of the result set. tags: - - statements + - statements security: - - keyPair: [] - - ExternalOAuth: [] - - snowflakeOAuth: [] + - keyPair: [] + - ExternalOAuth_sqlapi: [] + - snowflakeOAuth: [] responses: '200': - description: The statement was executed successfully, and the response includes - any data requested. + description: The statement was executed successfully, and the response includes any data requested. headers: link: - $ref: '#/components/headers/Link' + $ref: '#/components/headers/Link_sqlapi' content: application/json: schema: $ref: '#/components/schemas/ResultSet' '202': - description: The execution of the statement is still in progress. Use this - method again to check the status of the statement execution. + description: The execution of the statement is still in progress. Use this method again to check the status of the statement execution. content: application/json: schema: $ref: '#/components/schemas/QueryStatus' '400': - $ref: '#/components/responses/400BadRequest' + $ref: '#/components/responses/400BadRequest_sqlapi' '401': - $ref: '#/components/responses/401Unauthorized' + $ref: '#/components/responses/401Unauthorized_sqlapi' '403': - $ref: '#/components/responses/403Forbidden' + $ref: '#/components/responses/403Forbidden_sqlapi' '404': - $ref: '#/components/responses/404NotFound' + $ref: '#/components/responses/404NotFound_sqlapi' '405': - $ref: '#/components/responses/405MethodNotAllowed' + $ref: '#/components/responses/405MethodNotAllowed_sqlapi' '415': - $ref: '#/components/responses/415UnsupportedMediaType' + $ref: '#/components/responses/415UnsupportedMediaType_sqlapi' '422': - description: An error occurred when executing the statement. Check the error - code and error message for details. + description: An error occurred when executing the statement. Check the error code and error message for details. content: application/json: schema: $ref: '#/components/schemas/QueryFailureStatus' '429': - $ref: '#/components/responses/429LimitExceeded' + $ref: '#/components/responses/429LimitExceeded_sqlapi' '500': - $ref: '#/components/responses/500InternalServerError' + $ref: '#/components/responses/500InternalServerError_sqlapi' '503': - $ref: '#/components/responses/503ServiceUnavailable' + $ref: '#/components/responses/503ServiceUnavailable_sqlapi' '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/statements/{statementHandle}/cancel: - parameters: - - $ref: '#/components/parameters/statementHandle' - - $ref: '#/components/parameters/requestId' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/userAgent' - - $ref: '#/components/parameters/snowflakeAuthorizationTokenType' + $ref: '#/components/responses/504GatewayTimeout_sqlapi' + parameters: + - $ref: '#/components/parameters/statement_handle' + - $ref: '#/components/parameters/requestId' + - $ref: '#/components/parameters/partition' + /api/v2/statements/{statement_handle}/cancel: post: operationId: CancelStatement summary: Cancels the execution of a statement. security: - - keyPair: [] - - ExternalOAuth: [] - - snowflakeOAuth: [] - description: Cancels the execution of the statement with the specified statement - handle. + - keyPair: [] + - ExternalOAuth_sqlapi: [] + - snowflakeOAuth: [] + description: Cancels the execution of the statement with the specified statement handle. tags: - - statements + - statements responses: '200': description: The execution of the statement was successfully canceled. @@ -304,164 +316,423 @@ paths: schema: $ref: '#/components/schemas/CancelStatus' '400': - $ref: '#/components/responses/400BadRequest' + $ref: '#/components/responses/400BadRequest_sqlapi' '401': - $ref: '#/components/responses/401Unauthorized' + $ref: '#/components/responses/401Unauthorized_sqlapi' '403': - $ref: '#/components/responses/403Forbidden' + $ref: '#/components/responses/403Forbidden_sqlapi' '404': - $ref: '#/components/responses/404NotFound' + $ref: '#/components/responses/404NotFound_sqlapi' '405': - $ref: '#/components/responses/405MethodNotAllowed' + $ref: '#/components/responses/405MethodNotAllowed_sqlapi' '422': - description: An error occurred when cancelling the execution of the statement. - Check the error code and error message for details. + description: An error occurred when cancelling the execution of the statement. Check the error code and error message for details. content: application/json: schema: $ref: '#/components/schemas/CancelStatus' '500': - $ref: '#/components/responses/500InternalServerError' + $ref: '#/components/responses/500InternalServerError_sqlapi' '503': - $ref: '#/components/responses/503ServiceUnavailable' + $ref: '#/components/responses/503ServiceUnavailable_sqlapi' '504': - $ref: '#/components/responses/504GatewayTimeout' + $ref: '#/components/responses/504GatewayTimeout_sqlapi' + parameters: + - $ref: '#/components/parameters/statement_handle' + - $ref: '#/components/parameters/requestId' components: + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + keyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set X-Snowflake-Authorization-Token-Type to KEYPAIR_JWT if the token is a key pair authn JWT. + snowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + ExternalOAuth_sqlapi: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (refer to docs). Set X-Snowflake-Authorization-Token-Type to OAUTH and set the Token to auth token received from the external Auth server. schemas: - QueryStatus: + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: type: object properties: - code: + message: type: string - sqlState: + description: Error message returned by the server + code: type: string - message: + description: Error code. + error_code: type: string - statementHandle: + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: type: string - format: uuid - createdOn: - type: integer - format: int64 - description: Timestamp that specifies when the statement execution started. - The timestamp is expressed in milliseconds since the epoch. - example: 1597090533987 - statementStatusUrl: + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: type: string - format: uri - description: URL that you can use to check the status of the execution of - the statement and the result set. - required: - - statementHandle + description: Message returned by the server. example: - code: '000000' - sqlState: '00000' - message: successfully executed - statementHandle: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae - createdOn: 1597090533987 - QueryFailureStatus: + status: Request successfully completed + SuccessAcceptedResponse: type: object + description: Schema for a request in progress response returned by the server. properties: code: type: string - sqlState: - type: string + description: Message code returned by the server. message: type: string - statementHandle: - type: string - format: uuid - createdOn: - type: integer - format: int64 - description: "Timestamp that specifies when the statement execution started.\u200C\ - \ The timestamp is expressed in milliseconds since the epoch." - example: 1597090533987 - statementStatusUrl: + description: Message returned by the server + resultHandler: type: string - format: uri - required: - - message - - statementHandle + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. example: - code: '000123' - sqlState: '42601' - message: SQL compilation error - statementHandle: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae - createdOn: 1597090533987 - CancelStatus: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: type: object + description: Point of time. + required: + - point_of_time_type properties: - code: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. type: string - sqlState: + example: timestamp + reference: type: string - message: + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: type: string - statementHandle: + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. type: string - format: uuid - statementStatusUrl: + example: timestamp + reference: type: string - format: uri + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object required: - - statementHandle - example: - message: successfully canceled - statementHandle: 536fad38-b564-4dc5-9892-a4543504df6c - ResultSet: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. properties: - code: + statement: type: string - example: '000123' - sqlState: + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. type: string - example: '42601' - message: + example: timestamp + reference: type: string - example: successfully executed - statementHandle: + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: type: string - format: uuid - example: 536fad38-b564-4dc5-9892-a4543504df6c - createdOn: - type: integer - format: int64 - description: "Timestamp that specifies when the statement execution started.\u200C\ - \ The timestamp is expressed in milliseconds since the epoch.\u200C" - example: 1597090533987 - statementStatusUrl: + description: Parameter name. + value: type: string - format: uri - resultSetMetaData: - type: object - properties: - format: - type: string - enum: - - jsonv2 - description: For v2 endpoints the only possible value for this field - is jsonv2. - example: jsonv2 - numRows: - type: integer - format: int64 - description: The total number of rows of results. - example: 100 - rowType: - type: array - minItems: 1 - items: - type: object - properties: - name: - type: string - type: - type: string - length: - type: integer - format: int64 + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + QueryStatus: + type: object + properties: + code: + type: string + sqlState: + type: string + message: + type: string + statementHandle: + type: string + format: uuid + createdOn: + type: integer + format: int64 + description: Timestamp that specifies when the statement execution started. The timestamp is expressed in milliseconds since the epoch. + example: 1597090533987 + statementStatusUrl: + type: string + format: uri + description: URL that you can use to check the status of the execution of the statement and the result set. + required: + - statementHandle + example: + code: '000000' + sqlState: '00000' + message: successfully executed + statementHandle: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae + createdOn: 1597090533987 + QueryFailureStatus: + type: object + properties: + code: + type: string + sqlState: + type: string + message: + type: string + statementHandle: + type: string + format: uuid + createdOn: + type: integer + format: int64 + description: Timestamp that specifies when the statement execution started.‌ The timestamp is expressed in milliseconds since the epoch. + example: 1597090533987 + statementStatusUrl: + type: string + format: uri + required: + - message + - statementHandle + example: + code: '000123' + sqlState: '42601' + message: SQL compilation error + statementHandle: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae + createdOn: 1597090533987 + CancelStatus: + type: object + properties: + code: + type: string + sqlState: + type: string + message: + type: string + statementHandle: + type: string + format: uuid + statementStatusUrl: + type: string + format: uri + required: + - statementHandle + example: + message: successfully canceled + statementHandle: 536fad38-b564-4dc5-9892-a4543504df6c + ResultSet: + type: object + properties: + code: + type: string + example: '000123' + sqlState: + type: string + example: '42601' + message: + type: string + example: successfully executed + statementHandle: + type: string + format: uuid + example: 536fad38-b564-4dc5-9892-a4543504df6c + createdOn: + type: integer + format: int64 + description: Timestamp that specifies when the statement execution started.‌ The timestamp is expressed in milliseconds since the epoch.‌ + example: 1597090533987 + statementStatusUrl: + type: string + format: uri + resultSetMetaData: + type: object + properties: + format: + type: string + enum: + - jsonv2 + description: For v2 endpoints the only possible value for this field is jsonv2. + example: jsonv2 + numRows: + type: integer + format: int64 + description: The total number of rows of results. + example: 100 + rowType: + type: array + minItems: 1 + items: + type: object + properties: + name: + type: string + type: + type: string + length: + type: integer + format: int64 minimum: 0 precision: type: integer @@ -474,42 +745,42 @@ components: nullable: type: boolean example: - - name: ROWNUM - type: FIXED - length: 0 - precision: 38 - scale: 0 - nullable: false - - name: ACCOUNT_ID - type: FIXED - length: 0 - precision: 38 - scale: 0 - nullable: false - - name: ACCOUNT_NAME - type: TEXT - length: 1024 - precision: 0 - scale: 0 - nullable: false - - name: ADDRESS - type: TEXT - length: 16777216 - precision: 0 - scale: 0 - nullable: true - - name: ZIP - type: TEXT - length: 100 - precision: 0 - scale: 0 - nullable: true - - name: CREATED_ON - type: TIMESTAMP_NTZ - length: 0 - precision: 0 - scale: 3 - nullable: false + - name: ROWNUM + type: FIXED + length: 0 + precision: 38 + scale: 0 + nullable: false + - name: ACCOUNT_ID + type: FIXED + length: 0 + precision: 38 + scale: 0 + nullable: false + - name: ACCOUNT_NAME + type: TEXT + length: 1024 + precision: 0 + scale: 0 + nullable: false + - name: ADDRESS + type: TEXT + length: 16777216 + precision: 0 + scale: 0 + nullable: true + - name: ZIP + type: TEXT + length: 100 + precision: 0 + scale: 0 + nullable: true + - name: CREATED_ON + type: TIMESTAMP_NTZ + length: 0 + precision: 0 + scale: 3 + nullable: false partitionInfo: description: Partition information type: array @@ -526,9 +797,7 @@ components: compressedSize: type: integer format: int64 - description: the partition size before the decompression. This - may or may not be present in the partitionInfo. Uncompressed - size would always be there. + description: the partition size before the decompression. This may or may not be present in the partitionInfo. Uncompressed size would always be there. minimum: 0 example: 37436824 uncompressedSize: @@ -538,8 +807,7 @@ components: minimum: 0 example: 1343787384 nullable: - description: false if null is replaced with a string 'null' otherwise - false + description: false if null is replaced with a string 'null' otherwise false type: boolean parameters: type: object @@ -580,22 +848,22 @@ components: nullable: true minItems: 0 example: - - - customer1 - - 1234 A Avenue - - '98765' - - '2019-08-10 23:56:34.123' - - - customer2 - - 987 B Street - - '98765' - - '2019-08-11 09:45:12.890' - - - customer3 - - 8777 C Blvd - - '98765' - - '2019-08-12 10:23:51.999' - - - customer4 - - 64646 D Circle - - '98765' - - '2019-08-13 01:54:32.000' + - - customer1 + - 1234 A Avenue + - '98765' + - '2019-08-10 23:56:34.123' + - - customer2 + - 987 B Street + - '98765' + - '2019-08-11 09:45:12.890' + - - customer3 + - 8777 C Blvd + - '98765' + - '2019-08-12 10:23:51.999' + - - customer4 + - 64646 D Circle + - '98765' + - '2019-08-13 01:54:32.000' stats: type: object description: these stats might not be available for each request. @@ -613,318 +881,21 @@ components: minimum: 0 example: 9 numRowsDeleted: - type: integer - format: int64 - description: Number of rows that were deleted. - minimum: 0 - example: 8 - numDuplicateRowsUpdated: - type: integer - format: int64 - description: Number of duplicate rows that were updated. - minimum: 0 - example: 20 - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - parameters: - requestId: - name: requestId - in: query - schema: - type: string - format: uuid - required: false - allowEmptyValue: false - description: Unique ID of the API request. This ensures that the execution is - idempotent. If not specified, a new UUID is generated and assigned. - async: - name: async - in: query - schema: - type: boolean - example: true - required: false - description: Set to true to execute the statement asynchronously and return - the statement handle. If the parameter is not specified or is set to false, - a statement is executed and the first result is returned if the execution - is completed in 45 seconds. If the statement execution takes longer to complete, - the statement handle is returned. - partition: - name: partition - in: query - schema: - type: integer - format: int64 - minimum: 0 - example: 2 - required: false - description: Number of the partition of results to return. The number can range - from 0 to the total number of partitions minus 1. - nullable: - name: nullable - in: query - schema: - type: boolean - example: true - required: false - description: Set to true to execute the statement to generate the result set - including null. If the parameter is set to false, the result set value null - will be replaced with a string 'null'. - statementHandle: - name: statementHandle - in: path - schema: - type: string - format: uuid - example: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae - required: true - allowEmptyValue: false - description: The handle of the statement that you want to use (e.g. to fetch - the result set or cancel execution). - userAgent: - name: User-Agent - in: header - schema: - type: string - example: myApplication/1.0 - required: true - allowEmptyValue: false - description: "Set this to the name and version of your application (e.g. \u201C\ - applicationName/applicationVersion\u201D). You must use a value that complies\ - \ with RFC 7231." - accept: - name: Accept - in: header - schema: - type: string - example: application/json - required: false - allowEmptyValue: false - description: The response payload format. The schema should be specified in - resultSetMetaData in the request payload. - acceptEncoding: - name: Accept-Encoding - in: header - schema: - type: string - example: gzip - required: false - allowEmptyValue: false - description: The response payload encoding. Optional. - snowflakeAuthorizationTokenType: - name: X-Snowflake-Authorization-Token-Type - in: header - schema: - type: string - example: KEYPAIR_JWT - required: false - allowEmptyValue: true - description: Specify the authorization token type for the Authorization header. - KEYPAIR_JWT is for Keypair JWT or OAUTH for oAuth token. If not specified, - OAUTH is assumed. - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' + type: integer + format: int64 + description: Number of rows that were deleted. + minimum: 0 + example: 8 + numDuplicateRowsUpdated: + type: integer + format: int64 + description: Number of duplicate rows that were updated. + minimum: 0 + example: 20 + parameters: application: name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. required: true in: path schema: @@ -938,65 +909,41 @@ components: schema: example: TEST_NAME $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) createMode: name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. in: query schema: type: string enum: - - errorIfExists - - orReplace - - ifNotExists + - errorIfExists + - orReplace + - ifNotExists example: ifNotExists default: errorIfExists mode: name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. in: query schema: type: string enum: - - restrict - - cascade + - restrict + - cascade example: restrict ifExists: name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. in: query schema: type: boolean @@ -1004,33 +951,28 @@ components: default: false like: name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. in: query schema: type: string example: test_% pattern: name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. + description: Parameter that filters the command output by a regular expression pattern. in: query schema: type: string example: .*data_0.* startsWith: name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. in: query schema: type: string example: test rootOnly: name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). + description: Parameter to filter the command output to return only root resources (resources with no predecessors). in: query schema: type: boolean @@ -1038,8 +980,7 @@ components: default: false showLimit: name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. + description: Parameter to limit the maximum number of rows returned by a command. in: query schema: type: integer @@ -1048,16 +989,14 @@ components: maximum: 10000 fromName: name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. in: query schema: type: string example: from_test copyGrants: name: copyGrants - description: Query parameter to enable copy grants when creating the object. + description: Parameter to enable copy grants when creating the object. in: query schema: type: boolean @@ -1086,17 +1025,24 @@ components: schema: type: string enum: - - application/json + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json x-snowflake-authorization-token-type: name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. in: header schema: type: string enum: - - KEYPAIR_JWT - - OAUTH + - KEYPAIR_JWT + - OAUTH x-sfc-session: name: X-Sfc-Session description: Token for the current Snowflake session. @@ -1106,71 +1052,128 @@ components: type: string description: Snowflake session token. example: ver:3-hint:1000-ABCD= - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + requestId: + name: requestId + in: query + schema: + type: string + format: uuid + required: false + allowEmptyValue: false + description: Unique ID of the API request. This ensures that the execution is idempotent. If not specified, a new UUID is generated and assigned. + async: + name: async + in: query + schema: + type: boolean + example: true + required: false + description: Set to true to execute the statement asynchronously and return the statement handle. If the parameter is not specified or is set to false, a statement is executed and the first result is returned if the execution is completed in 45 seconds. If the statement execution takes longer to complete, the statement handle is returned. + partition: + name: partition + in: query + schema: + type: integer + format: int64 + minimum: 0 + example: 2 + required: false + description: Number of the partition of results to return. The number can range from 0 to the total number of partitions minus 1. + nullable: + name: nullable + in: query + schema: + type: boolean + example: true + required: false + description: Set to true to execute the statement to generate the result set including null. If the parameter is set to false, the result set value null will be replaced with a string 'null'. + userAgent: + name: User-Agent + in: header + schema: + type: string + example: myApplication/1.0 + required: true + allowEmptyValue: false + description: Set this to the name and version of your application (e.g. “applicationName/applicationVersion”). You must use a value that complies with RFC 7231. + acceptEncoding: + name: Accept-Encoding + in: header + schema: + type: string + example: gzip + required: false + allowEmptyValue: false + description: The response payload encoding. Optional. + snowflakeAuthorizationTokenType: + name: X-Snowflake-Authorization-Token-Type + in: header + schema: + type: string + example: KEYPAIR_JWT + required: false + allowEmptyValue: true + description: Specify the authorization token type for the Authorization header. KEYPAIR_JWT is for Keypair JWT or OAUTH for oAuth token. If not specified, OAUTH is assumed. + statement_handle: + name: statement_handle + in: path + schema: + type: string + format: uuid + example: e4ce975e-f7ff-4b5e-b15e-bf25f59371ae + required: true + allowEmptyValue: false + description: The handle of the statement that you want to use (e.g. to fetch the result set or cancel execution). + accept_sqlapi: + name: Accept + in: header + schema: + type: string + example: application/json + required: false + allowEmptyValue: false + description: The response payload format. The schema should be specified in resultSetMetaData in the request payload. + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + Link_sqlapi: + schema: + type: string + description: Links to the partition of results (e.g. the first partition, the last partition, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the partition to return ('first', 'next', 'prev', and 'last'). + example: ;rel="last",;rel="next",;rel="first" responses: - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - 403Forbidden: - description: Forbidden. The request is forbidden. This happens if the request - is made even if the API is not enabled. - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint is wrong. For example, if the application hits /api/api/hello - which doesn't exist, it will receive this code. - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. The application must change a method - for retry. - 415UnsupportedMediaType: - description: The request header Content-Type includes unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - 500InternalServerError: - description: Internal Server Error. The server hits an unrecoverable system - error. The response body may include the error code and message for further - guidance. The application owner may need to reach out the customer support. - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ 200SuccessResponse: description: Successful request. headers: @@ -1194,8 +1197,7 @@ components: Location: schema: type: string - description: Relative path for checking request status or getting the - result, if available. + description: Relative path for checking request status or getting the result, if available. X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' description: Successfully accepted the request, but it is not completed yet. @@ -1203,9 +1205,53 @@ components: application/json: schema: $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1214,10 +1260,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1226,9 +1269,7 @@ components: schema: $ref: '#/components/schemas/ErrorResponse' 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. headers: X-Snowflake-Request-ID: $ref: '#/components/headers/X-Snowflake-Request-ID' @@ -1236,24 +1277,101 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - headers: - Link: - schema: - type: string - description: Links to the partition of results (e.g. the first partition, - the last partition, etc.). The header can include multiple 'url' entries - with different 'rel' attribute values that specify the partition to return - ('first', 'next', 'prev', and 'last'). - example: ;rel="last",;rel="next",;rel="first" - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 400BadRequest_sqlapi: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + 401Unauthorized_sqlapi: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + 403Forbidden_sqlapi: + description: Forbidden. The request is forbidden. This happens if the request is made even if the API is not enabled. + 404NotFound_sqlapi: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint is wrong. For example, if the application hits /api/api/hello which doesn't exist, it will receive this code. + 405MethodNotAllowed_sqlapi: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. The application must change a method for retry. + 415UnsupportedMediaType_sqlapi: + description: The request header Content-Type includes unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + 429LimitExceeded_sqlapi: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + 500InternalServerError_sqlapi: + description: Internal Server Error. The server hits an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + 503ServiceUnavailable_sqlapi: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ + 504GatewayTimeout_sqlapi: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ x-stackQL-resources: + results: + id: snowflake.sqlapi.results + name: results + title: Results + methods: + fetch_result: + operation: + $ref: '#/paths/~1api~1v2~1results~1{result_handler}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + schema_override: + $ref: '#/components/schemas/ResultSet' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/results/methods/fetch_result' + insert: [] + update: [] + delete: [] + replace: [] statements: + id: snowflake.sqlapi.statements + name: statements + title: Statements methods: submit_statement: + config: + requestBodyTranslate: + algorithm: naive operation: $ref: '#/paths/~1api~1v2~1statements/post' response: @@ -1261,31 +1379,26 @@ components: openAPIDocKey: '200' get_statement_status: operation: - $ref: '#/paths/~1api~1v2~1statements~1{statementHandle}/get' + $ref: '#/paths/~1api~1v2~1statements~1{statement_handle}/get' response: mediaType: application/json openAPIDocKey: '200' cancel_statement: operation: - $ref: '#/paths/~1api~1v2~1statements~1{statementHandle}~1cancel/post' + $ref: '#/paths/~1api~1v2~1statements~1{statement_handle}~1cancel/post' response: mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/statements/methods/get_statement_status' + - $ref: '#/components/x-stackQL-resources/statements/methods/get_statement_status' insert: - - $ref: '#/components/x-stackQL-resources/statements/methods/submit_statement' + - $ref: '#/components/x-stackQL-resources/statements/methods/submit_statement' update: [] delete: - - $ref: '#/components/x-stackQL-resources/statements/methods/cancel_statement' + - $ref: '#/components/x-stackQL-resources/statements/methods/cancel_statement' replace: [] - id: snowflake.sqlapi.statements - name: statements - title: Statements security: -- keyPair: [] -- ExternalOAuth: [] -- snowflakeOAuth: [] -externalDocs: - url: https://docs.snowflake.com/en/developer-guide/sql-api/index.html + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/stage.yaml b/providers/src/snowflake/v00.00.00000/services/stage.yaml deleted file mode 100644 index 86d7cb71..00000000 --- a/providers/src/snowflake/v00.00.00000/services/stage.yaml +++ /dev/null @@ -1,1189 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Stage API - description: The Snowflake Stage API is a REST API that you can use to access, update, - and perform certain actions on stage resources in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/stages: - get: - summary: List stages - tags: - - stage - description: Lists stages under the database and schema, with show options as - query parameters. - operationId: listStages - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Stage' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a stage - tags: - - stage - description: Create a stage, with standard create modifiers as query parameters. - See the Stage component definition for what is required to be provided in - the request body. - operationId: createStage - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Stage' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}: - get: - summary: Fetch a stage - tags: - - stage - description: Fetch a stage using the describe command output. - operationId: fetchStage - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Stage' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a stage - tags: - - stage - description: Delete a stage with the stage name. If ifExists is used, the operation - will succeed even if the object does not exist. Otherwise, there will be a - failure if the drop is unsuccessful. - operationId: deleteStage - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}/files: - get: - summary: List files in the stage. - tags: - - stage - description: List files in the stage -- this is equivalent to LIST @stage. - operationId: listFiles - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/pattern' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/StageFile' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/stages/{name}/files/{filePath}:presigned-url: - post: - summary: Generate a presigned url and optionally encryption materials. - tags: - - stage - description: Generate a presigned url and optionally encryption materials for - uploading and downloading files. - operationId: getPresignedUrl - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - name: filePath - description: The full stage path of the file. - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PresignedUrlRequest' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/FileTransferMaterial' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - PresignedUrlRequest: - type: object - description: Request object to get presigned url of a file - properties: - expiration_time: - description: Expiration time of the generated presigned url in seconds. - type: integer - FileTransferMaterial: - type: object - description: Materials for uploading and downloading stage files - properties: - presigned_url: - type: string - description: Presigned url for file transfer, only works for Server Side - Encrypted Stages. - StageFile: - type: object - description: A file on a snowflake stage. - properties: - name: - type: string - description: Name of the file. - size: - type: string - description: Size of the file. - readOnly: true - md5: - type: string - description: md5 hash of the file. - readOnly: true - last_modified: - type: string - description: Date and time when the file was last modified. - readOnly: true - Stage: - type: object - description: A Snowflake stage. - properties: - name: - $ref: '#/components/schemas/Identifier' - description: String that specifies the identifier (i.e. name) for the stage. - kind: - type: string - enum: - - PERMANENT - - TEMPORARY - default: PERMANENT - description: Specifies whether the stage is permanent or temporary. - url: - type: string - description: URL for the external stage; blank for an internal stage. - endpoint: - type: string - description: The S3-compatible API endpoint associated with the stage; always - NULL for stages that are not S3-compatible. - storage_integration: - $ref: '#/components/schemas/Identifier' - description: Storage integration associated with the stage; always NULL - for an internal stage. - comment: - type: string - description: Specifies a comment for the stage. - credentials: - $ref: '#/components/schemas/Credentials' - writeOnly: true - description: Credentials of the stage. - encryption: - type: object - description: Encryption parameters of the stage. - writeOnly: true - properties: - type: - type: string - enum: - - SNOWFLAKE_FULL - - SNOWFLAKE_SSE - - AWS_CSE - - AWS_SSE_S3 - - AWS_SSE_KMS - - GCS_SSE_KMS - - AZURE_CSE - - NONE - description: Specifies the encryption type used. - master_key: - type: string - format: password - description: Specifies the client-side master key used to encrypt the - files in the bucket. The master key must be a 128-bit or 256-bit key - in Base64-encoded form. - kms_key_id: - type: string - description: Optionally specifies the ID for the KMS-managed key used - to encrypt files unloaded into the bucket. - directory_table: - type: object - description: Directory table parameters of the stage. - properties: - enable: - type: boolean - default: false - description: Specifies whether to add a directory table to the stage. - When the value is TRUE, a directory table is created with the stage. - refresh_on_create: - type: boolean - default: true - writeOnly: true - description: Specifies whether to automatically refresh the directory - table metadata once, immediately after the stage is created. - auto_refresh: - type: boolean - default: false - writeOnly: true - description: Specifies whether Snowflake should enable triggering automatic - refreshes of the directory table metadata when new or updated data - files are available in the named external stage specified in the URL - value. - notification_integration: - type: string - writeOnly: true - description: Specifies the name of the notification integration used - to automatically refresh the directory table metadata. - created_on: - type: string - description: Date and time when the stage was created. - format: date-time - readOnly: true - has_credentials: - type: boolean - description: Indicates that the external stage has access credentials; always - false for an internal stage. - readOnly: true - has_encryption_key: - type: boolean - description: Indicates that the external stage contains encrypted files; - always false for an internal stage. - readOnly: true - owner: - type: string - description: Role that owns the stage. - readOnly: true - owner_role_type: - type: string - description: The type of role that owns the object, either ROLE or DATABASE_ROLE. - If a Snowflake Native App owns the object, the value is APPLICATION. Snowflake - returns NULL if you delete the object because a deleted object does not - have an owner role. - readOnly: true - region: - type: string - description: Region where the stage is located. - readOnly: true - cloud: - type: string - description: Cloud provider; always NULL for an internal stage. - readOnly: true - example: - name: stage_name - required: - - name - Credentials: - type: object - description: Specifies the credentials of the stage. - properties: - credential_type: - description: Type of the credential, can be either AWS or AZURE. - type: string - discriminator: - propertyName: credential_type - mapping: - AWS: AwsCredentials - AZURE: AzureCredentials - AwsCredentials: - description: Specifies the AWS credentials of the stage. - allOf: - - $ref: '#/components/schemas/Credentials' - properties: - aws_key_id: - type: string - format: password - description: Scoped credentials generated by AWS Security Token Service - (STS). - aws_secret_key: - type: string - format: password - description: Scoped credentials generated by AWS Security Token Service - (STS). - aws_token: - type: string - format: password - description: Scoped credentials generated by AWS Security Token Service - (STS). - aws_role: - type: string - description: Omit the security credentials and access keys and, instead, - identify the role using AWS_ROLE and specify the AWS role ARN (Amazon - Resource Name). - AzureCredentials: - description: Specifies the Azure credentials of the stage. - allOf: - - $ref: '#/components/schemas/Credentials' - properties: - azure_sas_token: - type: string - format: password - description: Specifies the SAS (shared access signature) token for connecting - to Azure. - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - stages: - methods: - list_stages: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_stage: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_stage: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_stage: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/stages/methods/list_stages' - - $ref: '#/components/x-stackQL-resources/stages/methods/fetch_stage' - insert: - - $ref: '#/components/x-stackQL-resources/stages/methods/create_stage' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/stages/methods/delete_stage' - replace: [] - id: snowflake.stage.stages - name: stages - title: Stages - stage_files: - methods: - list_files: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}~1files/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/stage_files/methods/list_files' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.stage.stage_files - name: stage_files - title: Stage Files - presigned_url: - methods: - get_presigned_url: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1stages~1{name}~1files~1{filePath}:presigned-url/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/presigned_url/methods/get_presigned_url' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.stage.presigned_url - name: presigned_url - title: Presigned Url -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/streams.yaml b/providers/src/snowflake/v00.00.00000/services/streams.yaml deleted file mode 100644 index 8b1c5e61..00000000 --- a/providers/src/snowflake/v00.00.00000/services/streams.yaml +++ /dev/null @@ -1,1093 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Stream API - description: The Snowflake Stream API is a REST API that you can use to access, - update, and perform certain actions on Stream resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/streams: - get: - summary: List streams - tags: - - stream - description: List streams - operationId: listStreams - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Stream' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a stream - tags: - - stream - description: Create a stream - operationId: createStream - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Stream' - /api/v2/databases/{database_name}/schemas/{schema_name}/streams/{name}: - get: - summary: Fetch a stream - tags: - - stream - description: Fetch a stream - operationId: fetchStream - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/Stream' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a stream - tags: - - stream - description: Delete a stream - operationId: deleteStream - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/streams/{name}:clone: - post: - summary: Clone a stream - tags: - - stream - description: Clone a stream - operationId: cloneStream - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - name: targetDatabase - description: Database of the target resource. Defaults to the source's database - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - name: targetSchema - description: Schema of the target resource. Defaults to the source's schema - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/StreamClone' -components: - schemas: - Stream: - type: object - description: A Snowflake stream - properties: - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the stream was created. - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the stream - stream_source: - $ref: '#/components/schemas/StreamSource' - description: Source for the stream - comment: - type: string - description: user comment associated to an object in the dictionary - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Database in which the stream is stored - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Schema in which the stream is stored - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the stream - table_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Table name whose changes are tracked by the stream - stale: - type: boolean - readOnly: true - description: Specifies whether the stream is stale or not - mode: - type: string - readOnly: true - description: 'Mode of the stream. Possible values include: APPEND_ONLY, - INSERT_ONLY. For streams on tables, the column displays DEFAULT.' - stale_after: - type: string - format: date-time - readOnly: true - description: 'Timestamp when the stream became stale or may become stale - if not consumed. ' - invalid_reason: - type: string - readOnly: true - description: Reason why the stream cannot be queried successfully. This - column supports future functionality. Currently, the only value returned - is N/A. - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the stream - type: - type: string - readOnly: true - description: Type of the stream; currently DELTA only. - required: - - name - - stream_source - StreamSource: - type: object - properties: - src_type: - type: string - description: 'Type of the source. Possible values include: stream, table, - view' - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the source whose changes are tracked by the stream - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name to which stream source type belongs. If not provided, - database name provided in the path param will be used. - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name to which stream source type belongs. If not provided, - schema name provided in the path param will be used. - required: - - src_type - - name - discriminator: - propertyName: src_type - mapping: - table: StreamSourceTable - external_table: StreamSourceExternalTable - view: StreamSourceView - stage: StreamSourceStage - StreamSourceTable: - type: object - allOf: - - $ref: '#/components/schemas/StreamSource' - properties: - append_only: - type: boolean - description: Whether this stream is an append only stream or not - show_initial_rows: - type: boolean - description: Whether this stream show initial rows on first consumption - point_of_time: - $ref: '#/components/schemas/PointOfTime' - description: Point of time for the stream - PointOfTime: - type: object - properties: - point_of_time_type: - type: string - description: 'Type of the point of time. Possible values include: timestamp, - offset, statement' - reference: - type: string - enum: - - at - - before - x-enum-varnames: - - AT - - BEFORE - description: Relation to the point of time. Currently, the API supports - `at` and `before` - required: - - point_of_time_type - - reference - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - stream: PointOfTimeStream - PointOfTimeTimestamp: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - required: - - timestamp - PointOfTimeOffset: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - offset: - type: string - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - required: - - offset - PointOfTimeStatement: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - required: - - statement - PointOfTimeStream: - type: object - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - stream: - type: string - description: 'Creates the new stream at the same offset as the specified - stream. ' - StreamSourceExternalTable: - type: object - allOf: - - $ref: '#/components/schemas/StreamSource' - properties: - insert_only: - type: boolean - description: Whether this stream is an insert only stream or not - point_of_time: - $ref: '#/components/schemas/PointOfTime' - description: Point of time for the stream - StreamSourceView: - type: object - allOf: - - $ref: '#/components/schemas/StreamSource' - properties: - append_only: - type: boolean - description: Whether this stream is an append only stream or not - show_initial_rows: - type: boolean - description: Whether this stream show initial rows on first consumption - point_of_time: - $ref: '#/components/schemas/PointOfTime' - description: Point of time for the stream - base_tables: - type: array - items: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: List of base tables for the stream - StreamSourceStage: - type: object - allOf: - - $ref: '#/components/schemas/StreamSource' - StreamClone: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the stream - comment: - type: string - description: user comment associated to an object in the dictionary - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - streams: - methods: - list_streams: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_stream: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_stream: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_stream: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - clone_stream: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/streams/methods/list_streams' - - $ref: '#/components/x-stackQL-resources/streams/methods/fetch_stream' - insert: - - $ref: '#/components/x-stackQL-resources/streams/methods/create_stream' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/streams/methods/delete_stream' - replace: [] - id: snowflake.streams.streams - name: streams - title: Streams diff --git a/providers/src/snowflake/v00.00.00000/services/table.yaml b/providers/src/snowflake/v00.00.00000/services/table.yaml deleted file mode 100644 index 0c1c8c84..00000000 --- a/providers/src/snowflake/v00.00.00000/services/table.yaml +++ /dev/null @@ -1,1969 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Table API - description: The Snowflake Table API is a REST API that you can use to access, update, - and perform certain actions on Tables resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/tables: - get: - summary: List tables - tags: - - table - description: Lists the tables under the database and schema. - operationId: listTables - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: history - description: Optionally includes dropped tables that have not yet been purged. - in: query - required: false - schema: - type: boolean - - name: deep - description: Optionally includes dependency information of the table. - in: query - required: false - schema: - type: boolean - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Table' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a table (clone and undrop are separate subresources) - tags: - - table - description: Create a table. - operationId: createTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Table' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:as_select: - post: - deprecated: true - summary: Create a table using the result of the specified select query - tags: - - table - description: Create a table as select. - operationId: createTableAsSelectDeprecated - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: query - in: query - required: true - description: The SQL select query to run to set up the table values (and possibly - columns). - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Table' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables:as-select: - post: - summary: Create a table using the result of the specified select query - tags: - - table - description: Create a table as select. - operationId: createTableAsSelect - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: query - in: query - required: true - description: The SQL select query to run to set up the table values (and possibly - columns). - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TableAsSelect' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:using_template: - post: - deprecated: true - summary: Create a table using the templates specified in staged files - tags: - - table - description: Create a table using template. - operationId: createTableUsingTemplateDeprecated - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: query - description: The SQL query that uses INFER_SCHEMA on staged files to set the - column definitions for the new table. - in: query - required: true - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables:using-template: - post: - summary: Create a table using the templates specified in staged files - tags: - - table - description: Create a table using template. - operationId: createTableUsingTemplate - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: query - description: The SQL query that uses INFER_SCHEMA on staged files to set the - column definitions for the new table. - in: query - required: true - schema: - type: string - requestBody: - required: false - content: - application/json: - schema: - $ref: '#/components/schemas/TableUsingTemplate' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}: - get: - summary: Fetch a table. - tags: - - table - description: Fetch a Table using the describe command output. - operationId: fetchTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Table' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) table. - tags: - - table - description: Create a (or alter an existing) table. Even if the operation is - just an alter, the full property set must be provided. - operationId: createOrAlterTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Table' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a table - tags: - - table - description: Delete a table with the given name. - operationId: deleteTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:clone: - post: - summary: Clone table - tags: - - table - description: Create a new table by cloning from the specified resource - operationId: cloneTable - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: targetDatabase - in: query - description: Database of the newly created table. Defaults to the source table's - database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the newly created table. Defaults to the source table's - schema. - schema: - $ref: '#/components/schemas/Identifier' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TableClone' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:create_like: - post: - deprecated: true - summary: Create a table like this existing one - tags: - - table - description: Create a new table like the specified resource, but empty - operationId: createTableLikeDeprecated - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - - name: newTableName - description: The name of the table to be created. - in: query - required: true - schema: - type: string - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:create-like: - post: - summary: Create a table like this existing one - tags: - - table - description: Create a new table like the specified resource, but empty - operationId: createTableLike - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TableLike' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:undrop: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - summary: Undrop a table - tags: - - table - description: Undrop specified table - operationId: undropTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:suspend_recluster: - post: - deprecated: true - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Suspend recluster of a table - tags: - - table - description: Suspend recluster of a table - operationId: suspendReclusterTableDeprecated - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:suspend-recluster: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Suspend recluster of a table - tags: - - table - description: Suspend recluster of a table - operationId: suspendReclusterTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:resume_recluster: - post: - deprecated: true - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Resume recluster of a table - tags: - - table - description: Resume recluster of a table - operationId: resumeReclusterTableDeprecated - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:resume-recluster: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Resume recluster of a table - tags: - - table - description: Resume recluster of a table - operationId: resumeReclusterTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:swapwith: - post: - deprecated: true - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: targetTableName - description: The fully-specified name of the target table to be swapped with. - in: query - required: true - schema: - type: string - summary: Swap with another table - tags: - - table - description: Swap with another table - operationId: swapWithTableDeprecated - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:swap-with: - post: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - - name: targetName - description: The name of the target table to be swapped with. - in: query - required: true - schema: - $ref: '#/components/schemas/Identifier' - - name: targetDatabase - in: query - description: Database of the target table. Defaults to the source table's - database. - schema: - $ref: '#/components/schemas/Identifier' - - name: targetSchema - in: query - description: Schema of the target table. Defaults to the source table's schema. - schema: - $ref: '#/components/schemas/Identifier' - summary: Swap with another table - tags: - - table - description: Swap with another table - operationId: swapWithTable - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Table: - type: object - description: A Snowflake table - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - kind: - type: string - enum: - - PERMANENT - - TRANSIENT - - TEMPORARY - - '' - - transient - - temporary - x-enum-varnames: - - PERMANENT - - TRANSIENT - - TEMPORARY - - DEPRECATED_PERMANENT - - DEPRECATED_TRANSIENT - - DEPRECATED_TEMPORARY - default: PERMANENT - description: Table type - permanent, transient, or temporary - cluster_by: - type: array - description: Specifies one or more columns or column expressions in the - table as the clustering key - items: - type: string - enable_schema_evolution: - type: boolean - description: Table has schema evolution enabled or disabled - change_tracking: - type: boolean - description: Change tracking is enabled or disabled - data_retention_time_in_days: - type: integer - description: Specifies the retention period for the table so that Time Travel - actions SELECT, CLONE, UNDROP can be performed on historical data in the - table - max_data_extension_time_in_days: - type: integer - description: Specifies the retention period for the table so that Time Travel - actions SELECT, CLONE, UNDROP can be performed on historical data in the - table - default_ddl_collation: - type: string - description: Specifies a default collation specification for the columns - in the table, including columns added to the table in the future - columns: - type: array - items: - $ref: '#/components/schemas/TableColumn' - constraints: - type: array - items: - $ref: '#/components/schemas/Constraint' - comment: - type: string - description: Comment for the table - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the table was created. - database_name: - type: string - readOnly: true - description: Database in which the table is stored - schema_name: - type: string - readOnly: true - description: Schema in which the table is stored - rows: - type: integer - format: int64 - readOnly: true - description: Number of rows in the table. Returns NULL for external tables. - bytes: - type: integer - format: int64 - readOnly: true - description: Number of bytes that will be scanned if the entire table is - scanned in a query. Note that this number may be different than the number - of actual physical bytes stored on-disk for the table - owner: - type: string - readOnly: true - description: Role that owns the table - dropped_on: - type: string - format: date-time - readOnly: true - description: Date and time when the table was dropped - automatic_clustering: - type: boolean - readOnly: true - description: If Automatic Clustering is enabled for your account, specifies - whether it is explicitly enabled or disabled for the table. - search_optimization: - type: boolean - readOnly: true - description: If ON, the table has the search optimization service enabled - search_optimization_progress: - type: integer - format: int64 - readOnly: true - description: Percentage of the table that has been optimized for search. - search_optimization_bytes: - type: integer - format: int64 - readOnly: true - description: Number of additional bytes of storage that the search optimization - service consumes for this table - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the object. - budget: - type: string - readOnly: true - description: Name of the budget if the object is monitored by a budget - table_type: - type: string - enum: - - NORMAL - - DYNAMIC - - EXTERNAL - - EVENT - - HYBRID - - ICEBERG - - IMMUTABLE - readOnly: true - description: Type of the table - required: - - name - TableColumn: - type: object - description: A column in the table - properties: - name: - type: string - description: Column name - datatype: - type: string - description: The data type for the column - nullable: - type: boolean - default: true - description: Specifies that the column does allow NULL values or not. - collate: - type: string - description: Specifies the collation to use for column operations such as - string comparison - default: - type: string - description: Specifies whether a default value is automatically inserted - in the column if a value is not explicitly specified via an INSERT or - CREATE TABLE AS SELECT statement - autoincrement: - type: boolean - autoincrement_start: - type: integer - description: The default value for the column starts with the specified - number - autoincrement_increment: - type: integer - description: Each successive value for the column automatically increments - by the specified amount - constraints: - type: array - items: - $ref: '#/components/schemas/Constraint' - comment: - type: string - description: Specifies a comment for the column - required: - - name - - datatype - Constraint: - type: object - description: Constraints define integrity and consistency rules for data stored - in tables. - properties: - name: - type: string - description: Name of the Constraint - column_names: - type: array - items: - type: string - description: Column name for the constraint - constraint_type: - type: string - description: Type of the constraint - discriminator: - propertyName: constraint_type - mapping: - PRIMARY KEY: PrimaryKey - FOREIGN KEY: ForeignKey - UNIQUE: UniqueKey - PrimaryKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: A primary key is the column or columns that contain values that - uniquely identify each row in a table. - UniqueKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: Unique keys are columns in a table that uniquely identify items - in the rows. This sounds a lot like a primary key, but the main difference - is that unique keys can have NULL values. - ForeignKey: - allOf: - - $ref: '#/components/schemas/Constraint' - type: object - description: Foreign keys link data in one table to the data in another table. - properties: - referenced_table_name: - type: string - referenced_column_names: - type: array - items: - type: string - required: - - referenced_table_name - - referenced_column_names - TableClone: - type: object - description: Clone table - allOf: - - $ref: '#/components/schemas/Table' - properties: - point_of_time: - $ref: '#/components/schemas/PointOfTime' - TableAsSelect: - type: object - description: Create table as select - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - columns: - type: array - items: - $ref: '#/components/schemas/TableColumn' - cluster_by: - type: array - description: Specifies one or more columns or column expressions in the - table as the clustering key - items: - type: string - TableUsingTemplate: - type: object - description: Create table using template - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - TableLike: - type: object - description: Create table like an existing table - properties: - name: - type: string - description: Specifies the name for the table, must be unique for the schema - in which the table is created - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - tables: - methods: - list_tables: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_as_select_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:as_select/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_as_select: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables:as-select/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_using_template_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:using_template/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_using_template: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables:using-template/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - clone_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:clone/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_like_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:create_like/post' - response: - mediaType: '' - openAPIDocKey: '200' - create_table_like: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:create-like/post' - response: - mediaType: '' - openAPIDocKey: '200' - undrop_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:undrop/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_recluster_table_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:suspend_recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_recluster_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:suspend-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_recluster_table_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:resume_recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_recluster_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:resume-recluster/post' - response: - mediaType: '' - openAPIDocKey: '200' - swap_with_table_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:swapwith/post' - response: - mediaType: '' - openAPIDocKey: '200' - swap_with_table: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:swap-with/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tables/methods/list_tables' - - $ref: '#/components/x-stackQL-resources/tables/methods/fetch_table' - insert: - - $ref: '#/components/x-stackQL-resources/tables/methods/create_table' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/tables/methods/delete_table' - replace: - - $ref: '#/components/x-stackQL-resources/tables/methods/create_or_alter_table' - id: snowflake.table.tables - name: tables - title: Tables -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/tables.yaml b/providers/src/snowflake/v00.00.00000/services/tables.yaml new file mode 100644 index 00000000..87799f48 --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/tables.yaml @@ -0,0 +1,5628 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Tables API + description: 'The Snowflake REST API surface for the tables service, combining the vendor spec(s): dynamic-table.yaml, event-table.yaml, iceberg-table.yaml, stream.yaml, table.yaml, view.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables: + get: + summary: List dynamic tables + tags: + - dynamic-table + description: Lists the dynamic tables under the database and schema. + operationId: listDynamicTables + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: deep + description: Optionally includes dependency information of the dynamic table. + in: query + required: false + schema: + type: boolean + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListDynamicTablesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a dynamic table + tags: + - dynamic-table + description: Create a dynamic table, with standard create modifiers as query parameters. See the Dynamic Table component definition for what is required to be provided in the request body. + operationId: createDynamicTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicTable' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}: + get: + summary: Fetch a dynamic table. + tags: + - dynamic-table + description: Fetch a Dynamic Table. + operationId: fetchDynamicTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicTable' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a dynamic table + tags: + - dynamic-table + description: Delete a dynamic table with the given name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. + operationId: deleteDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:clone: + post: + summary: Clone dynamic table + tags: + - dynamic-table + description: Create a new dynamic table by cloning from the specified resource + operationId: cloneDynamicTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: targetDatabase + in: query + description: Database of the newly created dynamic table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the newly created dynamic table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicTableClone' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:undrop: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + summary: Undrop a dynamic table + tags: + - dynamic-table + description: Undrop specified dynamic table + operationId: undropDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:suspend: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Suspend refreshes on the dynamic table + tags: + - dynamic-table + description: Suspend refreshes on the dynamic table + operationId: suspendDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:resume: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Resume refreshes on the dynamic table + tags: + - dynamic-table + description: Resume refreshes on the dynamic table + operationId: resumeDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:refresh: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Refresh the dynamic table + tags: + - dynamic-table + description: Specifies that the dynamic table should be manually refreshed + operationId: refreshDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:suspend-recluster: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Suspend recluster of a dynamic table + tags: + - dynamic-table + description: Suspend recluster of a dynamic table + operationId: suspendReclusterDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:resume-recluster: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Resume recluster of a dynamic table + tags: + - dynamic-table + description: Resume recluster of a dynamic table + operationId: resumeReclusterDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/dynamic-tables/{name}:swap-with: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetName + description: The name of the target dynamic table to be swapped with. + in: query + required: true + schema: + $ref: '#/components/schemas/Identifier' + - name: targetDatabase + in: query + description: Database of the target dynamic table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the target dynamic table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + summary: Swap with another dynamic table + tags: + - dynamic-table + description: Swap with another dynamic table + operationId: swapWithDynamicTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables: + get: + summary: List event tables + tags: + - event-table + description: List event tables + operationId: listEventTables + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListEventTablesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create an event table + tags: + - event-table + description: Create an event table + operationId: createEventTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EventTable' + /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables/{name}: + get: + summary: Fetch an event table + tags: + - event-table + description: Fetch an event table + operationId: fetchEventTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/EventTable' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete an event table + tags: + - event-table + description: Delete an event table + operationId: deleteEventTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/event-tables/{name}:rename: + post: + summary: Rename the event table + tags: + - event-table + description: Rename the event table + operationId: renameEventTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetName + description: Specify the name of the target resource to be renamed to. + in: query + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables: + get: + summary: List iceberg tables + tags: + - iceberg-table + description: Lists the Apache Iceberg™ tables for which you have access privileges. + operationId: listIcebergTables + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: deep + description: Optionally includes dependency information of the table. + in: query + required: false + schema: + type: boolean + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListIcebergTablesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a snowflake managed iceberg table (clone and undrop are separate subresources) + tags: + - iceberg-table + description: Create a snowflake managed iceberg table (clone and undrop are separate subresources) + operationId: createSnowflakeManagedIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTable' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:as-select: + post: + summary: Create a snowflake managed iceberg table as select + tags: + - iceberg-table + description: Create a snowflake managed iceberg table as select + operationId: createSnowflakeManagedIcebergTableAsSelect + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: query + in: query + required: true + description: The SQL select query to run to set up the table values (and possibly columns). + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableAsSelect' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-aws-glue-catalog: + post: + summary: Create an unmanaged iceberg table from AWS Glue catalog + tags: + - iceberg-table + description: Create an unmanaged iceberg table from AWS Glue catalog + operationId: createUnmanagedIcebergTableFromAWSGlueCatalog + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableFromAWSGlueCatalog' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-delta: + post: + summary: Create an unmanaged iceberg table from Delta + tags: + - iceberg-table + description: Create an unmanaged iceberg table from Delta + operationId: createUnmanagedIcebergTableFromDelta + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableFromDelta' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-iceberg-files: + post: + summary: Create an unmanaged iceberg table from Iceberg files + tags: + - iceberg-table + description: Create an unmanaged iceberg table from Iceberg files + operationId: createUnmanagedIcebergTableFromIcebergFiles + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableFromIcebergFiles' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables:from-iceberg-rest: + post: + summary: Create an unmanaged iceberg table from Iceberg REST + tags: + - iceberg-table + description: Create an unmanaged iceberg table from Iceberg REST + operationId: createUnmanagedIcebergTableFromIcebergRest + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableFromIcebergRest' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}: + get: + summary: Describe iceberg table + tags: + - iceberg-table + description: Describe an iceberg table + operationId: fetchIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTable' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Drop iceberg table + tags: + - iceberg-table + description: Drop an iceberg table + operationId: dropIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: type + description: Specifies whether the table can be dropped if foreign keys exist that reference the table. + in: query + required: false + schema: + type: string + enum: + - CASCADE + - RESTRICT + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:resume-recluster: + post: + summary: Resume recluster of an iceberg table + tags: + - iceberg-table + description: Resume recluster of an iceberg table (iceberg tables managed by an external catalog do not allow clustering) + operationId: resumeReclusterIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:suspend-recluster: + post: + summary: Suspend recluster of an iceberg table + tags: + - iceberg-table + description: Suspend recluster of an iceberg table (iceberg tables managed by an external catalog do not allow clustering) + operationId: suspendReclusterIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:refresh: + post: + summary: Refreshes the metadata for an Apache Iceberg table that uses an external Iceberg catalog + tags: + - iceberg-table + description: Refreshes the metadata for an Apache Iceberg table that uses an external Iceberg catalog + operationId: refreshIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RefreshIcebergTableRequest' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:convert-to-managed: + post: + summary: Converts an Apache Iceberg™ table that uses an external Iceberg catalog into a table that uses Snowflake as the catalog + tags: + - iceberg-table + description: Convert unmanaged iceberg table to managed iceberg table + operationId: convertToManagedIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConvertToManagedIcebergTableRequest' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:undrop: + post: + summary: Undrop iceberg table + tags: + - iceberg-table + description: Undrop an iceberg table + operationId: undropIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:clone: + post: + summary: Clone a snowflake managed iceberg table + tags: + - iceberg-table + description: Clone a snowflake managed iceberg table + operationId: cloneSnowflakeManagedIcebergTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: targetDatabase + in: query + description: Database of the newly created table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the newly created table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableClone' + /api/v2/databases/{database_name}/schemas/{schema_name}/iceberg-tables/{name}:create-like: + post: + summary: Create iceberg table like + tags: + - iceberg-table + description: Creates a new table with the same column definitions as an existing table, but without copying data from the existing table. + operationId: createSnowflakeManagedIcebergTableLike + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: targetDatabase + in: query + description: Database of the newly created table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the newly created table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergTableLike' + /api/v2/databases/{database_name}/schemas/{schema_name}/streams: + get: + summary: List streams + tags: + - stream + description: List streams + operationId: listStreams + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListStreamsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a stream + tags: + - stream + description: Create a stream + operationId: createStream + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Stream' + /api/v2/databases/{database_name}/schemas/{schema_name}/streams/{name}: + get: + summary: Fetch a stream + tags: + - stream + description: Fetch a stream + operationId: fetchStream + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/Stream' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a stream + tags: + - stream + description: Delete a stream + operationId: deleteStream + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/streams/{name}:clone: + post: + summary: Clone a stream + tags: + - stream + description: Clone a stream + operationId: cloneStream + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - name: targetDatabase + description: Database of the target resource. Defaults to the source's database + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - name: targetSchema + description: Schema of the target resource. Defaults to the source's schema + in: query + required: true + schema: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StreamClone' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables: + get: + summary: List tables + tags: + - table + description: Lists the tables under the database and schema. + operationId: listTables + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: history + description: Optionally includes dropped tables that have not yet been purged. + in: query + required: false + schema: + type: boolean + - name: deep + description: Optionally includes dependency information of the table. + in: query + required: false + schema: + type: boolean + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListTablesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a table (clone and undrop are separate subresources) + tags: + - table + description: Create a table. + operationId: createTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Table' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:as_select: + post: + deprecated: true + summary: Create a table using the result of the specified select query + tags: + - table + description: Create a table as select. + operationId: createTableAsSelectDeprecated + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: query + in: query + required: true + description: The SQL select query to run to set up the table values (and possibly columns). + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Table' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables:as-select: + post: + summary: Create a table using the result of the specified select query + tags: + - table + description: Create a table as select. + operationId: createTableAsSelect + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: query + in: query + required: true + description: The SQL select query to run to set up the table values (and possibly columns). + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableAsSelect' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:using_template: + post: + deprecated: true + summary: Create a table using the templates specified in staged files + tags: + - table + description: Create a table using template. + operationId: createTableUsingTemplateDeprecated + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: query + description: The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table. + in: query + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables:using-template: + post: + summary: Create a table using the templates specified in staged files + tags: + - table + description: Create a table using template. + operationId: createTableUsingTemplate + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: query + description: The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table. + in: query + required: true + schema: + type: string + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/TableUsingTemplate' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}: + get: + summary: Fetch a table. + tags: + - table + description: Fetch a Table using the describe command output. + operationId: fetchTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Table' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Delete a table + tags: + - table + description: Delete a table with the given name. + operationId: deleteTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:clone: + post: + summary: Clone table + tags: + - table + description: Create a new table by cloning from the specified resource + operationId: cloneTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: targetDatabase + in: query + description: Database of the newly created table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the newly created table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableClone' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:create_like: + post: + deprecated: true + summary: Create a table like this existing one + tags: + - table + description: Create a new table like the specified resource, but empty + operationId: createTableLikeDeprecated + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + - name: newTableName + description: The name of the table to be created. + in: query + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:create-like: + post: + summary: Create a table like this existing one + tags: + - table + description: Create a new table like the specified resource, but empty + operationId: createTableLike + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableLike' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:undrop: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + summary: Undrop a table + tags: + - table + description: Undrop specified table + operationId: undropTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:suspend_recluster: + post: + deprecated: true + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Suspend recluster of a table + tags: + - table + description: Suspend recluster of a table + operationId: suspendReclusterTableDeprecated + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:suspend-recluster: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Suspend recluster of a table + tags: + - table + description: Suspend recluster of a table + operationId: suspendReclusterTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:resume_recluster: + post: + deprecated: true + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Resume recluster of a table + tags: + - table + description: Resume recluster of a table + operationId: resumeReclusterTableDeprecated + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:resume-recluster: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Resume recluster of a table + tags: + - table + description: Resume recluster of a table + operationId: resumeReclusterTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:swapwith: + post: + deprecated: true + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetTableName + description: The fully-specified name of the target table to be swapped with. + in: query + required: true + schema: + type: string + summary: Swap with another table + tags: + - table + description: Swap with another table + operationId: swapWithTableDeprecated + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{name}:swap-with: + post: + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + - name: targetName + description: The name of the target table to be swapped with. + in: query + required: true + schema: + $ref: '#/components/schemas/Identifier' + - name: targetDatabase + in: query + description: Database of the target table. Defaults to the source table's database. + schema: + $ref: '#/components/schemas/Identifier' + - name: targetSchema + in: query + description: Schema of the target table. Defaults to the source table's schema. + schema: + $ref: '#/components/schemas/Identifier' + summary: Swap with another table + tags: + - table + description: Swap with another table + operationId: swapWithTable + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/views: + get: + summary: List views + tags: + - view + description: List views + operationId: listViews + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + - $ref: '#/components/parameters/fromName' + - name: deep + description: Optionally includes dependency information of the view. + in: query + required: false + schema: + type: boolean + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListViewsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Create a view + tags: + - view + description: Create a view + operationId: createView + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/createMode' + - $ref: '#/components/parameters/copyGrants' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/View' + /api/v2/databases/{database_name}/schemas/{schema_name}/views/{name}: + get: + summary: Fetch a view + tags: + - view + description: Fetch a view + operationId: fetchView + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/View' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Delete a view + tags: + - view + description: Delete a view + operationId: deleteView + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/databases/{database_name}/schemas/{schema_name}/tables/{table_name}: + parameters: [] + put: + summary: Create a (or alter an existing) table. + tags: + - table + description: Create a (or alter an existing) table. Even if the operation is just an alter, the full property set must be provided. + operationId: createOrAlterTable + parameters: + - $ref: '#/components/parameters/database_name' + - $ref: '#/components/parameters/schema_name' + - name: table_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Table' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + DynamicTable: + type: object + description: A Snowflake dynamic table object. + properties: + name: + type: string + description: Specifies the name for the dynamic table, must be unique for the schema in which the dynamic table is created + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + default: PERMANENT + description: Specifies the dynamic table type, permanent (default) or transient. + columns: + type: array + items: + $ref: '#/components/schemas/DynamicTableColumn' + target_lag: + $ref: '#/components/schemas/TargetLag' + refresh_mode: + type: string + description: Specifies the refresh type for the dynamic table + enum: + - AUTO + - FULL + - INCREMENTAL + initialize: + type: string + description: Specifies the behavior of the initial refresh of the dynamic table + enum: + - ON_CREATE + - ON_SCHEDULE + warehouse: + type: string + description: Specifies the name of the warehouse that provides the compute resources for refreshing the dynamic table + example: test_wh + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the dynamic table as the clustering key + items: + type: string + query: + type: string + description: Specifies the query whose results the dynamic table should contain + example: SELECT * FROM foo + data_retention_time_in_days: + type: integer + description: Specifies the retention period for the dynamic table so that Time Travel actions (SELECT, CLONE) can be performed on historical data in the dynamic table + max_data_extension_time_in_days: + type: integer + description: Specifies the retention period for the dynamic table so that Time Travel actions (SELECT, CLONE) can be performed on historical data in the dynamic table + comment: + type: string + description: Specifies a comment for the dynamic table. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the dynamic table was created. + database_name: + type: string + readOnly: true + description: Database in which the dynamic table is stored + schema_name: + type: string + readOnly: true + description: Schema in which the dynamic table is stored + rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the dynamic table. + bytes: + type: integer + format: int64 + readOnly: true + description: Number of bytes that will be scanned if the entire table is scanned in a query. Note that this number may be different than the number of actual physical bytes stored on-disk for the table + scheduling_state: + type: string + enum: + - RUNNING + - SUSPENDED + readOnly: true + description: Scheduling state (RUNNING or SUSPENDED) + automatic_clustering: + type: boolean + readOnly: true + description: If Automatic Clustering is enabled for your account, specifies whether it is explicitly enabled or disabled for the dynamic table. + owner: + type: string + readOnly: true + description: Role that owns the table + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the object. + budget: + type: string + readOnly: true + description: Name of the budget if the object is monitored by a budget + required: + - name + - target_lag + - warehouse + - query + DynamicTableColumn: + type: object + description: A column in the dynamic table + properties: + name: + type: string + description: Column name + datatype: + type: string + description: The data type for the column + comment: + type: string + description: Specifies a comment for the column + required: + - name + DynamicTableClone: + type: object + description: Clone dynamic table + properties: + name: + type: string + description: Specifies the name for the dynamic table, must be unique for the schema in which the dynamic table is created + target_lag: + $ref: '#/components/schemas/TargetLag' + warehouse: + type: string + description: Specifies the name of the warehouse that provides the compute resources for refreshing the dynamic table + point_of_time: + $ref: '#/components/schemas/PointOfTime' + required: + - name + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + EventTable: + type: object + description: A Snowflake event table + properties: + name: + type: string + description: Name of the event table + cluster_by: + type: array + items: + type: string + description: Cluster key column(s) or expression + data_retention_time_in_days: + type: integer + description: number of days to retain the old version of deleted/updated data + max_data_extension_time_in_days: + type: integer + description: Maximum number of days to extend data retention beyond the retention period to prevent a stream becoming stale. + change_tracking: + type: boolean + description: True if change tracking is enabled, allowing streams and CHANGES to be used on the entity. + default_ddl_collation: + type: string + description: Collation that is used for all the new columns created by the DDL statements (if not specified) + comment: + type: string + description: user comment associated to an object in the dictionary + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the event table was created. + database_name: + type: string + readOnly: true + description: Database in which the event table is stored + schema_name: + type: string + readOnly: true + description: Schema in which the event table is stored + owner: + type: string + readOnly: true + description: Role that owns the event table + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the event table + rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the table. + bytes: + type: integer + format: int64 + readOnly: true + description: Number of bytes that will be scanned if the entire table is scanned in a query.Note that this number may be different than the number of actual physical bytes stored on-disk for the table + automatic_clustering: + type: boolean + readOnly: true + description: If Automatic Clustering is enabled for your account, specifies whether it is explicitly enabled or disabled for the table. + search_optimization: + type: boolean + readOnly: true + description: If ON, the table has the search optimization service enabled + search_optimization_progress: + type: integer + format: int64 + readOnly: true + description: Percentage of the table that has been optimized for search + search_optimization_bytes: + type: integer + format: int64 + readOnly: true + description: Number of additional bytes of storage that the search optimization service consumes for this table + columns: + type: array + items: + $ref: '#/components/schemas/EventTableColumn' + readOnly: true + required: + - name + EventTableColumn: + type: object + properties: + name: + type: string + description: Column name + datatype: + type: string + description: The data type for the column + nullable: + type: boolean + description: Specifies that the column does allow NULL values or not + default: + type: string + description: Specifies whether a default value is automatically inserted in the column if a value is not explicitly specified via an INSERT or CREATE TABLE AS SELECT statement + primary_key: + type: boolean + description: A primary key is the column or columns that contain values that uniquely identify each row in a table + unique_key: + type: boolean + description: Unique keys are columns in a table that uniquely identify items in the rows. This sounds a lot like a primary key, but the main difference is that unique keys can have NULL values. + check: + type: string + description: '' + expression: + type: string + description: '' + comment: + type: string + description: Specifies a comment for the column + RefreshIcebergTableRequest: + type: object + description: Request model for refreshing iceberg table + properties: + metadata_file_relative_path: + type: string + description: Specifies a metadata file path for a table created from Iceberg files in object storage. + ConvertToManagedIcebergTableRequest: + type: object + description: Request model for convert to managed iceberg table + properties: + base_location: + type: string + description: The path to a directory where Snowflake can write data and metadata files for the table. + storage_serialization_policy: + type: string + description: Specifies the storage serialization policy for the table. + enum: + - COMPATIBLE + - OPTIMIZED + IcebergTable: + type: object + description: A Snowflake iceberg table + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the iceberg table + comment: + type: string + description: user comment associated to an object in the dictionary + change_tracking: + type: boolean + description: True if change tracking is enabled, allowing streams and CHANGES to be used on the entity. + max_data_extension_time_in_days: + type: integer + description: Maximum number of days to extend data retention beyond the retention period to prevent a stream becoming stale. + external_volume: + type: string + description: Name of an external volume that will be used for persisted Iceberg metadata and data files. + data_retention_time_in_days: + type: integer + description: number of days to retain the old version of deleted/updated data + catalog_sync: + type: string + description: Name of the catalog integration to sync this table + catalog: + type: string + description: Name of the catalog integration to use for iceberg tables + storage_serialization_policy: + type: string + description: Storage serialization policy used for managed Iceberg table. This include encodings and compressions + enum: + - COMPATIBLE + - OPTIMIZED + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the iceberg table was created. + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the iceberg table is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the iceberg table is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the iceberg table + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the iceberg table + iceberg_table_type: + type: string + readOnly: true + description: Type of Iceberg table. UNMANAGED if the table is not managed by Snowflake. NOT ICEBERG otherwise. + catalog_table_name: + type: string + description: Name of the table as recognized by the catalog. + catalog_namespace: + type: string + description: Catalog namespace for the table. The namespace defined when the table was created. Otherwise, the default namespace associated with the catalog integration used by the table. If you’re syncing the table to Snowflake Open Catalog, the default is null. + can_write_metadata: + type: string + readOnly: true + description: Signifies whether Snowflake can write metadata to the location specified by the file_path. + cluster_by: + type: array + items: + type: string + description: Specifies one or more columns or column expressions in the table as the clustering key. + columns: + type: array + items: + $ref: '#/components/schemas/IcebergTableColumn' + base_location: + type: string + description: The path to a directory where Snowflake can write data and metadata files for the table. + replace_invalid_characters: + type: boolean + description: Specifies whether to replace invalid characters in the column names + auto_refresh: + readOnly: true + type: boolean + description: Specifies whether to automatically refresh the table metadata + metadata_file_path: + type: string + description: Specifies the relative path of the Iceberg metadata file to use for column definitions. + constraints: + type: array + items: + $ref: '#/components/schemas/Constraint' + required: + - name + IcebergTableAsSelect: + type: object + description: Create iceberg table as select + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + columns: + type: array + items: + $ref: '#/components/schemas/IcebergTableColumn' + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the table as the clustering key + items: + type: string + base_location: + type: string + description: Specifies the path to a directory where Snowflake can write data and metadata files for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + IcebergTableLike: + type: object + description: Create iceberg table as select + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the table as the clustering key + items: + type: string + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + base_location: + type: string + description: Specifies the path to a directory where Snowflake can write data and metadata files for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + IcebergTableClone: + type: object + description: Clone iceberg table + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + point_of_time: + $ref: '#/components/schemas/PointOfTime' + required: + - name + IcebergTableFromAWSGlueCatalog: + type: object + description: Create iceberg table from AWS Glue catalog + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + catalog_table_name: + type: string + description: Specifies the table name as recognized by the AWS Glue Data Catalog. + catalog_namespace: + type: string + description: Specifies the catalog namespace for the table. + replace_invalid_characters: + type: boolean + description: Specifies whether to replace invalid characters in the column names + auto_refresh: + type: boolean + description: Specifies whether to automatically refresh the table metadata + catalog: + type: string + description: Specifies the name of the catalog integration to use for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + - catalog_table_name + IcebergTableFromIcebergFiles: + type: object + description: Create iceberg table from Iceberg files + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + replace_invalid_characters: + type: boolean + description: Specifies whether to replace invalid characters in the column names + metadata_file_path: + type: string + description: Specifies the relative path of the Iceberg metadata file to use for column definitions. + catalog: + type: string + description: Specifies the name of the catalog integration to use for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + - metadata_file_path + IcebergTableFromDelta: + type: object + description: Create iceberg table from Delta + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + replace_invalid_characters: + type: boolean + description: Specifies whether to replace invalid characters in the column names + base_location: + type: string + description: Specifies a relative path from the table’s EXTERNAL_VOLUME location to a directory where Snowflake can access your Delta table files. + catalog: + type: string + description: Specifies the name of the catalog integration to use for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + - base_location + IcebergTableFromIcebergRest: + type: object + description: Creates or replaces an Apache Iceberg™ table in the current/specified schema for an Iceberg REST catalog. + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + external_volume: + type: string + description: Specifies the name of the external volume to use for the table + catalog_table_name: + type: string + description: Specifies the table name as recognized by the AWS Glue Data Catalog. + catalog_namespace: + type: string + description: Specifies the catalog namespace for the table. + replace_invalid_characters: + type: boolean + description: Specifies whether to replace invalid characters in the column names + auto_refresh: + type: boolean + description: Specifies whether to automatically refresh the table metadata + catalog: + type: string + description: Specifies the name of the catalog integration to use for the table + comment: + type: string + description: Specifies a comment for the table + required: + - name + - catalog_table_name + IcebergTableColumn: + type: object + description: A column in the snowflake catalog iceberg table + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Column name + datatype: + type: string + description: The data type for the column + comment: + type: string + description: Specifies a comment for the column + nullable: + type: boolean + description: Argument null return acceptance criteria + default_value: + type: string + description: Default value for the column + required: + - name + - datatype + Constraint: + type: object + description: Constraints define integrity and consistency rules for data stored in tables. + properties: + name: + type: string + description: Name of the Constraint + column_names: + type: array + items: + type: string + description: Column name for the constraint + constraint_type: + type: string + description: Type of the constraint + discriminator: + propertyName: constraint_type + mapping: + PRIMARY KEY: PrimaryKey + FOREIGN KEY: ForeignKey + UNIQUE: UniqueKey + PrimaryKey: + type: object + description: A primary key is the column or columns that contain values that uniquely identify each row in a table. + properties: + name: + type: string + description: Name of the Constraint + column_names: + type: array + items: + type: string + description: Column name for the constraint + constraint_type: + type: string + description: Type of the constraint + discriminator: + propertyName: constraint_type + mapping: + PRIMARY KEY: PrimaryKey + FOREIGN KEY: ForeignKey + UNIQUE: UniqueKey + UniqueKey: + type: object + description: Unique keys are columns in a table that uniquely identify items in the rows. This sounds a lot like a primary key, but the main difference is that unique keys can have NULL values. + properties: + name: + type: string + description: Name of the Constraint + column_names: + type: array + items: + type: string + description: Column name for the constraint + constraint_type: + type: string + description: Type of the constraint + discriminator: + propertyName: constraint_type + mapping: + PRIMARY KEY: PrimaryKey + FOREIGN KEY: ForeignKey + UNIQUE: UniqueKey + ForeignKey: + type: object + description: Foreign keys link data in one table to the data in another table. + properties: + referenced_table_name: + type: string + referenced_column_names: + type: array + items: + type: string + name: + type: string + description: Name of the Constraint + column_names: + type: array + items: + type: string + description: Column name for the constraint + constraint_type: + type: string + description: Type of the constraint + required: + - referenced_table_name + discriminator: + propertyName: constraint_type + mapping: + PRIMARY KEY: PrimaryKey + FOREIGN KEY: ForeignKey + UNIQUE: UniqueKey + Stream: + type: object + description: A Snowflake stream + properties: + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the stream was created. + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the stream + stream_source: + $ref: '#/components/schemas/StreamSource' + description: Source for the stream + comment: + type: string + description: user comment associated to an object in the dictionary + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Database in which the stream is stored + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Schema in which the stream is stored + owner: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Role that owns the stream + table_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: Table name whose changes are tracked by the stream + stale: + type: boolean + readOnly: true + description: Specifies whether the stream is stale or not + mode: + type: string + readOnly: true + description: 'Mode of the stream. Possible values include: APPEND_ONLY, INSERT_ONLY. For streams on tables, the column displays DEFAULT.' + stale_after: + type: string + format: date-time + readOnly: true + description: 'Timestamp when the stream became stale or may become stale if not consumed. ' + invalid_reason: + type: string + readOnly: true + description: Reason why the stream cannot be queried successfully. This column supports future functionality. Currently, the only value returned is N/A. + owner_role_type: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: The type of role that owns the stream + type: + type: string + readOnly: true + description: Type of the stream; currently DELTA only. + required: + - name + - stream_source + StreamSource: + type: object + properties: + src_type: + type: string + description: 'Type of the source. Possible values include: stream, table, view' + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the source whose changes are tracked by the stream + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name to which stream source type belongs. If not provided, database name provided in the path param will be used. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used. + required: + - src_type + - name + discriminator: + propertyName: src_type + mapping: + table: StreamSourceTable + external_table: StreamSourceExternalTable + view: StreamSourceView + stage: StreamSourceStage + StreamSourceTable: + type: object + properties: + append_only: + type: boolean + description: Whether this stream is an append only stream or not + show_initial_rows: + type: boolean + description: Whether this stream show initial rows on first consumption + point_of_time: + $ref: '#/components/schemas/PointOfTime_stream' + description: Point of time for the stream + src_type: + type: string + description: 'Type of the source. Possible values include: stream, table, view' + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the source whose changes are tracked by the stream + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name to which stream source type belongs. If not provided, database name provided in the path param will be used. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used. + required: + - src_type + - name + discriminator: + propertyName: src_type + mapping: + table: StreamSourceTable + external_table: StreamSourceExternalTable + view: StreamSourceView + stage: StreamSourceStage + PointOfTimeStream: + type: object + properties: + stream: + type: string + description: Creates the new stream at the same offset as the specified stream. + example: MY_STREAM + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement, stream' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - stream + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + stream: PointOfTimeStream + StreamSourceExternalTable: + type: object + properties: + insert_only: + type: boolean + description: Whether this stream is an insert only stream or not + point_of_time: + $ref: '#/components/schemas/PointOfTime_stream' + description: Point of time for the stream + src_type: + type: string + description: 'Type of the source. Possible values include: stream, table, view' + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the source whose changes are tracked by the stream + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name to which stream source type belongs. If not provided, database name provided in the path param will be used. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used. + required: + - src_type + - name + discriminator: + propertyName: src_type + mapping: + table: StreamSourceTable + external_table: StreamSourceExternalTable + view: StreamSourceView + stage: StreamSourceStage + StreamSourceView: + type: object + properties: + append_only: + type: boolean + description: Whether this stream is an append only stream or not + show_initial_rows: + type: boolean + description: Whether this stream show initial rows on first consumption + point_of_time: + $ref: '#/components/schemas/PointOfTime_stream' + description: Point of time for the stream + base_tables: + type: array + items: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + readOnly: true + description: List of base tables for the stream + src_type: + type: string + description: 'Type of the source. Possible values include: stream, table, view' + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the source whose changes are tracked by the stream + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name to which stream source type belongs. If not provided, database name provided in the path param will be used. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used. + required: + - src_type + - name + discriminator: + propertyName: src_type + mapping: + table: StreamSourceTable + external_table: StreamSourceExternalTable + view: StreamSourceView + stage: StreamSourceStage + StreamSourceStage: + type: object + properties: + src_type: + type: string + description: 'Type of the source. Possible values include: stream, table, view' + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the source whose changes are tracked by the stream + database_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Database name to which stream source type belongs. If not provided, database name provided in the path param will be used. + schema_name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used. + required: + - src_type + - name + discriminator: + propertyName: src_type + mapping: + table: StreamSourceTable + external_table: StreamSourceExternalTable + view: StreamSourceView + stage: StreamSourceStage + StreamClone: + type: object + properties: + name: + type: string + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + description: Name of the stream + comment: + type: string + description: user comment associated to an object in the dictionary + required: + - name + PointOfTime_stream: + type: object + properties: + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement, stream' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + stream: PointOfTimeStream + PointOfTimeTimestamp_stream: + type: object + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)). + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement, stream' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - timestamp + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + stream: PointOfTimeStream + PointOfTimeOffset_stream: + type: object + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement, stream' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - offset + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + stream: PointOfTimeStream + PointOfTimeStatement_stream: + type: object + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + type: string + description: 'Type of the point of time. Possible values include: timestamp, offset, statement, stream' + example: timestamp + reference: + type: string + enum: + - at + - before + x-enum-varnames: + - AT + - BEFORE + description: Relation to the point of time. Currently, the API supports `at` and `before` + example: at + required: + - statement + - point_of_time_type + - reference + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + stream: PointOfTimeStream + Table: + type: object + description: A Snowflake table + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + - TEMPORARY + - '' + - transient + - temporary + x-enum-varnames: + - PERMANENT + - TRANSIENT + - TEMPORARY + - DEPRECATED_PERMANENT + - DEPRECATED_TRANSIENT + - DEPRECATED_TEMPORARY + default: PERMANENT + description: Table type - permanent, transient, or temporary + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the table as the clustering key + items: + type: string + enable_schema_evolution: + type: boolean + description: Table has schema evolution enabled or disabled + change_tracking: + type: boolean + description: Change tracking is enabled or disabled + data_retention_time_in_days: + type: integer + description: Specifies the retention period for the table so that Time Travel actions SELECT, CLONE, UNDROP can be performed on historical data in the table + max_data_extension_time_in_days: + type: integer + description: Specifies the retention period for the table so that Time Travel actions SELECT, CLONE, UNDROP can be performed on historical data in the table + default_ddl_collation: + type: string + description: Specifies a default collation specification for the columns in the table, including columns added to the table in the future + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + constraints: + type: array + items: + $ref: '#/components/schemas/Constraint' + comment: + type: string + description: Comment for the table + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the table was created. + database_name: + type: string + readOnly: true + description: Database in which the table is stored + schema_name: + type: string + readOnly: true + description: Schema in which the table is stored + rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the table. Returns NULL for external tables. + bytes: + type: integer + format: int64 + readOnly: true + description: Number of bytes that will be scanned if the entire table is scanned in a query. Note that this number may be different than the number of actual physical bytes stored on-disk for the table + owner: + type: string + readOnly: true + description: Role that owns the table + dropped_on: + type: string + format: date-time + readOnly: true + description: Date and time when the table was dropped + automatic_clustering: + type: boolean + readOnly: true + description: If Automatic Clustering is enabled for your account, specifies whether it is explicitly enabled or disabled for the table. + search_optimization: + type: boolean + readOnly: true + description: If ON, the table has the search optimization service enabled + search_optimization_progress: + type: integer + format: int64 + readOnly: true + description: Percentage of the table that has been optimized for search. + search_optimization_bytes: + type: integer + format: int64 + readOnly: true + description: Number of additional bytes of storage that the search optimization service consumes for this table + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the object. + budget: + type: string + readOnly: true + description: Name of the budget if the object is monitored by a budget + table_type: + type: string + enum: + - NORMAL + - DYNAMIC + - EXTERNAL + - EVENT + - HYBRID + - ICEBERG + - IMMUTABLE + readOnly: true + description: Type of the table + required: + - name + TableColumn: + type: object + description: A column in the table + properties: + name: + type: string + description: Column name + datatype: + type: string + description: The data type for the column + nullable: + type: boolean + default: true + description: Specifies that the column does allow NULL values or not. + collate: + type: string + description: Specifies the collation to use for column operations such as string comparison + default: + type: string + description: Specifies whether a default value is automatically inserted in the column if a value is not explicitly specified via an INSERT or CREATE TABLE AS SELECT statement + autoincrement: + type: boolean + autoincrement_start: + type: integer + description: The default value for the column starts with the specified number + autoincrement_increment: + type: integer + description: Each successive value for the column automatically increments by the specified amount + constraints: + type: array + items: + $ref: '#/components/schemas/Constraint' + comment: + type: string + description: Specifies a comment for the column + required: + - name + - datatype + TableClone: + type: object + description: Clone table + properties: + point_of_time: + $ref: '#/components/schemas/PointOfTime' + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + kind: + type: string + enum: + - PERMANENT + - TRANSIENT + - TEMPORARY + - '' + - transient + - temporary + x-enum-varnames: + - PERMANENT + - TRANSIENT + - TEMPORARY + - DEPRECATED_PERMANENT + - DEPRECATED_TRANSIENT + - DEPRECATED_TEMPORARY + default: PERMANENT + description: Table type - permanent, transient, or temporary + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the table as the clustering key + items: + type: string + enable_schema_evolution: + type: boolean + description: Table has schema evolution enabled or disabled + change_tracking: + type: boolean + description: Change tracking is enabled or disabled + data_retention_time_in_days: + type: integer + description: Specifies the retention period for the table so that Time Travel actions SELECT, CLONE, UNDROP can be performed on historical data in the table + max_data_extension_time_in_days: + type: integer + description: Specifies the retention period for the table so that Time Travel actions SELECT, CLONE, UNDROP can be performed on historical data in the table + default_ddl_collation: + type: string + description: Specifies a default collation specification for the columns in the table, including columns added to the table in the future + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + constraints: + type: array + items: + $ref: '#/components/schemas/Constraint' + comment: + type: string + description: Comment for the table + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the table was created. + database_name: + type: string + readOnly: true + description: Database in which the table is stored + schema_name: + type: string + readOnly: true + description: Schema in which the table is stored + rows: + type: integer + format: int64 + readOnly: true + description: Number of rows in the table. Returns NULL for external tables. + bytes: + type: integer + format: int64 + readOnly: true + description: Number of bytes that will be scanned if the entire table is scanned in a query. Note that this number may be different than the number of actual physical bytes stored on-disk for the table + owner: + type: string + readOnly: true + description: Role that owns the table + dropped_on: + type: string + format: date-time + readOnly: true + description: Date and time when the table was dropped + automatic_clustering: + type: boolean + readOnly: true + description: If Automatic Clustering is enabled for your account, specifies whether it is explicitly enabled or disabled for the table. + search_optimization: + type: boolean + readOnly: true + description: If ON, the table has the search optimization service enabled + search_optimization_progress: + type: integer + format: int64 + readOnly: true + description: Percentage of the table that has been optimized for search. + search_optimization_bytes: + type: integer + format: int64 + readOnly: true + description: Number of additional bytes of storage that the search optimization service consumes for this table + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the object. + budget: + type: string + readOnly: true + description: Name of the budget if the object is monitored by a budget + table_type: + type: string + enum: + - NORMAL + - DYNAMIC + - EXTERNAL + - EVENT + - HYBRID + - ICEBERG + - IMMUTABLE + readOnly: true + description: Type of the table + required: + - name + TableAsSelect: + type: object + description: Create table as select + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + cluster_by: + type: array + description: Specifies one or more columns or column expressions in the table as the clustering key + items: + type: string + TableUsingTemplate: + type: object + description: Create table using template + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + TableLike: + type: object + description: Create table like an existing table + properties: + name: + type: string + description: Specifies the name for the table, must be unique for the schema in which the table is created + ForeignKey_table: + type: object + description: Foreign keys link data in one table to the data in another table. + properties: + referenced_table_name: + type: string + referenced_column_names: + type: array + items: + type: string + name: + type: string + description: Name of the Constraint + column_names: + type: array + items: + type: string + description: Column name for the constraint + constraint_type: + type: string + description: Type of the constraint + required: + - referenced_table_name + - referenced_column_names + discriminator: + propertyName: constraint_type + mapping: + PRIMARY KEY: PrimaryKey + FOREIGN KEY: ForeignKey + UNIQUE: UniqueKey + View: + type: object + description: A Snowflake view + properties: + name: + type: string + description: Name of the view + secure: + type: boolean + description: Whether or not this view is secure + kind: + type: string + enum: + - PERMANENT + - TEMPORARY + description: Kind of the view, permanent (default) or temporary + recursive: + type: boolean + description: Whether or not this view can refer to itself using recursive syntax withot requiring a CTE (common table expression) + columns: + type: array + items: + $ref: '#/components/schemas/ViewColumn' + description: The columns of the view + comment: + type: string + description: user comment associated to an object in the dictionary + query: + type: string + description: Query used to create the view + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the view was created. + database_name: + type: string + readOnly: true + description: Database in which the view is stored + schema_name: + type: string + readOnly: true + description: Schema in which the view is stored + owner: + type: string + readOnly: true + description: Role that owns the view + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the view + required: + - name + - columns + - query + ViewColumn: + type: object + description: A column specifier in the view + properties: + name: + type: string + description: Column name + comment: + type: string + description: Specifies a comment for the column + datatype: + type: string + readOnly: true + description: The data type for the column + required: + - name + ListDynamicTablesResponse: + type: object + properties: + dynamic_tables: + type: array + items: + $ref: '#/components/schemas/DynamicTable' + ListEventTablesResponse: + type: object + properties: + event_tables: + type: array + items: + $ref: '#/components/schemas/EventTable' + ListIcebergTablesResponse: + type: object + properties: + iceberg_tables: + type: array + items: + $ref: '#/components/schemas/IcebergTable' + ListStreamsResponse: + type: object + properties: + streams: + type: array + items: + $ref: '#/components/schemas/Stream' + ListTablesResponse: + type: object + properties: + tables: + type: array + items: + $ref: '#/components/schemas/Table' + ListViewsResponse: + type: object + properties: + views: + type: array + items: + $ref: '#/components/schemas/View' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + dynamic_tables: + id: snowflake.tables.dynamic_tables + name: dynamic_tables + title: Dynamic Tables + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.dynamic_tables + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListDynamicTablesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"dynamic_tables\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + refresh: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:refresh/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:suspend-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + resume_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:resume-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + swap_with: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1dynamic-tables~1{name}:swap-with/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/get' + - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/dynamic_tables/methods/delete' + replace: [] + event_tables: + id: snowflake.tables.event_tables + name: event_tables + title: Event Tables + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.event_tables + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListEventTablesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"event_tables\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1event-tables~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/event_tables/methods/get' + - $ref: '#/components/x-stackQL-resources/event_tables/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/event_tables/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/event_tables/methods/delete' + replace: [] + iceberg_tables: + id: snowflake.tables.iceberg_tables + name: iceberg_tables + title: Iceberg Tables + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.iceberg_tables + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListIcebergTablesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"iceberg_tables\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables/post' + response: + mediaType: application/json + openAPIDocKey: '200' + as_select: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:as-select/post' + response: + mediaType: application/json + openAPIDocKey: '200' + from_aws_glue_catalog: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-aws-glue-catalog/post' + response: + mediaType: application/json + openAPIDocKey: '200' + from_delta: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-delta/post' + response: + mediaType: application/json + openAPIDocKey: '200' + from_iceberg_files: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-iceberg-files/post' + response: + mediaType: application/json + openAPIDocKey: '200' + from_iceberg_rest: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables:from-iceberg-rest/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + resume_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:resume-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:suspend-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + refresh: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:refresh/post' + response: + mediaType: application/json + openAPIDocKey: '200' + convert_to_managed: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:convert-to-managed/post' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_like: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1iceberg-tables~1{name}:create-like/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/get' + - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/iceberg_tables/methods/delete' + replace: [] + streams: + id: snowflake.tables.streams + name: streams + title: Streams + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.streams + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListStreamsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"streams\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1streams~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/streams/methods/get' + - $ref: '#/components/x-stackQL-resources/streams/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/streams/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/streams/methods/delete' + replace: [] + tables: + id: snowflake.tables.tables + name: tables + title: Tables + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.tables + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListTablesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"tables\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables/post' + response: + mediaType: application/json + openAPIDocKey: '200' + as_select: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables:as-select/post' + response: + mediaType: application/json + openAPIDocKey: '200' + using_template: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables:using-template/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + clone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:clone/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_like: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:create-like/post' + response: + mediaType: application/json + openAPIDocKey: '200' + undrop: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:undrop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:suspend-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + resume_recluster: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:resume-recluster/post' + response: + mediaType: application/json + openAPIDocKey: '200' + swap_with: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{name}:swap-with/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tables~1{table_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tables/methods/get' + - $ref: '#/components/x-stackQL-resources/tables/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/tables/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tables/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tables/methods/create_or_alter' + views: + id: snowflake.tables.views + name: views + title: Views + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.views + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListViewsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"views\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/views/methods/get' + - $ref: '#/components/x-stackQL-resources/views/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/views/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/views/methods/delete' + replace: [] +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/task.yaml b/providers/src/snowflake/v00.00.00000/services/task.yaml deleted file mode 100644 index 17e41858..00000000 --- a/providers/src/snowflake/v00.00.00000/services/task.yaml +++ /dev/null @@ -1,1693 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Task API - description: The Snowflake Task API is a REST API that you can use to access, update, - and perform certain actions on task resources in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks: - get: - summary: List tasks - tags: - - task - description: Lists tasks under the database and schema, with show options as - query parameters. - operationId: listTasks - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/rootOnly' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Task' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a task - tags: - - task - description: Create a task, with standard create modifiers as query parameters. - See the Task component definition for what is required to be provided in the - request body. - operationId: createTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - example: - name: name_example - warehouse: REGRESS - schedule: - schedule_type: MINUTES_TYPE - minutes: 10 - predecessors: - - task1 - - task2 - - task3 - comment: test_comment - definition: select 1 - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}: - get: - summary: Fetch a task - tags: - - task - description: Fetch a task using the describe command output. - operationId: fetchTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) task - tags: - - task - description: Create a (or alter an existing) task. Even if the operation is - just an alter, the full property set must be provided. - operationId: createOrAlterTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a task - tags: - - task - description: Delete a task with the task name. If ifExists is used, the operation - will succeed even if the object does not exist. Otherwise, there will be a - failure if the drop is unsuccessful. - operationId: deleteTask - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:execute: - post: - summary: Execute a task object. - tags: - - task - description: Execute a task -- this is equivalent to EXECUTE IMMEDIATE. - operationId: executeTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/asyncExec' - - name: retryLast - in: query - description: Retry the last failed run of the DAG. - schema: - type: boolean - default: false - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:resume: - post: - summary: Resume a suspended task. - tags: - - task - description: Resumes a suspended task object. This is equivalento an ALTER TASK - ... RESUME. - operationId: resumeTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}:suspend: - post: - summary: Suspend a running task. - tags: - - task - description: Suspends a running task. This is equivalent to an ALTER TASK ... - SUSPEND. - operationId: suspendTask - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/dependents: - get: - summary: Fetch the dependent tasks of a task - tags: - - task - description: This operation returns a list of the dependent tasks of the task - with identifier {name}. - operationId: fetchTaskDependents - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - name: recursive - in: query - description: Specifies whether to limit the output to include only direct - child tasks or to include all recursive child tasks. - schema: - type: boolean - default: true - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Task' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/current_graphs: - get: - deprecated: true - summary: Get the graph runs that are executing or scheduled for the task for - the next 8 days. - tags: - - task - description: This function returns details for graph runs that are currently - executing or are next scheduled to run within the next 8 days. - operationId: getCurrentGraphsDeprecated - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: resultLimit - schema: - type: integer - description: Number of results to return, at most. Default is 1000, valid - range is 1 to 10000. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TaskRun' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/current-graphs: - get: - summary: Get the graph runs that are executing or scheduled for the task for - the next 8 days. - tags: - - task - description: This function returns details for graph runs that are currently - executing or are next scheduled to run within the next 8 days. - operationId: getCurrentGraphs - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: resultLimit - schema: - type: integer - description: Number of results to return, at most. Default is 1000, valid - range is 1 to 10000. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TaskRun' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/complete_graphs: - get: - deprecated: true - summary: Get the graph runs that are completed for the task. - tags: - - task - description: This function returns details for graph runs that are completed. - operationId: getCompleteGraphsDeprecated - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: resultLimit - schema: - type: integer - description: Number of results to return, at most. Default is 1000, valid - range is 1 to 10000. - - in: query - name: errorOnly - schema: - type: boolean - description: Whether to only return results for tasks runs that have failed. - Default is false. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TaskRun' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/tasks/{name}/complete-graphs: - get: - summary: Get the graph runs that are completed for the task. - tags: - - task - description: This function returns details for graph runs that are completed. - operationId: getCompleteGraphs - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - in: query - name: resultLimit - schema: - type: integer - description: Number of results to return, at most. Default is 1000, valid - range is 1 to 10000. - - in: query - name: errorOnly - schema: - type: boolean - description: Whether to only return results for tasks runs that have failed. - Default is false. - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TaskRun' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - TaskRun: - type: object - description: A task run executing a standalone task or a DAG of tasks starting - from the root task. - properties: - root_task_name: - type: string - description: The name of the root task in the current task run. - readOnly: true - database_name: - type: string - description: The name of the current database for the task run. - readOnly: true - schema_name: - type: string - description: The name of the current schema for the task run. - readOnly: true - state: - type: string - description: The current state of the task run. - enum: - - SCHEDULED - - EXECUTING - - SUCCEEDED - - FAILED - - CANCELLED - - SKIPPED - readOnly: true - first_error_task_name: - type: string - description: The name of the first task throwing an error in the task run. - readOnly: true - first_error_code: - type: integer - description: The first error code thrown in the task run. - readOnly: true - first_error_message: - type: string - description: The first error message thrown in the task run. - readOnly: true - scheduled_time: - type: string - description: The scheduled time for the task run. - format: date-time - readOnly: true - query_start_time: - type: string - description: The start time for the task run query. - format: date-time - readOnly: true - next_scheduled_time: - type: string - description: The next upcoming time for the task run. - format: date-time - readOnly: true - completed_time: - type: string - description: The time this task run was last completed. - format: date-time - readOnly: true - root_task_id: - type: string - description: The unique task ID for the root task. - readOnly: true - graph_version: - type: integer - description: The current version of the DAG on the task run. - readOnly: true - run_id: - type: integer - description: The unique ID for the current task run. - readOnly: true - example: - root_task_name: root_task - database_name: test_db - schema_name: test_schema - state: SCHEDULED - first_error_task_name: test_task - first_error_code: 0 - first_error_message: ERROR - scheduled_time: '2024-06-18T01:01:01.111111' - query_start_time: '2024-06-18T01:01:01.111111' - next_scheduled_time: '2024-06-18T01:01:01.111111' - completed_time: '2024-06-18T01:01:01.111111' - root_task_id: '0' - graph_version: 0 - run_id: 0 - required: - - root_task_name - - database_name - - schema_name - - state - - scheduled_time - - next_scheduled_time - - root_task_id - - graph_version - - run_id - Task: - type: object - description: A Snowflake task, used to execute SQL code. - properties: - name: - $ref: '#/components/schemas/Identifier' - description: String that specifies the identifier (i.e. name) for the task. - warehouse: - $ref: '#/components/schemas/Identifier' - description: Specifies the virtual warehouse that provides compute resources - for task runs. Omit this parameter to use serverless compute resources - for runs of this task. - schedule: - $ref: '#/components/schemas/TaskSchedule' - description: Specifies the schedule for periodically running the task. - comment: - type: string - description: Specifies a comment for the task. - finalize: - type: string - description: Specifies the name of the root task that the finalizer task - is associated with. - task_auto_retry_attempts: - type: integer - description: Root task settable only. Specifies the number of automatic - task graph retry attempts. Valid range is 0 to 30. When not specified, - no retry would happen. - minimum: 0 - maximum: 30 - config: - type: object - additionalProperties: true - description: Task Config - session_parameters: - type: object - additionalProperties: true - description: Session Parameters for the task at runtime. - definition: - type: string - description: The SQL definition for the task. Any one of single SQL statement, - call to stored procedure, or procedural logic using Snowflake scripting. - predecessors: - type: array - description: Specifies one or more predecessor tasks for the current task - items: - type: string - description: The identifier for the task. - task_relations: - type: string - description: Displays the relationship between the root task and its corresponding - finalizer tasks. - readOnly: true - user_task_managed_initial_warehouse_size: - type: string - description: Specifies the size of the compute resources to provision for - the first run of the task. This parameter only applies to serverless tasks. - target_completion_interval: - $ref: '#/components/schemas/MinutesSchedule' - description: Specifies the desired task completion time. This parameter - only applies to serverless tasks. - serverless_task_min_statement_size: - type: string - description: Specifies the minimum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to - serverless tasks. - serverless_task_max_statement_size: - type: string - description: Specifies the maximum allowed warehouse size for the serverless - task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to - serverless tasks. - user_task_timeout_ms: - type: integer - description: Specifies the time limit on a single run of the task before - it times out (in milliseconds). - suspend_task_after_num_failures: - type: integer - description: Specifies the number of consecutive failed task runs after - which the current task is suspended automatically. - condition: - type: string - description: Specifies a Boolean SQL expression condition; multiple conditions - joined with AND/OR are supported - allow_overlapping_execution: - type: boolean - description: Specifies whether to allow multiple instances of the DAG to - run concurrently. - error_integration: - type: string - description: Specifies the name of the notification integration used to - communicate with Amazon SNS, MS Azure Event Grid, or Google Pub/Sub. - created_on: - type: string - description: The time the task was created on. - format: date-time - readOnly: true - id: - type: string - description: An ID for the current task. - readOnly: true - owner: - type: string - description: The role that owns the task. - readOnly: true - owner_role_type: - type: string - description: The role type of the task owner. - readOnly: true - state: - type: string - description: The state of the task. Must be one of started or suspended. - readOnly: true - enum: - - started - - suspended - last_committed_on: - type: string - description: The time the task was last committed on. - readOnly: true - format: date-time - last_suspended_on: - type: string - description: The time the task was last suspended on. - readOnly: true - format: date-time - database_name: - type: string - description: The name of the parent database for the task. - readOnly: true - schema_name: - type: string - description: The name of the parent schema for the task. - readOnly: true - example: - name: name_example - schedule: - schedule_type: MINUTES_TYPE - minutes: 10 - comment: test_comment - config: - output_dir: /temp/test_directory/ - learning_rate: '0.1' - definition: this task does... - predecessors: - - task1 - - task2 - - task3 - user_task_managed_initial_warehouse_size: SMALL - target_completion_interval: - schedule_type: MINUTES_TYPE - minutes: 5 - serverless_task_min_statement_size: XSMALL - serverless_task_max_statement_size: MEDIUM - user_task_timeout_ms: 10 - suspend_task_after_num_failures: 3 - condition: select 1 - allow_overlapping_execution: false - error_integration: my_notification_int - created_on: '2024-06-18T01:01:01.111111' - id: task_id - owner: TASK_ADMIN - owner_role_type: ADMIN - state: started - last_committed_on: '2024-06-18T01:01:01.111111' - last_suspended_on: '2024-06-18T01:01:01.111111' - database_name: TESTDB - schema_name: TESTSCHEMA - required: - - name - - definition - TaskSchedule: - type: object - description: Specifies the schedule for periodically running the task. - properties: - schedule_type: - description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. - type: string - discriminator: - propertyName: schedule_type - mapping: - CRON_TYPE: CronSchedule - MINUTES_TYPE: MinutesSchedule - CronSchedule: - description: A cron schedule for executing a task at a specified interval. - allOf: - - $ref: '#/components/schemas/TaskSchedule' - properties: - cron_expr: - type: string - description: A cron expression for the task execution. - timezone: - type: string - description: The time zone for the schedule. - example: - cron_expr: '* * * * ? *' - timezone: america/los_angeles - required: - - cron_expr - - timezone - MinutesSchedule: - description: A schedule for executing a task at specified intervals of minutes. - allOf: - - $ref: '#/components/schemas/TaskSchedule' - properties: - minutes: - type: integer - description: The number of minutes between each task run. - example: - minutes: 10 - required: - - minutes - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - tasks: - methods: - list_tasks: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - delete_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - execute_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:execute/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_task: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tasks/methods/list_tasks' - - $ref: '#/components/x-stackQL-resources/tasks/methods/fetch_task' - insert: - - $ref: '#/components/x-stackQL-resources/tasks/methods/create_task' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/tasks/methods/delete_task' - replace: - - $ref: '#/components/x-stackQL-resources/tasks/methods/create_or_alter_task' - id: snowflake.task.tasks - name: tasks - title: Tasks - dependents: - methods: - fetch_task_dependents: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1dependents/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dependents/methods/fetch_task_dependents' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.task.dependents - name: dependents - title: Dependents - current_graphs: - methods: - get_current_graphs_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1current_graphs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - get_current_graphs: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1current-graphs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/current_graphs/methods/get_current_graphs_deprecated' - - $ref: '#/components/x-stackQL-resources/current_graphs/methods/get_current_graphs' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.task.current_graphs - name: current_graphs - title: Current Graphs - complete_graphs: - methods: - get_complete_graphs_deprecated: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1complete_graphs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - get_complete_graphs: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1tasks~1{name}~1complete-graphs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/complete_graphs/methods/get_complete_graphs_deprecated' - - $ref: '#/components/x-stackQL-resources/complete_graphs/methods/get_complete_graphs' - insert: [] - update: [] - delete: [] - replace: [] - id: snowflake.task.complete_graphs - name: complete_graphs - title: Complete Graphs -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -externalDocs: - description: Streams and Tasks Reference - url: https://docs.snowflake.com/en/sql-reference/commands-stream diff --git a/providers/src/snowflake/v00.00.00000/services/user-defined-function.yaml b/providers/src/snowflake/v00.00.00000/services/user-defined-function.yaml deleted file mode 100644 index 1f4489b2..00000000 --- a/providers/src/snowflake/v00.00.00000/services/user-defined-function.yaml +++ /dev/null @@ -1,1419 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake User Defined Function API - description: The Snowflake User Defined Function API is a REST API that you can - use to access, update, and perform certain actions on User Defined Function resource - in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions: - post: - summary: Create a UDF - tags: - - user-defined-function - description: Create a UDF - operationId: createUserDefinedFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UserDefinedFunction' - get: - summary: List UDFs - tags: - - user-defined-function - description: List UDFs - operationId: listUserDefinedFunctions - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserDefinedFunction' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions/{nameWithArgs}: - get: - summary: Fetch a UDF - tags: - - user-defined-function - description: Fetch a UDF - operationId: fetchUserDefinedFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDefinedFunction' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a UDF - tags: - - user-defined-function - description: Delete a UDF - operationId: deleteUserDefinedFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/databases/{database_name}/schemas/{schema_name}/user-defined-functions/{nameWithArgs}:rename: - post: - summary: Rename a UDF - tags: - - user-defined-function - description: Rename a UDF - operationId: renameUserDefinedFunction - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/nameWithArgs' - - $ref: '#/components/parameters/ifExists' - - name: targetDatabase - description: Database of the target resource. Defaults to the source's database - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - name: targetSchema - description: Schema of the target resource. Defaults to the source's schema - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - - name: targetName - description: Name of the target resource. - in: query - required: true - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - UserDefinedFunction: - type: object - description: A snowflake UDF - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: The name of the UDF - is_temporary: - type: boolean - description: Specifies whether the UDF is temporary or not - is_aggregate: - type: boolean - description: Specifies whether the UDF is an aggregate function. Applicable - only for Python language type - is_memoizable: - type: boolean - description: Indicates whether the function is memoizable. Applicable only - for Python language type. - is_table_function: - type: boolean - readOnly: true - description: True if the UDF is a table function; false otherwise. - valid_for_clustering: - type: boolean - readOnly: true - description: True if the UDF is valid for clustering; false otherwise. - is_secure: - type: boolean - description: Specifies whether the function/procedure is secure or not - arguments: - type: array - items: - $ref: '#/components/schemas/Argument' - description: List of arguments for the function/procedure - return_type: - $ref: '#/components/schemas/ReturnType' - description: Return type of the function/procedure. Should be a SQL data - type or a table - language_config: - $ref: '#/components/schemas/FunctionLanguage' - description: Language that the function/procedure is written in - comment: - type: string - description: Specifies a comment for the function/procedure - body: - type: string - description: Function/procedure definition - created_on: - type: string - format: date-time - readOnly: true - description: The date and time when the function/procedure was created - schema_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The name of the schema in which the function/procedure exists. - database_name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The name of the database in which the function/procedure exists. - min_num_arguments: - type: integer - readOnly: true - description: The minimum number of arguments - max_num_arguments: - type: integer - readOnly: true - description: The maximum number of arguments - owner: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: Role that owns the function/procedure - owner_role_type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - readOnly: true - description: The type of role that owns the function/procedure - is_builtin: - type: boolean - readOnly: true - description: If the function/procedure is built-in or not (user-defined) - required: - - name - - arguments - - return_type - - language_config - Argument: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Argument name - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Argument data type - default_value: - type: string - description: Default value of the argument - required: - - name - - datatype - ReturnType: - type: object - properties: - type: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Type of the return, can be either DATATYPE or TABLE - required: - - type - discriminator: - propertyName: type - mapping: - DATATYPE: ReturnDataType - TABLE: ReturnTable - ReturnDataType: - allOf: - - $ref: '#/components/schemas/ReturnType' - properties: - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Return data type - nullable: - type: boolean - description: Argument null return acceptance criteria - required: - - datatype - ReturnTable: - allOf: - - $ref: '#/components/schemas/ReturnType' - properties: - column_list: - type: array - items: - $ref: '#/components/schemas/ColumnType' - description: List of table columns to return - ColumnType: - type: object - properties: - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Argument name - datatype: - type: string - enum: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - x-enum-varnames: - - ARRAY - - BIGINT - - BINARY - - BOOLEAN - - BYTEINT - - CHAR - - CHARACTER - - DATE - - DATETIME - - DECIMAL - - DOUBLE - - DOUBLE_PRECISION - - FLOAT - - FLOAT4 - - FLOAT8 - - GEOGRAPHY - - GEOMETRY - - INT - - INTEGER - - NUMBER - - NUMERIC - - OBJECT - - REAL - - STRING - - SMALLINT - - TEXT - - TIME - - TIMESTAMP_LTZ - - TIMESTAMP_NTZ - - TIMESTAMP_TZ - - TINYINT - - VARBINARY - - VARCHAR - - VARIANT - - VECTOR - description: Argument data type - required: - - name - - datatype - FunctionLanguage: - type: object - properties: - language: - type: string - description: 'Language that the function/procedure is written in. Possible - values include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL' - called_on_null_input: - type: boolean - description: Decide if the function/procedure can receive null input - is_volatile: - type: boolean - description: " Specifies the behavior of the UDF when returning results.\ - \ This Field is deprecated for Procedure.\n \n If\ - \ true, UDF might return different values for different rows, even for\ - \ the same input. \n This field is deprecated for Procedure.\n\ - \n If false, UDF assumes that the function, when called with\ - \ the same inputs, will always return the same result. \n This\ - \ guarantee is not checked. Specifying IMMUTABLE for a UDF that returns\ - \ different values for the same input will result in undefined behavior.\n\ - \ " - required: - - language - discriminator: - propertyName: language - mapping: - JAVA: JavaFunction - PYTHON: PythonFunction - SCALA: ScalaFunction - JAVASCRIPT: JavaScriptFunction - SQL: SQLFunction - BaseLanguage: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - properties: - packages: - type: array - items: - type: string - description: Packages to include with the function/procedure - imports: - type: array - items: - type: string - description: List of imports - handler: - type: string - description: Fully qualified method name including the package and the class - required: - - packages - - handler - JavaFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - external_access_integrations: - type: array - items: - type: string - description: List of external access integrations attached to this function/procedure - secrets: - type: object - additionalProperties: - type: string - description: Secrets to be used with this function/procedure for external - access - target_path: - type: string - description: Specifies where Snowflake should write the compiled code for - inline procedures - runtime_version: - type: string - description: "Specifies the Java JDK runtime version to use. \n \ - \ The supported versions of Java are 11.x and 17.x (Preview\ - \ support)" - required: - - runtime_version - PythonFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - external_access_integrations: - type: array - items: - type: string - description: List of external access integrations attached to this function/procedure - secrets: - type: object - additionalProperties: - type: string - description: Secrets to be used with this function/procedure for external - access - runtime_version: - type: string - description: "Specifies the Python version to use. The supported versions\ - \ of Python are:\n * 3.8\n \ - \ * 3.9\n * 3.10\n *\ - \ 3.11" - required: - - runtime_version - ScalaFunction: - allOf: - - $ref: '#/components/schemas/BaseLanguage' - properties: - target_path: - type: string - description: Specifies where Snowflake should write the compiled code for - inline function/procedures - runtime_version: - type: string - description: 'Specifies the Scala runtime version to use. The supported - versions of Scala are: 2.12' - required: - - runtime_version - JavaScriptFunction: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - SQLFunction: - allOf: - - $ref: '#/components/schemas/FunctionLanguage' - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - user_defined_functions: - methods: - create_user_defined_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions/post' - response: - mediaType: '' - openAPIDocKey: '200' - list_user_defined_functions: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - fetch_user_defined_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{nameWithArgs}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_user_defined_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{nameWithArgs}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - rename_user_defined_function: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1user-defined-functions~1{nameWithArgs}:rename/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/user_defined_functions/methods/list_user_defined_functions' - - $ref: '#/components/x-stackQL-resources/user_defined_functions/methods/fetch_user_defined_function' - insert: - - $ref: '#/components/x-stackQL-resources/user_defined_functions/methods/create_user_defined_function' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/user_defined_functions/methods/delete_user_defined_function' - replace: [] - id: snowflake.user_defined_function.user_defined_functions - name: user_defined_functions - title: User Defined Functions -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/user.yaml b/providers/src/snowflake/v00.00.00000/services/user.yaml deleted file mode 100644 index ac3b8321..00000000 --- a/providers/src/snowflake/v00.00.00000/services/user.yaml +++ /dev/null @@ -1,1289 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake User API - description: The Snowflake User API is a REST API that you can use to access, update, - and perform certain action on Users in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/users: - post: - summary: Create a user - tags: - - user - description: Create a user according to the parameters given - operationId: createUser - parameters: - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - get: - summary: List users in the system. - tags: - - user - description: Lists the users in the system. - operationId: listUsers - parameters: - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/users/{name}: - get: - parameters: - - $ref: '#/components/parameters/name' - summary: Fetch information about a user - tags: - - user - description: Fetch user information using the result of the DESCRIBE command - operationId: fetchUser - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/User' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - summary: Delete a user - tags: - - user - description: Delete a user with the given name. - operationId: deleteUser - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) user. - description: Create a (or alter an existing) user. Even if the operation is - just an alter, the full property set must be provided. Note that password - is not currently altered by this operation but is supported for a newly-created - object. - operationId: createOrAlterUser - tags: - - user - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/users/{name}/grants: - get: - parameters: - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/showLimit' - summary: List all grants to the user - tags: - - user - description: List all grants to the user - operationId: listGrants - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Grant' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Grant a role to the user - tags: - - user - description: Grant a role to the user - operationId: grant - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/users/{name}/grants:revoke: - post: - summary: Revoke grants from the user - tags: - - user - description: Revoke grants from the user - operationId: revokeGrants - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Grant' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Grant: - type: object - properties: - securable: - $ref: '#/components/schemas/Securable' - description: Securable of the grant - containing_scope: - $ref: '#/components/schemas/ContainingScope' - description: Containing scope of the grant - securable_type: - type: string - description: Type of the securable to be granted. Only ROLE is supported - privileges: - type: array - items: - type: string - description: List of privileges to be granted. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the grant was created - granted_by: - type: string - readOnly: true - description: The role that granted this privilege to this grantee - required: - - securable_type - Securable: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable if applicable. - name: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Name of the securable if applicable. - required: - - name - ContainingScope: - type: object - properties: - database: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Database name of the securable scope if applicable. - schema: - type: string - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - description: Schema name of the securable scope if applicable. - required: - - database - User: - description: Properties of user. - type: object - required: - - name - properties: - name: - type: string - description: User name - example: jackpatel - password: - type: string - format: password - description: Password - login_name: - type: string - description: Login name - display_name: - type: string - description: Display name - first_name: - type: string - description: First name - middle_name: - type: string - description: Middle name - last_name: - type: string - description: Last name - email: - type: string - description: Email address - must_change_password: - type: boolean - description: Does this user need to change their password (e.g., after assigning - a temp password) - disabled: - type: boolean - description: Has this user been disabled from the system - days_to_expiry: - type: integer - description: How many days until this user expires - mins_to_unlock: - type: integer - description: How many minutes until the account is unlocked after multiple - failed logins - default_warehouse: - type: string - description: The default warehouse to use when this user starts a session - default_namespace: - type: string - description: The default namespace to use when this user starts a session - default_role: - type: string - description: The default role to use when this user starts a session - default_secondary_roles: - type: string - description: The default secondary roles of this user to use when starting - a session. Only valid set values are ALL or NONE. Default is ALL after - 2024-07 BCR. - enum: - - ALL - - NONE - default: ALL - mins_to_bypass_mfa: - type: integer - description: How many minutes until MFA is required again - rsa_public_key: - type: string - description: RSA public key of the user - rsa_public_key_2: - type: string - description: Second RSA public key of the user - comment: - type: string - description: Comment about the user. - example: A distinguished user - type: - type: string - description: Indicates the type of user (PERSON | SERVICE | LEGACY_SERVICE) - enable_unredacted_query_syntax_error: - type: boolean - description: Whether to show unredacted query syntax errors in the query - history. - network_policy: - type: string - description: Specifies an existing network policy is active for the user. - Otherwise, use account default. - created_on: - type: string - readOnly: true - format: date-time - last_successful_login: - type: string - readOnly: true - format: date-time - expires_at: - type: string - readOnly: true - format: date-time - locked_until: - type: string - readOnly: true - format: date-time - has_password: - type: boolean - readOnly: true - has_rsa_public_key: - type: boolean - readOnly: true - rsa_public_key_fp: - type: string - readOnly: true - description: Fingerprint of the user's RSA public key - rsa_public_key_2_fp: - type: string - readOnly: true - description: Fingerprint of the user's second RSA public key - ext_authn_duo: - type: boolean - readOnly: true - ext_authn_uid: - type: string - readOnly: true - owner: - type: string - readOnly: true - snowflake_lock: - type: boolean - readOnly: true - default: false - description: Whether the user, account, or organization is locked by Snowflake. - snowflake_support: - type: boolean - readOnly: true - default: false - description: Whether Snowflake Support is allowed to use the user or account - mins_to_bypass_network_policy: - type: integer - readOnly: true - description: Temporary bypass network policy on the user for a specified - number of minutes - password_last_set: - type: string - readOnly: true - format: date-time - custom_landing_page_url: - type: string - readOnly: true - custom_landing_page_url_flush_next_ui_load: - type: boolean - readOnly: true - default: false - description: Whether or not to flush the custom landing page of the user - on next UI load - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - users: - methods: - create_user: - operation: - $ref: '#/paths/~1api~1v2~1users/post' - response: - mediaType: '' - openAPIDocKey: '200' - list_users: - operation: - $ref: '#/paths/~1api~1v2~1users/get' - response: - mediaType: application/json - openAPIDocKey: '200' - fetch_user: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_user: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - create_or_alter_user: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/users/methods/list_users' - - $ref: '#/components/x-stackQL-resources/users/methods/fetch_user' - insert: - - $ref: '#/components/x-stackQL-resources/users/methods/create_user' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/users/methods/delete_user' - replace: - - $ref: '#/components/x-stackQL-resources/users/methods/create_or_alter_user' - id: snowflake.user.users - name: users - title: Users - grants: - methods: - list_grants: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}~1grants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - grant: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}~1grants/post' - response: - mediaType: '' - openAPIDocKey: '200' - revoke_grants: - operation: - $ref: '#/paths/~1api~1v2~1users~1{name}~1grants:revoke/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/grants/methods/list_grants' - insert: - - $ref: '#/components/x-stackQL-resources/grants/methods/grant' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/grants/methods/revoke_grants' - replace: [] - id: snowflake.user.grants - name: grants - title: Grants -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/view.yaml b/providers/src/snowflake/v00.00.00000/services/view.yaml deleted file mode 100644 index cc1598a3..00000000 --- a/providers/src/snowflake/v00.00.00000/services/view.yaml +++ /dev/null @@ -1,937 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake View API - description: The Snowflake View API is a REST API that you can use to access, update, - and perform certain actions on View resource in a Snowflake database. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/databases/{database_name}/schemas/{schema_name}/views: - get: - summary: List views - tags: - - view - description: List views - operationId: listViews - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/like' - - $ref: '#/components/parameters/startsWith' - - $ref: '#/components/parameters/showLimit' - - $ref: '#/components/parameters/fromName' - - name: deep - description: Optionally includes dependency information of the view. - in: query - required: false - schema: - type: boolean - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/View' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - post: - summary: Create a view - tags: - - view - description: Create a view - operationId: createView - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/createMode' - - $ref: '#/components/parameters/copyGrants' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/View' - /api/v2/databases/{database_name}/schemas/{schema_name}/views/{name}: - get: - summary: Fetch a view - tags: - - view - description: Fetch a view - operationId: fetchView - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/View' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Delete a view - tags: - - view - description: Delete a view - operationId: deleteView - parameters: - - $ref: '#/components/parameters/database_name' - - $ref: '#/components/parameters/schema_name' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/ifExists' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - View: - type: object - description: A Snowflake view - properties: - name: - type: string - description: Name of the view - secure: - type: boolean - description: Whether or not this view is secure - kind: - type: string - enum: - - PERMANENT - - TEMPORARY - description: Kind of the view, permanent (default) or temporary - recursive: - type: boolean - description: Whether or not this view can refer to itself using recursive - syntax withot requiring a CTE (common table expression) - columns: - type: array - items: - $ref: '#/components/schemas/ViewColumn' - description: The columns of the view - comment: - type: string - description: user comment associated to an object in the dictionary - query: - type: string - description: Query used to create the view - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the view was created. - database_name: - type: string - readOnly: true - description: Database in which the view is stored - schema_name: - type: string - readOnly: true - description: Schema in which the view is stored - owner: - type: string - readOnly: true - description: Role that owns the view - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the view - required: - - name - - columns - - query - ViewColumn: - type: object - description: A column specifier in the view - properties: - name: - type: string - description: Column name - comment: - type: string - description: Specifies a comment for the column - datatype: - type: string - readOnly: true - description: The data type for the column - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - views: - methods: - list_views: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_view: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_view: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_view: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database_name}~1schemas~1{schema_name}~1views~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/views/methods/list_views' - - $ref: '#/components/x-stackQL-resources/views/methods/fetch_view' - insert: - - $ref: '#/components/x-stackQL-resources/views/methods/create_view' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/views/methods/delete_view' - replace: [] - id: snowflake.view.views - name: views - title: Views -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/warehouse.yaml b/providers/src/snowflake/v00.00.00000/services/warehouse.yaml deleted file mode 100644 index 98195824..00000000 --- a/providers/src/snowflake/v00.00.00000/services/warehouse.yaml +++ /dev/null @@ -1,1429 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{endpoint}.snowflakecomputing.com - description: Multi-tenant Snowflake endpoint - variables: - endpoint: - default: orgid-acctid - description: Organization and Account Name -info: - version: 0.0.1 - title: Snowflake Warehouse API - description: The Snowflake Warehouse API is a REST API that you can use to access, - customize and manage virtual warehouse in a Snowflake account. - contact: - name: Snowflake, Inc. - url: https://snowflake.com - email: support@snowflake.com -paths: - /api/v2/warehouses: - post: - summary: Create or replace warehouse - description: Create a virtual warehouse. Equivalent to CREATE WAREHOUSE in SQL. - operationId: createWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/createMode' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Warehouse' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - get: - summary: List warehouse - description: Show a list of warehouse filtered by pattern. Equivalent to SHOW - WAREHOUSE in SQL. - operationId: listWarehouses - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/like' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Warehouse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}: - get: - summary: Describe warehouse - description: Describes the warehouse, show information of the chosen warehouse. - Equivalent to DESCRIBE WAREHOUSE in SQL. - operationId: fetchWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - description: successful - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - Link: - $ref: '#/components/headers/Link' - content: - application/json: - schema: - $ref: '#/components/schemas/Warehouse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - delete: - summary: Drop warehouse - description: Removes the specified virtual warehouse from the system. Equivalent - to DROP WAREHOUSE in SQL. - operationId: deleteWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - put: - summary: Create a (or alter an existing) warehouse. - description: Create a (or alter an existing) warehouse. Even if the operation - is just an alter, the full property set must be provided. - operationId: createOrAlterWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Warehouse' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:resume: - post: - summary: Resume warehouse - description: "Bring current warehouse to a usable \u2018Running\u2019 state\ - \ by provisioning compute resources if current warehouse is suspended." - operationId: resumeWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:suspend: - post: - summary: Suspend warehouse - description: "Remove all compute nodes from a warehouse and put the warehouse\ - \ into a \u2018Suspended\u2019 state if current warehouse is not suspended." - operationId: suspendWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:rename: - post: - summary: Update and rename warehouse - description: Specifies a new identifier for the warehouse; must be unique for - current account. - operationId: renameWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Warehouse' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:abort: - post: - summary: Abort all queries - description: Aborts all the queries currently running or queued on the warehouse. - operationId: abortAllQueriesOnWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:use: - post: - summary: Use current warehouse for session - description: '[Deprecated] Specifies the active/current warehouse for the session.' - operationId: useWarehouse - tags: - - warehouse - deprecated: true - parameters: - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:enable: - post: - summary: enable adaptive warehouse - description: "Enable an adaptive warehouse and put the warehouse into a \u2018\ - enabled\u2019 state, if the warehouse is not enabled." - operationId: enableWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' - /api/v2/warehouses/{name}:disable: - post: - summary: disable adaptive warehouse - description: "Disable an adaptive warehouse and put the warehouse into a \u2018\ - disabled\u2019 state, if the warehouse is not disabled." - operationId: disableWarehouse - tags: - - warehouse - parameters: - - $ref: '#/components/parameters/ifExists' - - $ref: '#/components/parameters/name' - responses: - '200': - $ref: '#/components/responses/200SuccessResponse' - '202': - $ref: '#/components/responses/202SuccessAcceptedResponse' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - '403': - $ref: '#/components/responses/403Forbidden' - '404': - $ref: '#/components/responses/404NotFound' - '405': - $ref: '#/components/responses/405MethodNotAllowed' - '408': - $ref: '#/components/responses/408RequestTimeout' - '409': - $ref: '#/components/responses/409Conflict' - '410': - $ref: '#/components/responses/410Gone' - '429': - $ref: '#/components/responses/429LimitExceeded' - '500': - $ref: '#/components/responses/500InternalServerError' - '503': - $ref: '#/components/responses/503ServiceUnavailable' - '504': - $ref: '#/components/responses/504GatewayTimeout' -components: - schemas: - Warehouse: - type: object - description: A Snowflake virtual warehouse - properties: - name: - $ref: '#/components/schemas/Identifier' - description: Name of warehouse - warehouse_type: - type: string - description: 'Type of warehouse, possible types: STANDARD, SNOWPARK-OPTIMIZED' - warehouse_size: - type: string - description: 'Size of warehouse, possible sizes: XSMALL, SMALL, MEDIUM, - LARGE, XLARGE, XXLARGE, XXXLARGE, X4LARGE, X5LARGE, X6LARGE' - wait_for_completion: - type: string - enum: - - true - - false - description: When resizing a warehouse, you can use this parameter to block - the return of the ALTER WAREHOUSE command until the resize has finished - provisioning all its compute resources - max_cluster_count: - type: integer - format: int32 - description: Specifies the maximum number of clusters for a multi-cluster - warehouse - min_cluster_count: - type: integer - format: int32 - description: Specifies the minimum number of clusters for a multi-cluster - warehouse - scaling_policy: - type: string - description: 'Scaling policy of warehouse, possible scaling policies: STANDARD, - ECONOMY' - auto_suspend: - type: integer - format: int32 - description: time in seconds before auto suspend - auto_resume: - type: string - enum: - - true - - false - description: Specifies whether to automatically resume a warehouse when - a SQL statement is submitted to it - initially_suspended: - type: string - enum: - - true - - false - description: Specifies whether the warehouse is created initially in the - Suspended state - resource_monitor: - $ref: '#/components/schemas/Identifier' - description: Specifies the name of a resource monitor that is explicitly - assigned to the warehouse. When a resource monitor is explicitly assigned - to a warehouse, the monitor controls the monthly credits used by the warehouse - comment: - type: string - format: comment - description: Specifies a comment for the warehouse - enable_query_acceleration: - type: string - enum: - - true - - false - description: Specifies whether to enable the query acceleration service - for queries that rely on this warehouse for compute resources - query_acceleration_max_scale_factor: - type: integer - format: int32 - description: Specifies the maximum scale factor for leasing compute resources - for query acceleration. The scale factor is used as a multiplier based - on warehouse size - max_concurrency_level: - type: integer - format: int32 - description: Object parameter that specifies the concurrency level for SQL - statements executed by a warehouse cluster - statement_queued_timeout_in_seconds: - type: integer - format: int32 - description: Object parameter that specifies the time, in seconds, a SQL - statement can be queued on a warehouse before it is canceled by the system - statement_timeout_in_seconds: - type: integer - format: int32 - description: Object parameter that specifies the time, in seconds, after - which a running SQL statement is canceled by the system - type: - type: string - description: '[Deprecated] Type of warehouse, possible types: STANDARD, - SNOWPARK-OPTIMIZED' - deprecated: true - size: - type: string - description: '[Deprecated] names of size: X-Small, Small, Medium, Large, - X-Large, 2X-Large, 3X-Large, 4X-Large, 5X-Large, 6X-Large' - deprecated: true - state: - type: string - readOnly: true - description: 'The state of warehouse, possible states: STARTED, STARTING, - DYNAMIC, SUSPENDED, RESIZING, RESUMING, SUSPENDING' - started_clusters: - type: integer - format: int32 - readOnly: true - description: Number of clusters currently started. - running: - type: integer - format: int32 - readOnly: true - description: Number of SQL statements that are being executed by the warehouse. - queued: - type: integer - format: int32 - readOnly: true - description: Number of SQL statements that are queued for the warehouse. - is_default: - type: boolean - readOnly: true - description: Whether the warehouse is the default for the current user. - is_current: - type: boolean - readOnly: true - description: Whether the warehouse is in use for the session. Only one warehouse - can be in use at a time for a session. To specify or change the warehouse - for a session, use the USE WAREHOUSE command. - available: - type: string - format: Percentage - readOnly: true - description: Percentage of the warehouse compute resources that are provisioned - and available. - provisioning: - type: string - format: Percentage - readOnly: true - description: Percentage of the warehouse compute resources that are in the - process of provisioning. - quiescing: - type: string - format: Percentage - readOnly: true - description: Percentage of the warehouse compute resources that are executing - SQL statements, but will be shut down once the queries complete. - other: - type: string - format: Percentage - readOnly: true - description: Percentage of the warehouse compute resources that are in a - state other than available, provisioning, or quiescing. - created_on: - type: string - format: date-time - readOnly: true - description: Date and time when the warehouse was created. - resumed_on: - type: string - format: date-time - readOnly: true - description: Date and time when the warehouse was last started or restarted. - updated_on: - type: string - format: date-time - readOnly: true - description: Date and time when the warehouse was last updated, which includes - changing any of the properties of the warehouse or changing the state - (STARTED, SUSPENDED, RESIZING) of the warehouse. - owner: - type: string - format: role name - readOnly: true - description: Role that owns the warehouse. - budget: - type: string - readOnly: true - description: Comment representing budget for warehouse. - kind: - type: string - format: warehouse - readOnly: true - deprecated: true - owner_role_type: - type: string - readOnly: true - description: The type of role that owns the object. - warehouse_credit_limit: - type: integer - format: int64 - description: Credit limit that are can be executed by the warehouse. - target_statement_size: - type: string - description: 'Names of size: X-Small, Small, Medium, Large, X-Large, 2X-Large, - 3X-Large, 4X-Large, 5X-Large, 6X-Large' - required: - - name - Identifier: - type: string - description: A Snowflake object identifier. If the identifier contains spaces - or special characters, the entire string must be enclosed in double quotes. - Identifiers enclosed in double quotes are also case-sensitive. - pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ - example: TEST_NAME - ErrorResponse: - type: object - properties: - message: - type: string - description: Error message returned by the server - code: - type: string - description: Error code. - error_code: - type: string - description: Error code, same as `code` above. This property has been deprecated - and will be removed in a future release, but is temporarily supported - for for short-term backward compatibility. - request_id: - type: string - description: Unique request ID. - example: - message: Compilation error! - error_code: '390189' - request_id: 01afef9d-0607-0550-0001-dd270c3902d7 - SuccessResponse: - type: object - description: Schema for all the success responses returned by the server. - properties: - status: - type: string - description: Message returned by the server. - example: - status: Request successfully completed - SuccessAcceptedResponse: - type: object - description: Schema for a request in progress response returned by the server. - properties: - code: - type: string - description: Message code returned by the server. - message: - type: string - description: Message returned by the server - resultHandler: - type: string - description: Opaque result ID used for checking for request completion through - one or more subsequent completion check operations. - example: - code: '392604' - message: Request execution in progress. Use the provided location header or - result handler ID to perform query monitoring and management. - PointOfTime: - type: object - description: Point of time. - required: - - point_of_time_type - properties: - point_of_time_type: - description: 'Type of the point of time. Possible values include: - - - `timestamp`: Exact time using the standard timezone format. Example: - `2023-09-15 10:59:43`. - `offset`: Interval relative to ''now.'' Example: - `1 day`. - `statement`: ID of a query statement to use as the reference - point for Time - Travel. - - For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime.' - type: string - examples: - timestamp: - value: '2023-09-15 10:59:43' - offset: - value: 20 ms - reference: - type: string - description: Relation to the point of time. Currently, the API supports - `at` and `before`. - discriminator: - propertyName: point_of_time_type - mapping: - timestamp: PointOfTimeTimestamp - offset: PointOfTimeOffset - statement: PointOfTimeStatement - PointOfTimeTimestamp: - description: Point of time identified by a timestamp. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - timestamp: - type: string - description: Timestamp of the point of time. - PointOfTimeOffset: - description: Point of time identified by an offset in reference to the current - time, such as `10 min`. - allOf: - - $ref: '#/components/schemas/PointOfTime' - examples: - month: - value: 2 months - milliseconds: - value: 20 ms - properties: - offset: - type: string - description: 'Offset from the point of time. Example: `1 year`' - PointOfTimeStatement: - description: Point of time indicating when a statement was executed. - allOf: - - $ref: '#/components/schemas/PointOfTime' - properties: - statement: - type: string - description: Statement of the point of time. - Parameter: - description: Snowflake parameter defined at the system, account, user, session, - or object level. - type: object - required: - - name - properties: - name: - type: string - description: Parameter name. - value: - type: string - description: Parameter value. - defaultValue: - type: string - description: Default parameter value. - dataType: - type: string - description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, - or STRING. - level: - type: string - description: Level at which parameter is defined. - description: - type: string - description: Parameter description. - example: - name: SAMPLE_SNOWAPI_PARAM - value: true - defaultValue: false - dataType: boolean - level: ACCOUNT - description: Sample snowflake parameter. - TargetLag: - type: object - description: Specifies the schedule for periodically refreshing the dynamic - table. - properties: - type: - description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. - type: string - discriminator: - propertyName: type - mapping: - USER_DEFINED: UserDefinedLag - DOWNSTREAM: DownstreamLag - UserDefinedLag: - description: User-defined target lag. - allOf: - - $ref: '#/components/schemas/TargetLag' - properties: - seconds: - type: integer - format: int64 - description: Target lag time in seconds. - example: - seconds: 3600 - required: - - seconds - DownstreamLag: - description: Downstream target lag - allOf: - - $ref: '#/components/schemas/TargetLag' - securitySchemes: - KeyPair: - type: http - scheme: bearer - bearerFormat: JWT - description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if - the token is a key-pair authentication JWT. - ExternalOAuth: - type: http - scheme: bearer - bearerFormat: JWT - description: Configure External Oauth with Snowflake (see External - OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` - and set the Token to the auth token received from the external Auth server. - SnowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token - is snowflakeOAuth - parameters: - database_name: - name: database_name - description: Identifier (i.e. name) for the database to which the resource belongs. - You can use the `/api/v2/databases` GET request to get a list of available - databases. - required: true - in: path - schema: - example: TEST_DB - $ref: '#/components/schemas/Identifier' - schema_name: - name: schema_name - description: Identifier (i.e. name) for the schema to which the resource belongs. - You can use the `/api/v2/databases/{database}/schemas` GET request to get - a list of available schemas for the specified database. - required: true - in: path - schema: - example: TEST_SCHEMA - $ref: '#/components/schemas/Identifier' - application: - name: application - description: Identifier (i.e. name) for the application to which the resource - belongs. You can use the `/api/v2/applications/{application}` GET request - to get a list of available applications. - required: true - in: path - schema: - example: TEST_APPLICATION - $ref: '#/components/schemas/Identifier' - name: - name: name - description: Identifier (i.e. name) for the resource. - required: true - in: path - schema: - example: TEST_NAME - $ref: '#/components/schemas/Identifier' - nameWithArgs: - name: nameWithArgs - description: Function's name with Args - required: true - in: path - schema: - type: string - example: foo(a number, b number) - createMode: - name: createMode - description: 'Query parameter allowing support for different modes of resource - creation. Possible values include: - - - `errorIfExists`: Throws an error if you try to create a resource that already - exists. - - - `orReplace`: Automatically replaces the existing resource with the current - one. - - - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent - resource.' - in: query - schema: - type: string - enum: - - errorIfExists - - orReplace - - ifNotExists - example: ifNotExists - default: errorIfExists - mode: - name: mode - description: 'Query parameter determines whether the revoke operation succeeds - or fails for the privileges, based on the whether the privileges had been - re-granted to another role. - - - restrict: If the privilege being revoked has been re-granted to another - role, the REVOKE command fails. - - - cascade: If the privilege being revoked has been re-granted, the REVOKE - command recursively revokes these dependent grants. If the same privilege - on an object has been granted to the target role by a different grantor (parallel - grant), that grant is not affected and the target role retains the privilege.' - in: query - schema: - type: string - enum: - - restrict - - cascade - example: restrict - ifExists: - name: ifExists - description: 'Query parameter that specifies how to handle the request for a - resource that does not exist: - - - `true`: The endpoint does not throw an error if the resource does not exist. - It returns a 200 success response, but does not take any action on the resource. - - - `false`: The endpoint throws an error if the resource doesn''t exist.' - in: query - schema: - type: boolean - example: true - default: false - like: - name: like - description: Query parameter to filter the command output by resource name. - Uses case-insensitive pattern matching, with support for SQL wildcard characters. - in: query - schema: - type: string - example: test_% - pattern: - name: pattern - description: A query parameter that filters the command output by a regular - expression pattern. - in: query - schema: - type: string - example: .*data_0.* - startsWith: - name: startsWith - description: Query parameter to filter the command output based on the string - of characters that appear at the beginning of the object name. Uses case-sensitive - pattern matching. - in: query - schema: - type: string - example: test - rootOnly: - name: rootOnly - description: Query parameter to filter the command output to return only root - resources (resources with no predecessors). - in: query - schema: - type: boolean - example: false - default: false - showLimit: - name: showLimit - description: Query parameter to limit the maximum number of rows returned by - a command. - in: query - schema: - type: integer - example: 10 - minimum: 1 - maximum: 10000 - fromName: - name: fromName - description: Query parameter to enable fetching rows only following the first - row whose object name matches the specified string. Case-sensitive and does - not have to be the full name. - in: query - schema: - type: string - example: from_test - copyGrants: - name: copyGrants - description: Query parameter to enable copy grants when creating the object. - in: query - schema: - type: boolean - example: false - default: false - asyncExec: - name: asyncExec - in: query - description: Asynchronous execution enable/disable. Default is disable. - schema: - type: boolean - default: false - sessionId: - name: sessionId - description: Unique ID for the current session. - required: true - in: path - schema: - type: integer - format: uuid - example: 524514326772799 - content-type: - name: Content-Type - description: Type of content for the resource. Currently supports `application/json`. - in: header - schema: - type: string - enum: - - application/json - accept: - name: Accept - description: Type of data format accepted by the resource. Currently supports - `application/json`. - in: header - schema: - type: string - enum: - - application/json - x-snowflake-authorization-token-type: - name: X-Snowflake-Authorization-Token-Type - description: Type of the Snowflake authorization token. Currently, keypair-jwt - (`KEYPAIR_JWT`) and OAuth tokens are supported. - in: header - schema: - type: string - enum: - - KEYPAIR_JWT - - OAUTH - x-sfc-session: - name: X-Sfc-Session - description: Token for the current Snowflake session. - in: header - required: false - schema: - type: string - description: Snowflake session token. - example: ver:3-hint:1000-ABCD= - headers: - X-Snowflake-Request-ID: - description: Unique ID of the API request. - schema: - type: string - format: uuid - Link: - description: Links to the page of results (e.g. the first page, the last page, - etc.). The header can include multiple 'url' entries with different 'rel' - attribute values that specify the page to return ('first', 'next', 'prev', - and 'last'). - schema: - type: string - example: ; rel="first",; - rel="next",; - rel="last" - responses: - 200SuccessResponse: - description: Successful request. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 201SuccessCreatedResponse: - description: Successfully created a new resource on the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - 202SuccessAcceptedResponse: - headers: - Location: - schema: - type: string - description: Relative path for checking request status or getting the - result, if available. - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - description: Successfully accepted the request, but it is not completed yet. - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessAcceptedResponse' - 400BadRequest: - description: Bad Request. The request payload is invalid or malformed. This - happens if the application didn't send the correct request payload. The response - body may include the error code and message indicating the actual cause. The - application must reconstruct the request body for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 401Unauthorized: - description: Unauthorized. The request is not authorized. This happens if the - attached access token is invalid or missing. The response body may include - the error code and message indicating the actual cause, e.g., expired, invalid - token. The application must obtain a new access token for retry. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 403Forbidden: - description: Forbidden. The request is forbidden. This can also happen if the - request is made even if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 404NotFound: - description: Not Found. The request endpoint is not valid. This happens if the - API endpoint does not exist, or if the API is not enabled. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 405MethodNotAllowed: - description: Method Not Allowed. The request method doesn't match the supported - API. This happens, for example, if the application calls the API with GET - method but the endpoint accepts only POST. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 408RequestTimeout: - description: Request Timeout. This indicates that the request from the client - timed out and was not completed by the server. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 409Conflict: - description: Conflict. The requested operation could not be performed due to - a conflicting state that could not be resolved. This usually happens when - a CREATE request was performed when there is a pre-existing resource with - the same name, and also without one of the options orReplace/ifNotExists. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 410Gone: - description: Gone. This error is primarily intended to assist the task of web - maintenance by notifying the recipient that the resource is intentionally - unavailable. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 415UnsupportedMediaType: - description: The request header Content-Type includes an unsupported media type. - The API supports application/json only. If none specified, the request payload - is taken as JSON, but if any other media type is specified, this error is - returned. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 429LimitExceeded: - description: Limit Exceeded. The number of requests hit the rate limit. The - application must slow down the frequency of hitting the API endpoints. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 500InternalServerError: - description: Internal Server Error. The server hit an unrecoverable system error. - The response body may include the error code and message for further guidance. - The application owner may need to reach out the customer support. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 503ServiceUnavailable: - description: Service Unavailable. The request was not processed due to server - side timeouts. The application may retry with backoff. The jittered backoff - is recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 504GatewayTimeout: - description: Gateway Timeout. The request was not processed due to server side - timeouts. The application may retry with backoff. The jittered backoff is - recommended. - headers: - X-Snowflake-Request-ID: - $ref: '#/components/headers/X-Snowflake-Request-ID' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-stackQL-resources: - warehouses: - methods: - create_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses/post' - response: - mediaType: '' - openAPIDocKey: '200' - list_warehouses: - operation: - $ref: '#/paths/~1api~1v2~1warehouses/get' - response: - mediaType: application/json - openAPIDocKey: '200' - fetch_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - create_or_alter_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}/put' - response: - mediaType: '' - openAPIDocKey: '200' - resume_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - rename_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:rename/post' - response: - mediaType: '' - openAPIDocKey: '200' - abort_all_queries_on_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:abort/post' - response: - mediaType: '' - openAPIDocKey: '200' - use_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:use/post' - response: - mediaType: '' - openAPIDocKey: '200' - enable_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:enable/post' - response: - mediaType: '' - openAPIDocKey: '200' - disable_warehouse: - operation: - $ref: '#/paths/~1api~1v2~1warehouses~1{name}:disable/post' - response: - mediaType: '' - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/warehouses/methods/list_warehouses' - - $ref: '#/components/x-stackQL-resources/warehouses/methods/fetch_warehouse' - insert: - - $ref: '#/components/x-stackQL-resources/warehouses/methods/create_warehouse' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/warehouses/methods/delete_warehouse' - replace: - - $ref: '#/components/x-stackQL-resources/warehouses/methods/create_or_alter_warehouse' - id: snowflake.warehouse.warehouses - name: warehouses - title: Warehouses -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/warehouses.yaml b/providers/src/snowflake/v00.00.00000/services/warehouses.yaml new file mode 100644 index 00000000..0ff4b75c --- /dev/null +++ b/providers/src/snowflake/v00.00.00000/services/warehouses.yaml @@ -0,0 +1,2106 @@ +openapi: 3.0.0 +servers: + - url: https://{endpoint}.snowflakecomputing.com + variables: + endpoint: + default: orgname-accountname + description: Organization and account identifier (orgname-accountname) +info: + version: 0.0.1 + title: Snowflake Warehouses API + description: 'The Snowflake REST API surface for the warehouses service, combining the vendor spec(s): compute-pool.yaml, warehouse.yaml.' + contact: + name: Snowflake, Inc. + url: https://snowflake.com + email: support@snowflake.com +paths: + /api/v2/compute-pools: + get: + summary: Lists compute pools. + tags: + - compute-pool + description: Lists the compute pools under the account. + operationId: listComputePools + parameters: + - $ref: '#/components/parameters/like' + - $ref: '#/components/parameters/startsWith' + - $ref: '#/components/parameters/showLimit' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListComputePoolsResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + post: + summary: Creates a compute pool. + tags: + - compute-pool + description: Creates a compute pool, with standard create modifiers as query parameters. See the Compute Pool component definition for what is required to be provided in the request body. + operationId: createComputePool + parameters: + - $ref: '#/components/parameters/createMode' + - name: initiallySuspended + in: query + description: Specifies whether the compute pool is created initially in the suspended state. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ComputePool' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{name}: + get: + summary: Fetches a compute pool. + tags: + - compute-pool + description: Fetches a named compute pool. You can get the name of the compute pool from the `/api/v2/compute-pools` GET request. + operationId: fetchComputePool + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ComputePool' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + parameters: + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/ifExists' + summary: Deletes a compute pool. + tags: + - compute-pool + description: Deletes a compute pool with the given name. If you enable the `ifExists` parameter, the operation succeeds even if the object does not exist. Otherwise, a 404 failure is returned if the object does not exist. + operationId: deleteComputePool + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{name}:resume: + post: + summary: Resumes a suspended compute pool. + tags: + - compute-pool + description: Resume a compute pool, if suspended. If the specified compute pool is already running, this will cause a 400 Bad Request error. + operationId: resumeComputePool + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{name}:suspend: + post: + summary: Suspends an active compute pool. + tags: + - compute-pool + description: Suspend a compute pool, if active. If the specified compute pool is already suspended, no action is taken. + operationId: suspendComputePool + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{name}:stopallservices: + post: + deprecated: true + summary: Stops all services on the compute pool. + tags: + - compute-pool + description: Stops all services in the compute pool. Deprecated - use :stop-all-services instead. + operationId: stopAllServicesInComputePoolDeprecated + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{name}:stop-all-services: + post: + summary: Stops all services on the compute pool. + tags: + - compute-pool + description: Stops all services in the compute pool. + operationId: stopAllServicesInComputePool + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/instance-families: + get: + summary: Lists available compute pool instance families. + tags: + - compute-pool + description: Lists all available instance families that can be used when creating compute pools. + operationId: listComputePoolInstanceFamilies + responses: + '200': + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ListComputePoolInstanceFamiliesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses: + post: + summary: Create or replace warehouse + description: Create a virtual warehouse. Equivalent to CREATE WAREHOUSE in SQL. + operationId: createWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/createMode' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Warehouse' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + get: + summary: List warehouse + description: Show a list of warehouse filtered by pattern. Equivalent to SHOW WAREHOUSE in SQL. + operationId: listWarehouses + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/like' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/ListWarehousesResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}: + get: + summary: Describe warehouse + description: Describes the warehouse, show information of the chosen warehouse. Equivalent to DESCRIBE WAREHOUSE in SQL. + operationId: fetchWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + description: successful + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/Warehouse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + delete: + summary: Drop warehouse + description: Removes the specified virtual warehouse from the system. Equivalent to DROP WAREHOUSE in SQL. + operationId: deleteWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:resume: + post: + summary: Resume warehouse + description: Bring current warehouse to a usable ‘Running’ state by provisioning compute resources if current warehouse is suspended. + operationId: resumeWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:suspend: + post: + summary: Suspend warehouse + description: Remove all compute nodes from a warehouse and put the warehouse into a ‘Suspended’ state if current warehouse is not suspended. + operationId: suspendWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:rename: + post: + summary: Update and rename warehouse + description: Specifies a new identifier for the warehouse; must be unique for current account. + operationId: renameWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Warehouse' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:abort: + post: + summary: Abort all queries + description: Aborts all the queries currently running or queued on the warehouse. + operationId: abortAllQueriesOnWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:use: + post: + summary: Use current warehouse for session + description: '[Deprecated] Specifies the active/current warehouse for the session.' + operationId: useWarehouse + tags: + - warehouse + deprecated: true + parameters: + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:enable: + post: + summary: enable adaptive warehouse + description: Enable an adaptive warehouse and put the warehouse into a ‘enabled’ state, if the warehouse is not enabled. + operationId: enableWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{name}:disable: + post: + summary: disable adaptive warehouse + description: Disable an adaptive warehouse and put the warehouse into a ‘disabled’ state, if the warehouse is not disabled. + operationId: disableWarehouse + tags: + - warehouse + parameters: + - $ref: '#/components/parameters/ifExists' + - $ref: '#/components/parameters/name' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/compute-pools/{compute_pool_name}: + parameters: [] + put: + summary: Create a (or alter an existing) compute pool. + tags: + - compute-pool + description: Create a (or alter an existing) compute pool. Even if the operation is just an alter, the full property set must be provided. + operationId: createOrAlterComputePool + parameters: + - name: compute_pool_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ComputePool' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' + /api/v2/warehouses/{warehouse_name}: + parameters: [] + put: + summary: Create a (or alter an existing) warehouse. + description: Create a (or alter an existing) warehouse. Even if the operation is just an alter, the full property set must be provided. + operationId: createOrAlterWarehouse + tags: + - warehouse + parameters: + - name: warehouse_name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Warehouse' + responses: + '200': + $ref: '#/components/responses/200SuccessResponse' + '202': + $ref: '#/components/responses/202SuccessAcceptedResponse' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + '403': + $ref: '#/components/responses/403Forbidden' + '404': + $ref: '#/components/responses/404NotFound' + '405': + $ref: '#/components/responses/405MethodNotAllowed' + '408': + $ref: '#/components/responses/408RequestTimeout' + '409': + $ref: '#/components/responses/409Conflict' + '410': + $ref: '#/components/responses/410Gone' + '429': + $ref: '#/components/responses/429LimitExceeded' + '500': + $ref: '#/components/responses/500InternalServerError' + '503': + $ref: '#/components/responses/503ServiceUnavailable' + '504': + $ref: '#/components/responses/504GatewayTimeout' +components: + schemas: + ComputePool: + type: object + description: A Snowflake compute pool definition. + properties: + name: + $ref: '#/components/schemas/Identifier' + min_nodes: + type: integer + description: Minimum number of nodes for the compute pool. + max_nodes: + type: integer + description: Maximum number of nodes for the compute pool. + instance_family: + type: string + description: Instance family for the compute pool. Use the /api/v2/compute-pools/instance-families endpoint to retrieve available values. + auto_resume: + type: boolean + description: Whether Snowflake automatically resumes the compute pool when any statement that requires the compute pool is submitted. + comment: + type: string + description: Comment describing the compute pool. + state: + type: string + description: Current state of the compute pool. Possible values include UNKNOWN, STARTING, IDLE, ACTIVE, STOPPING, SUSPENDED, and RESIZING. + readOnly: true + enum: + - UNKNOWN + - STARTING + - IDLE + - ACTIVE + - STOPPING + - SUSPENDED + - RESIZING + num_services: + type: integer + description: Number of services on the compute pool. + readOnly: true + num_jobs: + type: integer + description: Number of jobs on the compute pool. + readOnly: true + auto_suspend_secs: + type: integer + description: Number of seconds until the compute pool automatically suspends. + format: int64 + active_nodes: + type: integer + description: Number of currently active nodes on the compute pool. + readOnly: true + idle_nodes: + type: integer + description: Number of currently idle nodes on the compute pool. + readOnly: true + target_nodes: + type: integer + description: Number of target nodes on the compute pool. + readOnly: true + created_on: + type: string + description: Time the compute pool was created. + format: date-time + readOnly: true + resumed_on: + type: string + description: Time the compute pool was last resumed. + format: date-time + readOnly: true + updated_on: + type: string + description: Time the compute pool was last updated. + format: date-time + readOnly: true + owner: + type: string + description: Identifier for the current owner of the compute pool. + readOnly: true + is_exclusive: + type: boolean + description: Whether a compute pool is created exclusively for a Snowflake Native App. + readOnly: true + application: + type: string + description: Name of the Snowflake Native App if the compute pool is created exclusively for the app. + readOnly: true + budget: + type: string + description: The name of the budget monitoring the credit usage of the compute pool. + readOnly: true + error_code: + type: string + description: Current error the compute pool hit if any. + readOnly: true + status_message: + type: string + description: Current status of the compute pool if any. + readOnly: true + desired_nodes: + type: integer + description: Number of nodes to maintain on the compute pool + readOnly: true + desired_nodes_expire_after: + type: string + description: Time after which the desired nodes on the compute pool will expire. + format: date-time + readOnly: true + optimize_for_capacity: + type: boolean + description: Whether the compute pool is optimized for capacity. + readOnly: true + placement_group: + type: string + description: The name of the placement group on the compute pool. + readOnly: true + example: + name: compute_pool_name + warehouse: test_wh + min_nodes: 4 + max_nodes: 5 + instance_family: compute_pool_family + auto_resume: false + comment: test_comment + state: STARTING + num_services: 1 + num_jobs: 3 + auto_suspend_secs: 10 + active_nodes: 2 + idle_nodes: 2 + target_nodes: 4 + created_on: '2024-06-18T01:01:01.111111' + updated_on: '2024-06-18T01:01:01.111111' + resumed_on: '2024-06-18T01:01:01.111111' + owner: POOL_ADMIN + is_exclusive: true + application: testapp + budget: testbudget + error_code: '392507' + status_message: Compute Pool is resizing for last 10 minutes. We have observed CAPACITY_ERROR. Please refer to our documentation. + desired_nodes: 4 + desired_nodes_expire_after: '2024-06-19T01:01:01.111111' + placement_group: A + required: + - name + - instance_family + - min_nodes + - max_nodes + ComputePoolInstanceFamily: + type: object + description: A compute pool instance family. + properties: + name: + type: string + description: Name of the instance family. + example: CPU_X64_S + description: + type: string + description: Description of the instance family. + example: Ideal for hosting multiple services/jobs while saving cost. + vcpu: + type: integer + description: Number of vCPUs. + format: int64 + example: 3 + memory_gib: + type: integer + description: Memory in GiB. + format: int64 + example: 13 + storage_gib: + type: number + description: Storage in GiB. + format: double + example: 93.13 + gpu: + type: string + description: GPU model (if applicable). + example: NVIDIA A10G + nullable: true + gpu_count: + type: integer + description: Number of GPUs. + format: int64 + example: 0 + gpu_memory_gib: + type: integer + description: GPU memory in GiB (if applicable). + format: int64 + example: 0 + current_node_usage: + type: integer + description: Number of nodes currently utilizing this instance family + format: int64 + example: 0 + message: + type: string + description: Additional information about the instance family. + example: '' + nullable: true + example: + name: CPU_X64_S + description: Ideal for hosting multiple services/jobs while saving cost. + vcpu: 3 + memory_gib: 13 + storage_gib: 93.13 + gpu: null + gpu_count: 0 + gpu_memory_gib: 0 + current_node_usage: 0 + message: '' + Identifier: + type: string + description: A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. + pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ + example: TEST_NAME + ErrorResponse: + type: object + properties: + message: + type: string + description: Error message returned by the server + code: + type: string + description: Error code. + error_code: + type: string + description: Error code, same as `code` above. This property has been deprecated and will be removed in a future release, but is temporarily supported for for short-term backward compatibility. + request_id: + type: string + description: Unique request ID. + example: + message: Compilation error! + error_code: '390189' + request_id: 01afef9d-0607-0550-0001-dd270c3902d7 + SuccessResponse: + type: object + description: Schema for all the success responses returned by the server. + properties: + status: + type: string + description: Message returned by the server. + example: + status: Request successfully completed + SuccessAcceptedResponse: + type: object + description: Schema for a request in progress response returned by the server. + properties: + code: + type: string + description: Message code returned by the server. + message: + type: string + description: Message returned by the server + resultHandler: + type: string + description: Opaque result ID used for checking for request completion through one or more subsequent completion check operations. + example: + code: '392604' + message: Request execution in progress. Use the provided location header or result handler ID to perform query monitoring and management. + PointOfTime: + type: object + description: Point of time. + required: + - point_of_time_type + properties: + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeTimestamp: + description: Point of time identified by a timestamp. + properties: + timestamp: + type: string + description: Timestamp of the point of time (e.g. TO_TIMESTAMP(1749423600)) + example: TO_TIMESTAMP(1749423600) + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeOffset: + description: Point of time identified by an offset in reference to the current time + properties: + offset: + type: string + description: The difference in seconds from the current time in the form -N where N can be an integer or arithmetic expression (e.g. -120). + example: '-120' + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + PointOfTimeStatement: + description: Point of time indicating when a statement was executed. + properties: + statement: + type: string + description: Query ID of a statement to use as the reference point (e.g. 01bcf40d-0002-197f-0000-045701e2306e). + example: 01bcf40d-0002-197f-0000-045701e2306e + point_of_time_type: + description: |- + Type of the point of time. Possible values include: + - `timestamp`: Exact time using the standard timezone format. Example: `TO_TIMESTAMP(1749423600)`. - `offset`: Interval relative to 'now.' in the form -N where N can be an integer or arithmetic expression. Example: `-120` - `statement`: ID of a query statement to use as the reference point for Time Travel. + For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. + type: string + example: timestamp + reference: + type: string + description: Relation to the point of time. Currently, the API supports `at` and `before`. + example: at + type: object + required: + - point_of_time_type + discriminator: + propertyName: point_of_time_type + mapping: + timestamp: PointOfTimeTimestamp + offset: PointOfTimeOffset + statement: PointOfTimeStatement + Parameter: + description: Snowflake parameter defined at the system, account, user, session, or object level. + type: object + required: + - name + properties: + name: + type: string + description: Parameter name. + value: + type: string + description: Parameter value. + defaultValue: + type: string + description: Default parameter value. + dataType: + type: string + description: Data type of the parameter value. Either BOOLEAN, NUMBER, FLOAT, or STRING. + level: + type: string + description: Level at which parameter is defined. + description: + type: string + description: Parameter description. + example: + name: SAMPLE_SNOWAPI_PARAM + value: true + defaultValue: false + dataType: boolean + level: ACCOUNT + description: Sample snowflake parameter. + TargetLag: + type: object + description: Specifies the schedule for periodically refreshing the dynamic table. + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + UserDefinedLag: + description: User-defined target lag. + properties: + seconds: + type: integer + format: int64 + description: Target lag time in seconds. + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + example: + seconds: 3600 + required: + - seconds + type: object + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + DownstreamLag: + description: Downstream target lag + type: object + properties: + type: + description: Type of lag, can be either USER_DEFINED or DOWNSTREAM. + type: string + discriminator: + propertyName: type + mapping: + USER_DEFINED: UserDefinedLag + DOWNSTREAM: DownstreamLag + Warehouse: + type: object + description: A Snowflake virtual warehouse + properties: + name: + $ref: '#/components/schemas/Identifier' + description: Name of warehouse + warehouse_type: + type: string + description: 'Type of warehouse, possible types: STANDARD, SNOWPARK-OPTIMIZED' + warehouse_size: + type: string + description: 'Size of warehouse, possible sizes: XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE, X4LARGE, X5LARGE, X6LARGE' + wait_for_completion: + type: string + enum: + - true + - false + description: When resizing a warehouse, you can use this parameter to block the return of the ALTER WAREHOUSE command until the resize has finished provisioning all its compute resources + max_cluster_count: + type: integer + format: int32 + description: Specifies the maximum number of clusters for a multi-cluster warehouse + min_cluster_count: + type: integer + format: int32 + description: Specifies the minimum number of clusters for a multi-cluster warehouse + scaling_policy: + type: string + description: 'Scaling policy of warehouse, possible scaling policies: STANDARD, ECONOMY' + auto_suspend: + type: integer + format: int32 + description: time in seconds before auto suspend + auto_resume: + type: string + enum: + - true + - false + description: Specifies whether to automatically resume a warehouse when a SQL statement is submitted to it + initially_suspended: + type: string + enum: + - true + - false + description: Specifies whether the warehouse is created initially in the Suspended state + resource_monitor: + $ref: '#/components/schemas/Identifier' + description: Specifies the name of a resource monitor that is explicitly assigned to the warehouse. When a resource monitor is explicitly assigned to a warehouse, the monitor controls the monthly credits used by the warehouse + comment: + type: string + format: comment + description: Specifies a comment for the warehouse + enable_query_acceleration: + type: string + enum: + - true + - false + description: Specifies whether to enable the query acceleration service for queries that rely on this warehouse for compute resources + query_acceleration_max_scale_factor: + type: integer + format: int32 + description: Specifies the maximum scale factor for leasing compute resources for query acceleration. The scale factor is used as a multiplier based on warehouse size + max_concurrency_level: + type: integer + format: int32 + description: Object parameter that specifies the concurrency level for SQL statements executed by a warehouse cluster + statement_queued_timeout_in_seconds: + type: integer + format: int32 + description: Object parameter that specifies the time, in seconds, a SQL statement can be queued on a warehouse before it is canceled by the system + statement_timeout_in_seconds: + type: integer + format: int32 + description: Object parameter that specifies the time, in seconds, after which a running SQL statement is canceled by the system + type: + type: string + description: '[Deprecated] Type of warehouse, possible types: STANDARD, SNOWPARK-OPTIMIZED' + deprecated: true + size: + type: string + description: '[Deprecated] names of size: X-Small, Small, Medium, Large, X-Large, 2X-Large, 3X-Large, 4X-Large, 5X-Large, 6X-Large' + deprecated: true + state: + type: string + readOnly: true + description: 'The state of warehouse, possible states: STARTED, STARTING, DYNAMIC, SUSPENDED, RESIZING, RESUMING, SUSPENDING' + started_clusters: + type: integer + format: int32 + readOnly: true + description: Number of clusters currently started. + running: + type: integer + format: int32 + readOnly: true + description: Number of SQL statements that are being executed by the warehouse. + queued: + type: integer + format: int32 + readOnly: true + description: Number of SQL statements that are queued for the warehouse. + is_default: + type: boolean + readOnly: true + description: Whether the warehouse is the default for the current user. + is_current: + type: boolean + readOnly: true + description: Whether the warehouse is in use for the session. Only one warehouse can be in use at a time for a session. To specify or change the warehouse for a session, use the USE WAREHOUSE command. + available: + type: string + format: Percentage + readOnly: true + description: Percentage of the warehouse compute resources that are provisioned and available. + provisioning: + type: string + format: Percentage + readOnly: true + description: Percentage of the warehouse compute resources that are in the process of provisioning. + quiescing: + type: string + format: Percentage + readOnly: true + description: Percentage of the warehouse compute resources that are executing SQL statements, but will be shut down once the queries complete. + other: + type: string + format: Percentage + readOnly: true + description: Percentage of the warehouse compute resources that are in a state other than available, provisioning, or quiescing. + created_on: + type: string + format: date-time + readOnly: true + description: Date and time when the warehouse was created. + resumed_on: + type: string + format: date-time + readOnly: true + description: Date and time when the warehouse was last started or restarted. + updated_on: + type: string + format: date-time + readOnly: true + description: Date and time when the warehouse was last updated, which includes changing any of the properties of the warehouse or changing the state (STARTED, SUSPENDED, RESIZING) of the warehouse. + owner: + type: string + format: role name + readOnly: true + description: Role that owns the warehouse. + budget: + type: string + readOnly: true + description: Comment representing budget for warehouse. + kind: + type: string + format: warehouse + readOnly: true + deprecated: true + owner_role_type: + type: string + readOnly: true + description: The type of role that owns the object. + warehouse_credit_limit: + type: integer + format: int64 + description: Credit limit that are can be executed by the warehouse. + target_statement_size: + type: string + description: 'Names of size: X-Small, Small, Medium, Large, X-Large, 2X-Large, 3X-Large, 4X-Large, 5X-Large, 6X-Large' + required: + - name + ListComputePoolsResponse: + type: object + properties: + compute_pools: + type: array + items: + $ref: '#/components/schemas/ComputePool' + ListComputePoolInstanceFamiliesResponse: + type: object + properties: + compute_pool_instance_families: + type: array + items: + $ref: '#/components/schemas/ComputePoolInstanceFamily' + ListWarehousesResponse: + type: object + properties: + warehouses: + type: array + items: + $ref: '#/components/schemas/Warehouse' + securitySchemes: + KeyPair: + type: http + scheme: bearer + bearerFormat: JWT + description: Set `X-Snowflake-Authorization-Token-Type` to `KEYPAIR_JWT` if the token is a key-pair authentication JWT. + ExternalOAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Configure External Oauth with Snowflake (see External OAuth overview.) Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` and set the Token to the auth token received from the external Auth server. + SnowflakeOAuth: + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token is snowflakeOAuth + parameters: + application: + name: application + description: Identifier (i.e. name) for the application to which the resource belongs. You can use the `/api/v2/applications/{application}` GET request to get a list of available applications. + required: true + in: path + schema: + example: TEST_APPLICATION + $ref: '#/components/schemas/Identifier' + name: + name: name + description: Identifier (i.e. name) for the resource. + required: true + in: path + schema: + example: TEST_NAME + $ref: '#/components/schemas/Identifier' + createMode: + name: createMode + description: |- + Parameter allowing support for different modes of resource creation. Possible values include: + - `errorIfExists`: Throws an error if you try to create a resource that already exists. + - `orReplace`: Automatically replaces the existing resource with the current one. + - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. + in: query + schema: + type: string + enum: + - errorIfExists + - orReplace + - ifNotExists + example: ifNotExists + default: errorIfExists + mode: + name: mode + description: |- + Parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. + - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. + - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege. + in: query + schema: + type: string + enum: + - restrict + - cascade + example: restrict + ifExists: + name: ifExists + description: |- + Parameter that specifies how to handle the request for a resource that does not exist: + - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. + - `false`: The endpoint throws an error if the resource doesn't exist. + in: query + schema: + type: boolean + example: true + default: false + like: + name: like + description: Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. + in: query + schema: + type: string + example: test_% + pattern: + name: pattern + description: Parameter that filters the command output by a regular expression pattern. + in: query + schema: + type: string + example: .*data_0.* + startsWith: + name: startsWith + description: Parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. + in: query + schema: + type: string + example: test + rootOnly: + name: rootOnly + description: Parameter to filter the command output to return only root resources (resources with no predecessors). + in: query + schema: + type: boolean + example: false + default: false + showLimit: + name: showLimit + description: Parameter to limit the maximum number of rows returned by a command. + in: query + schema: + type: integer + example: 10 + minimum: 1 + maximum: 10000 + fromName: + name: fromName + description: Parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. + in: query + schema: + type: string + example: from_test + copyGrants: + name: copyGrants + description: Parameter to enable copy grants when creating the object. + in: query + schema: + type: boolean + example: false + default: false + asyncExec: + name: asyncExec + in: query + description: Asynchronous execution enable/disable. Default is disable. + schema: + type: boolean + default: false + sessionId: + name: sessionId + description: Unique ID for the current session. + required: true + in: path + schema: + type: integer + format: uuid + example: 524514326772799 + content-type: + name: Content-Type + description: Type of content for the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + accept: + name: Accept + description: Type of data format accepted by the resource. Currently supports `application/json`. + in: header + schema: + type: string + enum: + - application/json + x-snowflake-authorization-token-type: + name: X-Snowflake-Authorization-Token-Type + description: Type of the Snowflake authorization token. Currently, keypair-jwt (`KEYPAIR_JWT`) and OAuth tokens are supported. + in: header + schema: + type: string + enum: + - KEYPAIR_JWT + - OAUTH + x-sfc-session: + name: X-Sfc-Session + description: Token for the current Snowflake session. + in: header + required: false + schema: + type: string + description: Snowflake session token. + example: ver:3-hint:1000-ABCD= + database_name: + name: database_name + description: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. + required: true + in: path + schema: + example: TEST_DB + $ref: '#/components/schemas/Identifier' + schema_name: + name: schema_name + description: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. + required: true + in: path + schema: + example: TEST_SCHEMA + $ref: '#/components/schemas/Identifier' + name_with_args: + name: name_with_args + description: Function's name with Args + required: true + in: path + schema: + type: string + example: foo(a number, b number) + headers: + X-Snowflake-Request-ID: + description: Unique ID of the API request. + schema: + type: string + format: uuid + Link: + description: Links to the page of results (e.g. the first page, the last page, etc.). The header can include multiple 'url' entries with different 'rel' attribute values that specify the page to return ('first', 'next', 'prev', and 'last'). + schema: + type: string + example: ; rel="first",; rel="next",; rel="last" + responses: + 200SuccessResponse: + description: Successful request. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 201SuccessCreatedResponse: + description: Successfully created a new resource on the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + 202SuccessAcceptedResponse: + headers: + Location: + schema: + type: string + description: Relative path for checking request status or getting the result, if available. + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + description: Successfully accepted the request, but it is not completed yet. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessAcceptedResponse' + 400BadRequest: + description: Bad Request. The request payload is invalid or malformed. This happens if the application didn't send the correct request payload. The response body may include the error code and message indicating the actual cause. The application must reconstruct the request body for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401Unauthorized: + description: Unauthorized. The request is not authorized. This happens if the attached access token is invalid or missing. The response body may include the error code and message indicating the actual cause, e.g., expired, invalid token. The application must obtain a new access token for retry. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 403Forbidden: + description: Forbidden. The request is forbidden. This can also happen if the request is made even if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 404NotFound: + description: Not Found. The request endpoint is not valid. This happens if the API endpoint does not exist, or if the API is not enabled. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 405MethodNotAllowed: + description: Method Not Allowed. The request method doesn't match the supported API. This happens, for example, if the application calls the API with GET method but the endpoint accepts only POST. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 408RequestTimeout: + description: Request Timeout. This indicates that the request from the client timed out and was not completed by the server. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 409Conflict: + description: Conflict. The requested operation could not be performed due to a conflicting state that could not be resolved. This usually happens when a CREATE request was performed when there is a pre-existing resource with the same name, and also without one of the options orReplace/ifNotExists. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 410Gone: + description: Gone. This error is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 415UnsupportedMediaType: + description: The request header Content-Type includes an unsupported media type. The API supports application/json only. If none specified, the request payload is taken as JSON, but if any other media type is specified, this error is returned. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 429LimitExceeded: + description: Limit Exceeded. The number of requests hit the rate limit. The application must slow down the frequency of hitting the API endpoints. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 500InternalServerError: + description: Internal Server Error. The server hit an unrecoverable system error. The response body may include the error code and message for further guidance. The application owner may need to reach out the customer support. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 503ServiceUnavailable: + description: Service Unavailable. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 504GatewayTimeout: + description: Gateway Timeout. The request was not processed due to server side timeouts. The application may retry with backoff. The jittered backoff is recommended. + headers: + X-Snowflake-Request-ID: + $ref: '#/components/headers/X-Snowflake-Request-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-stackQL-resources: + compute_pools: + id: snowflake.warehouses.compute_pools + name: compute_pools + title: Compute Pools + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.compute_pools + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListComputePoolsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"compute_pools\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + config: + queryParamPushdown: + top: + paramName: showLimit + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1compute-pools/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + stop_all_services: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{name}:stop-all-services/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1{compute_pool_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/compute_pools/methods/get' + - $ref: '#/components/x-stackQL-resources/compute_pools/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/compute_pools/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/compute_pools/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/compute_pools/methods/create_or_alter' + instance_families: + id: snowflake.warehouses.instance_families + name: instance_families + title: Instance Families + methods: + list: + operation: + $ref: '#/paths/~1api~1v2~1compute-pools~1instance-families/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.compute_pool_instance_families + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListComputePoolInstanceFamiliesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"compute_pool_instance_families\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/instance_families/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + warehouses: + id: snowflake.warehouses.warehouses + name: warehouses + title: Warehouses + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1warehouses/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1api~1v2~1warehouses/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.warehouses + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/ListWarehousesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"warehouses\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + get: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:resume/post' + response: + mediaType: application/json + openAPIDocKey: '200' + suspend: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:suspend/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rename: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:rename/post' + response: + mediaType: application/json + openAPIDocKey: '200' + abort: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:abort/post' + response: + mediaType: application/json + openAPIDocKey: '200' + use_deprecated: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:use/post' + response: + mediaType: application/json + openAPIDocKey: '200' + enable: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:enable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + disable: + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{name}:disable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_or_alter: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api~1v2~1warehouses~1{warehouse_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/warehouses/methods/get' + - $ref: '#/components/x-stackQL-resources/warehouses/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/warehouses/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/warehouses/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/warehouses/methods/create_or_alter' +security: + - KeyPair: [] + - ExternalOAuth: [] + - SnowflakeOAuth: [] +tags: + - name: compute-pool