diff --git a/providers/src/snowflake/v00.00.00000/provider.yaml b/providers/src/snowflake/v00.00.00000/provider.yaml index b890dbe1..979dcc6b 100644 --- a/providers/src/snowflake/v00.00.00000/provider.yaml +++ b/providers/src/snowflake/v00.00.00000/provider.yaml @@ -54,34 +54,6 @@ providerServices: 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 - preferred: true - service: - $ref: snowflake/v00.00.00000/services/cortex-analyst.yaml - title: Cortex Analyst 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 - preferred: true - service: - $ref: snowflake/v00.00.00000/services/cortex-inference.yaml - title: Cortex Inference 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 - preferred: true - service: - $ref: snowflake/v00.00.00000/services/cortex-search-service.yaml - title: Cortex Search REST 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 @@ -271,16 +243,6 @@ providerServices: 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. sqlapi: id: sqlapi:v00.00.00000 name: sqlapi @@ -301,12 +263,12 @@ providerServices: 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. - stream: - id: stream:v00.00.00000 - name: stream + streams: + id: streams:v00.00.00000 + name: streams preferred: true service: - $ref: snowflake/v00.00.00000/services/stream.yaml + $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, @@ -374,5 +336,5 @@ providerServices: customize and manage virtual warehouse in a Snowflake account. config: auth: - credentialsenvvar: SNOWFLAKE_CREDENTIALS - type: service_account + type: bearer + credentialsenvvar: SNOWFLAKE_PAT diff --git a/providers/src/snowflake/v00.00.00000/services/account.yaml b/providers/src/snowflake/v00.00.00000/services/account.yaml index 28bd18d4..96638367 100644 --- a/providers/src/snowflake/v00.00.00000/services/account.yaml +++ b/providers/src/snowflake/v00.00.00000/services/account.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Account API @@ -410,12 +412,13 @@ components: - admin_name - email - edition - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -593,11 +596,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1006,10 +1024,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: accounts: methods: @@ -1046,6 +1060,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/accounts/methods/delete_account' replace: [] + id: snowflake.account.accounts + name: accounts + title: Accounts security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/alert.yaml b/providers/src/snowflake/v00.00.00000/services/alert.yaml index 60a53eae..77082efb 100644 --- a/providers/src/snowflake/v00.00.00000/services/alert.yaml +++ b/providers/src/snowflake/v00.00.00000/services/alert.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Alert API @@ -473,12 +475,13 @@ components: description: Statement of the point of time. required: - statement - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -594,11 +597,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1007,10 +1025,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: alerts: methods: @@ -1060,6 +1074,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/alerts/methods/delete_alert' replace: [] + id: snowflake.alert.alerts + name: alerts + title: Alerts security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/api-integration.yaml b/providers/src/snowflake/v00.00.00000/services/api-integration.yaml index cf88592d..a7b757aa 100644 --- a/providers/src/snowflake/v00.00.00000/services/api-integration.yaml +++ b/providers/src/snowflake/v00.00.00000/services/api-integration.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake API Integration API @@ -384,12 +386,13 @@ components: description: An alphanumeric string that is used to identify API clients and control access to the API, also called a subscription key. nullable: true - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -567,11 +570,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -980,10 +998,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: api_integrations: methods: @@ -1028,6 +1042,9 @@ components: - $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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml b/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml index 6ad38c60..541237dc 100644 --- a/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml +++ b/providers/src/snowflake/v00.00.00000/services/catalog-integration.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Catalog Integration API @@ -346,12 +348,13 @@ components: - oauth_client_id - oauth_client_secret - oauth_allowed_scopes - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -957,10 +960,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: catalog_integrations: methods: @@ -998,3 +997,6 @@ components: 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 index b1cd730c..b1619ac2 100644 --- a/providers/src/snowflake/v00.00.00000/services/compute-pool.yaml +++ b/providers/src/snowflake/v00.00.00000/services/compute-pool.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Compute Pools API @@ -485,12 +487,13 @@ components: - instance_family - min_nodes - max_nodes - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -668,11 +671,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1081,10 +1099,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: compute_pools: methods: @@ -1153,6 +1167,9 @@ components: - $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: [] 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 96144a8f..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-analyst.yaml +++ /dev/null @@ -1,1067 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{organization}.snowflakecomputing.com/ - variables: - organization: - default: org-account -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' -components: - schemas: - 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' - 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 - 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 - description: 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. - Identifier: - type: string - description: A Snowflake object identifier. - 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: - $ref: '#/components/securitySchemes/KeyPair' - ExternalOAuth: - $ref: '#/components/securitySchemes/ExternalOAuth' - SnowflakeOAuth: - $ref: '#/components/securitySchemes/SnowflakeOAuth' - parameters: - database: - name: database - 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: schema - 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' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] - x-stackQL-resources: - analyst: - methods: - send_feedback: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1feedback/post' - response: - mediaType: '' - openAPIDocKey: '200' - send_message: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1analyst~1message/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] -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 2a0443ed..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-inference.yaml +++ /dev/null @@ -1,865 +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/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: - 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\ - \ Multiple '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: common-cortex-tool.yaml#/components/schemas/TextContent - tool_result: common-cortex-tool.yaml#/components/schemas/ToolResults - tool_use: common-cortex-tool.yaml#/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: common-cortex-tool.yaml#/components/schemas/Tool - tool_choice: - $ref: common-cortex-tool.yaml#/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: common-cortex-tool.yaml#/components/schemas/TextContent - tool_use: common-cortex-tool.yaml#/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: - type: object - properties: - content: - type: string - description: Change in text-completion response content since - previous event. - content_list: - type: array - description: Contents of text and toolUse response. - items: - discriminator: - propertyName: type - mapping: - text: common-cortex-tool.yaml#/components/schemas/TextContent - tool_use: common-cortex-tool.yaml#/components/schemas/StreamingToolUse - description: 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. - Identifier: - type: string - description: A Snowflake object identifier. - 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: - $ref: '#/components/securitySchemes/KeyPair' - ExternalOAuth: - $ref: '#/components/securitySchemes/ExternalOAuth' - SnowflakeOAuth: - $ref: '#/components/securitySchemes/SnowflakeOAuth' - parameters: - database: - name: database - 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: schema - 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' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] - x-stackQL-resources: - inference: - methods: - cortex_llm_inference_complete: - operation: - $ref: '#/paths/~1api~1v2~1cortex~1inference:complete/post' - response: - mediaType: text/event-stream - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -servers: -- url: https://{organization}.snowflakecomputing.com/ - variables: - organization: - default: org-account 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 cdcca014..00000000 --- a/providers/src/snowflake/v00.00.00000/services/cortex-search-service.yaml +++ /dev/null @@ -1,1287 +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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - 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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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: database - 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: schema - 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 'queries' - must be specified. - type: string - queries: - description: A search query expressed as a collection of multiple column-level - queries. Exactly one of 'query' or 'queries' must be specified. - type: object - additionalProperties: - $ref: '#/components/schemas/ColumnQuery' - 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' - 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 - 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 - description: 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. - Identifier: - type: string - description: A Snowflake object identifier. - 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: - $ref: '#/components/securitySchemes/KeyPair' - ExternalOAuth: - $ref: '#/components/securitySchemes/ExternalOAuth' - SnowflakeOAuth: - $ref: '#/components/securitySchemes/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' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] - x-stackQL-resources: - search_services: - methods: - list_cortex_search_services: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1cortex-search-services/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1cortex-search-services/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1cortex-search-services~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1cortex-search-services~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - query_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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}~1schemas~1{schema}~1cortex-search-services~1{name}:suspend/post' - response: - mediaType: '' - openAPIDocKey: '200' - resume_cortex_search_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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' - - $ref: '#/components/x-stackQL-resources/search_services/methods/query_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: [] -security: -- KeyPair: [] -- ExternalOAuth: [] -- SnowflakeOAuth: [] -servers: -- url: https://{organization}.snowflakecomputing.com/ - variables: - organization: - default: org-account diff --git a/providers/src/snowflake/v00.00.00000/services/database-role.yaml b/providers/src/snowflake/v00.00.00000/services/database-role.yaml index ed26a681..e0575a8d 100644 --- a/providers/src/snowflake/v00.00.00000/services/database-role.yaml +++ b/providers/src/snowflake/v00.00.00000/services/database-role.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Database Role API @@ -605,12 +607,13 @@ components: description: Schema name of the securable scope if applicable. required: - database - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -788,11 +791,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1201,10 +1219,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: database_roles: methods: @@ -1241,6 +1255,9 @@ components: 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: @@ -1270,6 +1287,9 @@ components: 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: @@ -1299,6 +1319,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/database.yaml b/providers/src/snowflake/v00.00.00000/services/database.yaml index ff1cb022..f76cce4c 100644 --- a/providers/src/snowflake/v00.00.00000/services/database.yaml +++ b/providers/src/snowflake/v00.00.00000/services/database.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Database API @@ -869,12 +871,13 @@ components: name: $ref: '#/components/schemas/Identifier' description: Name of the database. - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1052,11 +1055,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1465,10 +1483,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: databases: methods: @@ -1573,6 +1587,9 @@ components: - $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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml b/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml index 2ca49a79..8178d0ed 100644 --- a/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml +++ b/providers/src/snowflake/v00.00.00000/services/dynamic-table.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Dynamic Table API @@ -730,12 +732,13 @@ components: $ref: '#/components/schemas/PointOfTime' required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -913,11 +916,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1326,10 +1344,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: dynamic_tables: methods: @@ -1415,6 +1429,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/event-table.yaml b/providers/src/snowflake/v00.00.00000/services/event-table.yaml index 3b1b279d..c44f9dea 100644 --- a/providers/src/snowflake/v00.00.00000/services/event-table.yaml +++ b/providers/src/snowflake/v00.00.00000/services/event-table.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Event Table API @@ -374,12 +376,13 @@ components: comment: type: string description: Specifies a comment for the column - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -557,11 +560,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -970,10 +988,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: event_tables: methods: @@ -1017,6 +1031,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/external-volume.yaml b/providers/src/snowflake/v00.00.00000/services/external-volume.yaml index f6db545d..04247cb7 100644 --- a/providers/src/snowflake/v00.00.00000/services/external-volume.yaml +++ b/providers/src/snowflake/v00.00.00000/services/external-volume.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake External Volume API @@ -389,12 +391,13 @@ components: required: - azure_tenant_id - storage_base_url - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -572,11 +575,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -985,10 +1003,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: external_volumes: methods: @@ -1032,6 +1046,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/function.yaml b/providers/src/snowflake/v00.00.00000/services/function.yaml index 936d9ff3..87ca0417 100644 --- a/providers/src/snowflake/v00.00.00000/services/function.yaml +++ b/providers/src/snowflake/v00.00.00000/services/function.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Function API @@ -334,12 +336,13 @@ components: path: type: string description: Function's path - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -517,11 +520,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -930,10 +948,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: functions: methods: @@ -977,6 +991,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/functions/methods/delete_function' replace: [] + id: snowflake.function.functions + name: functions + title: Functions security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/grant.yaml b/providers/src/snowflake/v00.00.00000/services/grant.yaml index a62b0390..60e8ff42 100644 --- a/providers/src/snowflake/v00.00.00000/services/grant.yaml +++ b/providers/src/snowflake/v00.00.00000/services/grant.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Grant API @@ -717,12 +719,13 @@ components: type: string description: The role that granted this privilege to this grantee example: SUBADMIN - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -900,11 +903,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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. @@ -1097,10 +1115,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: privileges: methods: @@ -1138,6 +1152,9 @@ components: - $ref: '#/components/x-stackQL-resources/privileges/methods/revoke_privilege' - $ref: '#/components/x-stackQL-resources/privileges/methods/revoke_group_privilege' replace: [] + id: snowflake.grant.privileges + name: privileges + title: Privileges grant_options: methods: revoke_privilege_grant_option: @@ -1160,6 +1177,9 @@ components: - $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' replace: [] + id: snowflake.grant.grant_options + name: grant_options + title: Grant Options grants_to: methods: list_grants_to: @@ -1175,6 +1195,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.grant.grants_to + name: grants_to + title: Grants To security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml b/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml index a7eff761..2aaa5d95 100644 --- a/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml +++ b/providers/src/snowflake/v00.00.00000/services/iceberg-table.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Iceberg Table API @@ -1213,12 +1215,13 @@ components: type: string required: - referenced_table_name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1396,11 +1399,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1809,10 +1827,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: iceberg_tables: methods: @@ -1922,6 +1936,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/image-repository.yaml b/providers/src/snowflake/v00.00.00000/services/image-repository.yaml index 64662a05..41729eb1 100644 --- a/providers/src/snowflake/v00.00.00000/services/image-repository.yaml +++ b/providers/src/snowflake/v00.00.00000/services/image-repository.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Image Repository API @@ -299,12 +301,13 @@ components: owner_role_type: ADMIN required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -482,11 +485,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -895,10 +913,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: image_repositories: methods: @@ -936,6 +950,9 @@ components: 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: @@ -951,6 +968,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.image_repository.images + name: images + title: Images security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/managed-account.yaml b/providers/src/snowflake/v00.00.00000/services/managed-account.yaml index 2a27fa15..9bfb1b87 100644 --- a/providers/src/snowflake/v00.00.00000/services/managed-account.yaml +++ b/providers/src/snowflake/v00.00.00000/services/managed-account.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Managed Account API @@ -209,12 +211,13 @@ components: - admin_name - admin_password - account_type - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -392,11 +395,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -805,10 +823,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: managed_accounts: methods: @@ -839,6 +853,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/network-policy.yaml b/providers/src/snowflake/v00.00.00000/services/network-policy.yaml index dd306744..c9494684 100644 --- a/providers/src/snowflake/v00.00.00000/services/network-policy.yaml +++ b/providers/src/snowflake/v00.00.00000/services/network-policy.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Network Policy API @@ -237,12 +239,13 @@ components: description: The type of role that owns the network policy required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -848,10 +851,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: network_policies: methods: @@ -889,3 +888,6 @@ components: 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 index 74f8dd1a..a43abca9 100644 --- a/providers/src/snowflake/v00.00.00000/services/notebook.yaml +++ b/providers/src/snowflake/v00.00.00000/services/notebook.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Notebook API @@ -553,12 +555,13 @@ components: type: string readOnly: true description: The default/last version git commit# - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -736,11 +739,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1149,10 +1167,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: notebooks: methods: @@ -1214,6 +1228,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/notebooks/methods/delete_notebook' replace: [] + id: snowflake.notebook.notebooks + name: notebooks + title: Notebooks security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml b/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml index 1e6a969f..0bbc9f22 100644 --- a/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml +++ b/providers/src/snowflake/v00.00.00000/services/notification-integration.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Notification Integration API @@ -388,12 +390,13 @@ components: readOnly: true description: Google Cloud Platform (GCP) service account created for your account. - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -571,11 +574,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -984,10 +1002,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: notification_integrations: methods: @@ -1025,6 +1039,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/pipe.yaml b/providers/src/snowflake/v00.00.00000/services/pipe.yaml index f9729ef8..667d02cf 100644 --- a/providers/src/snowflake/v00.00.00000/services/pipe.yaml +++ b/providers/src/snowflake/v00.00.00000/services/pipe.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Pipe API @@ -326,12 +328,13 @@ components: required: - name - copy_statement - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -509,11 +512,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -922,10 +940,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: pipes: methods: @@ -969,6 +983,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/pipes/methods/delete_pipe' replace: [] + id: snowflake.pipe.pipes + name: pipes + title: Pipes security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/procedure.yaml b/providers/src/snowflake/v00.00.00000/services/procedure.yaml index 65861412..0f3920c5 100644 --- a/providers/src/snowflake/v00.00.00000/services/procedure.yaml +++ b/providers/src/snowflake/v00.00.00000/services/procedure.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Procedure API @@ -804,12 +806,13 @@ components: - name - datatype - value - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -987,11 +990,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1400,10 +1418,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: procedures: methods: @@ -1447,6 +1461,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/procedures/methods/delete_procedure' replace: [] + id: snowflake.procedure.procedures + name: procedures + title: Procedures security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/result.yaml b/providers/src/snowflake/v00.00.00000/services/result.yaml index 0055df37..67cccb40 100644 --- a/providers/src/snowflake/v00.00.00000/services/result.yaml +++ b/providers/src/snowflake/v00.00.00000/services/result.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Result API @@ -73,18 +75,34 @@ paths: components: securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/SnowflakeOAuth' + type: oauth2 + flows: + implicit: + authorizationUrl: /oauth/authorize + scopes: {} + description: Set `X-Snowflake-Authorization-Token-Type` to `OAUTH` if the token + is snowflakeOAuth schemas: - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -668,10 +686,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: results: methods: @@ -682,12 +696,14 @@ components: mediaType: application/json openAPIDocKey: '200' sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/results/methods/fetch_result' + select: [] insert: [] update: [] delete: [] replace: [] + id: snowflake.result.results + name: results + title: Results security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/role.yaml b/providers/src/snowflake/v00.00.00000/services/role.yaml index 2b37f0ad..1bba5e76 100644 --- a/providers/src/snowflake/v00.00.00000/services/role.yaml +++ b/providers/src/snowflake/v00.00.00000/services/role.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Role API @@ -710,12 +712,13 @@ components: type: string readOnly: true description: Type of the role that granted this privilege to this grantee - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -893,11 +896,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1306,10 +1324,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: roles: methods: @@ -1340,6 +1354,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/roles/methods/delete_role' replace: [] + id: snowflake.role.roles + name: roles + title: Roles grants: methods: list_grants: @@ -1369,6 +1386,9 @@ components: 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: @@ -1384,6 +1404,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.role.grants_of + name: grants_of + title: Grants Of grants_on: methods: list_grants_on: @@ -1399,6 +1422,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.role.grants_on + name: grants_on + title: Grants On future_grants: methods: list_future_grants: @@ -1428,6 +1454,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/schema.yaml b/providers/src/snowflake/v00.00.00000/services/schema.yaml index e038fad0..629f1944 100644 --- a/providers/src/snowflake/v00.00.00000/services/schema.yaml +++ b/providers/src/snowflake/v00.00.00000/services/schema.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Schema API @@ -510,12 +512,13 @@ components: properties: point_of_time: $ref: '#/components/schemas/PointOfTime' - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -693,11 +696,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1106,10 +1124,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: schemas: methods: @@ -1166,6 +1180,9 @@ components: - $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: [] 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 aeec1b52..00000000 --- a/providers/src/snowflake/v00.00.00000/services/service.yaml +++ /dev/null @@ -1,1967 +0,0 @@ -openapi: 3.0.0 -servers: -- url: https://{organization}.snowflakecomputing.com/ - variables: - organization: - default: org-account -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}/schemas/{schema}/services: - get: - summary: List services - tags: - - service - description: Lists the services under the database and schema. - operationId: listServices - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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' - - $ref: '#/components/parameters/schema' - - 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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - 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}/schemas/{schema}/services/{name}: - get: - description: Fetch a service. - tags: - - service - operationId: fetchService - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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' - - $ref: '#/components/parameters/schema' - - $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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}/logs: - get: - description: Fetch the logs for a given service. - tags: - - service - operationId: fetchServiceLogs - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}/status: - get: - description: Fetch the status for a given service. - tags: - - service - operationId: fetchServiceStatus - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}/containers: - get: - description: List all the containers of the service - tags: - - service - operationId: listServiceContainers - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}/instances: - get: - description: List all the instances of the service - tags: - - service - operationId: listServiceInstances - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}/roles: - get: - description: List all the service roles of the service - tags: - - service - operationId: listServiceRoles - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}:resume: - post: - description: Resume a service. - tags: - - service - operationId: resumeService - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/services/{name}:suspend: - post: - description: Suspend a service. - tags: - - service - operationId: suspendService - parameters: - - $ref: '#/components/parameters/database' - - $ref: '#/components/parameters/schema' - - $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}/schemas/{schema}/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' - - $ref: '#/components/parameters/schema' - - $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: database - 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: schema - 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 - description: 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. - Identifier: - type: string - description: A Snowflake object identifier. - 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: - $ref: '#/components/securitySchemes/KeyPair' - ExternalOAuth: - $ref: '#/components/securitySchemes/ExternalOAuth' - SnowflakeOAuth: - $ref: '#/components/securitySchemes/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' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] - x-stackQL-resources: - services: - methods: - list_services: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services/post' - response: - mediaType: '' - openAPIDocKey: '200' - execute_job_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services:execute-job/post' - response: - mediaType: '' - openAPIDocKey: '200' - fetch_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create_or_alter_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services~1{name}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services~1{name}/delete' - response: - mediaType: '' - openAPIDocKey: '200' - resume_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~1services~1{name}:resume/post' - response: - mediaType: '' - openAPIDocKey: '200' - suspend_service: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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' - logs: - methods: - fetch_service_logs: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - status: - methods: - fetch_service_status: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - containers: - methods: - list_service_containers: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - instances: - methods: - list_service_instances: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - roles: - methods: - list_service_roles: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - grants_of: - methods: - list_service_role_grants_of: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - grants: - methods: - list_service_role_grants_to: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] - endpoints: - methods: - show_service_endpoints: - operation: - $ref: '#/paths/~1api~1v2~1databases~1{database}~1schemas~1{schema}~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: [] -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 87d6711c..4ed63e8a 100644 --- a/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml +++ b/providers/src/snowflake/v00.00.00000/services/sqlapi.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 2.0.0 title: Snowflake SQL API @@ -622,12 +624,13 @@ components: description: Number of duplicate rows that were updated. minimum: 0 example: 20 - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1106,30 +1109,19 @@ components: description: Snowflake session token. example: ver:3-hint:1000-ABCD= securitySchemes: - keyPair: + 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. + 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 (refer to docs). Set X-Snowflake-Authorization-Token-Type - to OAUTH and set the Token to auth token received from the external Auth server. - snowflakeOAuth: - type: oauth2 - flows: - implicit: - authorizationUrl: /oauth/authorize - scopes: {} - 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: 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: @@ -1260,10 +1252,6 @@ components: schema: type: string format: uuid - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: statements: methods: @@ -1293,6 +1281,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.sqlapi.statements + name: statements + title: Statements security: - keyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/stage.yaml b/providers/src/snowflake/v00.00.00000/services/stage.yaml index 884e2620..b90568ec 100644 --- a/providers/src/snowflake/v00.00.00000/services/stage.yaml +++ b/providers/src/snowflake/v00.00.00000/services/stage.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Stage API @@ -495,12 +497,13 @@ components: format: password description: Specifies the SAS (shared access signature) token for connecting to Azure. - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -678,11 +681,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1091,10 +1109,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: stages: methods: @@ -1132,6 +1146,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/stages/methods/delete_stage' replace: [] + id: snowflake.stage.stages + name: stages + title: Stages files: methods: list_files: @@ -1147,6 +1164,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.stage.files + name: files + title: Files presigned_url: methods: get_presigned_url: @@ -1162,6 +1182,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.stage.presigned_url + name: presigned_url + title: Presigned Url security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/stream.yaml b/providers/src/snowflake/v00.00.00000/services/streams.yaml similarity index 98% rename from providers/src/snowflake/v00.00.00000/services/stream.yaml rename to providers/src/snowflake/v00.00.00000/services/streams.yaml index cf31a5d5..05164d64 100644 --- a/providers/src/snowflake/v00.00.00000/services/stream.yaml +++ b/providers/src/snowflake/v00.00.00000/services/streams.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Stream API @@ -495,12 +497,13 @@ components: description: user comment associated to an object in the dictionary required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1044,10 +1047,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: streams: methods: @@ -1091,3 +1090,6 @@ components: 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 index d0a5c5b6..1484fcea 100644 --- a/providers/src/snowflake/v00.00.00000/services/table.yaml +++ b/providers/src/snowflake/v00.00.00000/services/table.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Table API @@ -1220,12 +1222,13 @@ components: type: string description: Specifies the name for the table, must be unique for the schema in which the table is created - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1403,11 +1406,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1816,10 +1834,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: tables: methods: @@ -1951,6 +1965,9 @@ components: - $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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/task.yaml b/providers/src/snowflake/v00.00.00000/services/task.yaml index 499a375d..9f02fe42 100644 --- a/providers/src/snowflake/v00.00.00000/services/task.yaml +++ b/providers/src/snowflake/v00.00.00000/services/task.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Task API @@ -939,12 +941,13 @@ components: minutes: 10 required: - minutes - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -1122,11 +1125,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1535,10 +1553,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: tasks: methods: @@ -1601,6 +1615,9 @@ components: - $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: @@ -1616,6 +1633,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.task.dependents + name: dependents + title: Dependents current_graphs: methods: get_current_graphs_deprecated: @@ -1638,6 +1658,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.task.current_graphs + name: current_graphs + title: Current Graphs complete_graphs: methods: get_complete_graphs_deprecated: @@ -1660,6 +1683,9 @@ components: update: [] delete: [] replace: [] + id: snowflake.task.complete_graphs + name: complete_graphs + title: Complete Graphs security: - KeyPair: [] - ExternalOAuth: [] 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 index 8130f78f..6a8e22eb 100644 --- a/providers/src/snowflake/v00.00.00000/services/user-defined-function.yaml +++ b/providers/src/snowflake/v00.00.00000/services/user-defined-function.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake User Defined Function API @@ -755,12 +757,13 @@ components: SQLFunction: allOf: - $ref: '#/components/schemas/FunctionLanguage' - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -938,11 +941,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1351,10 +1369,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: user_defined_functions: methods: @@ -1398,6 +1412,9 @@ components: 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: [] diff --git a/providers/src/snowflake/v00.00.00000/services/user.yaml b/providers/src/snowflake/v00.00.00000/services/user.yaml index 5076d041..633975b4 100644 --- a/providers/src/snowflake/v00.00.00000/services/user.yaml +++ b/providers/src/snowflake/v00.00.00000/services/user.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake User API @@ -592,12 +594,13 @@ components: default: false description: Whether or not to flush the custom landing page of the user on next UI load - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -775,11 +778,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1188,10 +1206,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: users: methods: @@ -1236,6 +1250,9 @@ components: - $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: @@ -1265,6 +1282,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/grants/methods/revoke_grants' replace: [] + id: snowflake.user.grants + name: grants + title: Grants security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/view.yaml b/providers/src/snowflake/v00.00.00000/services/view.yaml index 5f9b10a0..0ad9f4b0 100644 --- a/providers/src/snowflake/v00.00.00000/services/view.yaml +++ b/providers/src/snowflake/v00.00.00000/services/view.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake View API @@ -279,12 +281,13 @@ components: description: The data type for the column required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -462,11 +465,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -875,10 +893,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: views: methods: @@ -916,6 +930,9 @@ components: delete: - $ref: '#/components/x-stackQL-resources/views/methods/delete_view' replace: [] + id: snowflake.view.views + name: views + title: Views security: - KeyPair: [] - ExternalOAuth: [] diff --git a/providers/src/snowflake/v00.00.00000/services/warehouse.yaml b/providers/src/snowflake/v00.00.00000/services/warehouse.yaml index 120cbd6d..98c720f9 100644 --- a/providers/src/snowflake/v00.00.00000/services/warehouse.yaml +++ b/providers/src/snowflake/v00.00.00000/services/warehouse.yaml @@ -1,9 +1,11 @@ openapi: 3.0.0 servers: -- url: https://{organization}.snowflakecomputing.com/ +- url: https://{endpoint}.snowflakecomputing.com + description: Multi-tenant Snowflake endpoint variables: - organization: - default: org-account + endpoint: + default: orgid-acctid + description: Organization and Account Name info: version: 0.0.1 title: Snowflake Warehouse API @@ -722,12 +724,13 @@ components: 3X-Large, 4X-Large, 5X-Large, 6X-Large' required: - name - description: 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. Identifier: type: string - description: A Snowflake object identifier. + 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: @@ -905,11 +908,26 @@ components: - $ref: '#/components/schemas/TargetLag' securitySchemes: KeyPair: - $ref: '#/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: - $ref: '#/components/securitySchemes/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: - $ref: '#/components/securitySchemes/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: database @@ -1318,10 +1336,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - security: - - KeyPair: [] - - ExternalOAuth: [] - - SnowflakeOAuth: [] x-stackQL-resources: warehouses: methods: @@ -1408,6 +1422,9 @@ components: - $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: []