openapi: 3.0.0 servers: - description: Snowflake Database API url: https://org-account.snowflakecomputing.com info: version: 0.0.1 title: Snowflake Database API description: The Snowflake Database API is a REST API that you can use to access, update, and perform certain actions on Database resource in Snowflake. contact: name: Snowflake, Inc. url: https://snowflake.com email: support@snowflake.com paths: /api/v2/databases: get: summary: List databases. tags: - database description: Lists the accessible databases. operationId: listDatabases parameters: - $ref: common.yaml#/components/parameters/like - $ref: common.yaml#/components/parameters/startsWith - $ref: common.yaml#/components/parameters/showLimit - $ref: common.yaml#/components/parameters/fromName - name: history in: query description: Optionally includes dropped databases that have not yet been purged. schema: type: boolean responses: '200': description: Successful request. headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/Database' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout post: summary: Create a database. tags: - database description: Creates a database, with modifiers as query parameters. You must provide the full database definition when creating a database. operationId: createDatabase parameters: - $ref: common.yaml#/components/parameters/createMode - name: kind in: query description: Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). schema: type: string deprecated: true requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Database' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases:from-share: post: summary: Create a database from a share. tags: - database description: Creates a database from a given share. operationId: createDatabaseFromShare parameters: - $ref: common.yaml#/components/parameters/createMode - name: share in: query description: ID of the share from which to create the database, in the form ".". schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DatabaseFromShare' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}:from_share: post: summary: Create a database from a share. tags: - database description: Creates a database from a given share. operationId: createDatabaseFromShareDeprecated parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/createMode - name: share in: query description: ID of the share from which to create the database, in the form ".". schema: type: string responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout deprecated: true /api/v2/databases/{name}:clone: post: summary: Clone a database. tags: - database description: Clones an existing database, with modifiers as query parameters. You must provide the full database definition when cloning an existing database. operationId: cloneDatabase parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/createMode - name: kind in: query description: Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). schema: type: string deprecated: true requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DatabaseClone' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}: get: tags: - database description: Fetches a database. operationId: fetchDatabase parameters: - $ref: common.yaml#/components/parameters/name responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: $ref: '#/components/schemas/Database' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout put: summary: Create a new, or alters an existing, database. tags: - database description: Creates a new, or alters an existing, database. You must provide the full database definition even when altering an existing database. operationId: createOrAlterDatabase parameters: - $ref: common.yaml#/components/parameters/name requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Database' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout delete: summary: Delete a database. tags: - database description: Deletes the specified database. If you enable the `ifExists` parameter, the operation succeeds even if the database does not exist. Otherwise, a 404 failure is returned if the database does not exist. if the drop is unsuccessful. operationId: deleteDatabase parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists - name: restrict in: query description: 'Whether to drop the database if foreign keys exist that reference any tables in the database. - `true`: Return a warning about existing foreign key references and don''t drop the database. - `false`: Drop the database and all objects in the database, including tables with primary or unique keys that are referenced by foreign keys in other tables.' schema: type: boolean default: false responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}:undrop: post: summary: Undrop a database. tags: - database description: Undrops database. operationId: undropDatabase parameters: - $ref: common.yaml#/components/parameters/name responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/replication:enable: post: summary: Enable database replication. tags: - database description: Promotes a local database to serve as a primary database for replication. A primary database can be replicated in one or more accounts, allowing users in those accounts to query objects in each secondary (i.e. replica) database. operationId: enableDatabaseReplication parameters: - $ref: common.yaml#/components/parameters/name - name: ignore_edition_check in: query description: 'Whether to allow replicating data to accounts on lower editions. Default: `true`. For more information, see the ALTER DATABASE reference.' schema: type: boolean requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AccountIdentifiers' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/replication:disable: post: summary: Disable database replication. tags: - database description: Disables replication for this primary database, meaning no replica of this database (i.e. secondary database) in another account can be refreshed. Any secondary databases remain linked to the primary database, but requests to refresh a secondary database are denied. operationId: disableDatabaseReplication parameters: - $ref: common.yaml#/components/parameters/name requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountIdentifiers' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/replication:refresh: post: summary: Refresh database replications. tags: - database description: 'Refreshes a secondary database from a snapshot of its primary database. A snapshot includes changes to the objects and data. If you call this endpoint while another refresh for the same replica database is running, it fails and returns an error. Snowflake ensures only one refresh is executed at any given time.' operationId: refreshDatabaseReplication parameters: - $ref: common.yaml#/components/parameters/name responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/failover:enable: post: summary: Enable database failover. tags: - database description: Specifies a comma-separated list of accounts in your organization where a replica of this primary database can be promoted to serve as the primary database. operationId: enableDatabaseFailover parameters: - $ref: common.yaml#/components/parameters/name requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AccountIdentifiers' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/failover:disable: post: summary: Disable database failover. tags: - database description: Disables failover for this primary database, meaning no replica of this database (i.e. secondary database) can be promoted to serve as the primary database. operationId: disableDatabaseFailover parameters: - $ref: common.yaml#/components/parameters/name requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountIdentifiers' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}/failover:primary: post: summary: Set a primary database. tags: - database description: Promotes the specified secondary (replica) database to serve as the primary database. When promoted, the database becomes writeable. At the same time, the previous primary database becomes a read-only secondary database. operationId: primaryDatabaseFailover parameters: - $ref: common.yaml#/components/parameters/name responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{name}:set-tags: post: summary: Set tags on a database. tags: - database description: Set tags on a database. operationId: setTags parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout requestBody: required: true content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagAssignment /api/v2/databases/{name}:unset-tags: post: summary: Unset tags from a database. tags: - database description: Unset tags from a database. operationId: unsetTags parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout requestBody: required: true content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagReference /api/v2/databases/{name}:get-tags: get: summary: Get the tag assignments for a database. tags: - database description: Returns all tags assigned to a database. This operation requires an active warehouse. operationId: getTags parameters: - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/withLineage responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagAssignment '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '410': $ref: common.yaml#/components/responses/410Gone '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout components: schemas: AccountIdentifiers: type: object description: Array of unique account identifiers. properties: accounts: type: array items: type: string minLength: 1 example: accounts: - accountName1 - accountName2 required: - accounts Database: type: object description: Snowflake database object. properties: created_on: type: string format: date-time readOnly: true description: Date and time the database was created. name: $ref: ./common.yaml#/components/schemas/Identifier description: Name of the database. kind: type: string enum: - PERMANENT - TRANSIENT default: PERMANENT description: Database type, permanent (default) or transient. is_default: type: boolean readOnly: true description: Whether the database is the default database for a user. is_current: type: boolean readOnly: true description: Current database for the session. origin: type: string readOnly: true owner: type: string readOnly: true description: Name of the role that owns the database. comment: type: string description: Optional comment in which to store information related to the database. options: type: string readOnly: true retention_time: type: integer readOnly: true description: Number of days that historical data is retained for Time Travel. dropped_on: type: string format: date-time readOnly: true nullable: true description: Date and time the database was dropped. budget: type: string readOnly: true description: Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects. owner_role_type: type: string readOnly: true description: Type of role that owns the object, either ROLE or DATABASE_ROLE data_retention_time_in_days: type: integer description: Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the database, as well as specifying the default Time Travel retention time for all schemas created in the database. default_ddl_collation: type: string description: Default collation specification for all schemas and tables added to the database. You an override the default at the schema and individual table levels. log_level: type: string description: Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` and `OFF`. max_data_extension_time_in_days: type: integer description: Maximum number of days for which Snowflake can extend the data retention period for tables in the database to prevent streams on the tables from becoming stale. suspend_task_after_num_failures: type: integer description: Maximum number of consecutive failed task runs before the current task is suspended automatically. trace_level: type: string description: How trace events are ingested into the event table. Currently, Snowflake supports only `ALWAYS`, `ON_EVENT`, and `OFF`. user_task_managed_initial_warehouse_size: type: string description: Size of the compute resources to provision for the first run of the serverless task, before a task history is available for Snowflake to determine an ideal size. user_task_timeout_ms: type: integer description: Time limit, in milliseconds, for a single run of the task before it times out. serverless_task_min_statement_size: type: string description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. serverless_task_max_statement_size: type: string description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. external_volume: type: string nullable: true description: Default external volume for Iceberg tables in this database. catalog: type: string nullable: true description: Default catalog integration for Iceberg tables in this database. iceberg_version_default: type: integer nullable: true description: Default Apache Iceberg specification version (2 or 3). iceberg_merge_on_read_behavior: type: string nullable: true description: Row-level update strategy for Iceberg tables (auto, enabled, disabled). storage_serialization_policy: type: string nullable: true description: Storage serialization policy for Iceberg tables (COMPATIBLE or OPTIMIZED). catalog_sync: type: string nullable: true description: Catalog integration to sync Snowflake-managed Iceberg tables with. enable_data_compaction: type: boolean nullable: true description: Whether automatic data compaction is enabled for Iceberg tables. replace_invalid_characters: type: boolean nullable: true description: Whether to replace invalid UTF-8 characters with the replacement character. classification_profile: type: string nullable: true readOnly: true description: Classification profile associated with this database. catalog_sync_namespace_mode: type: string nullable: true description: Namespace mode used when syncing this database to an external catalog (nest or flatten). catalog_sync_namespace_flatten_delimiter: type: string nullable: true description: Delimiter used to flatten namespaces when catalog_sync_namespace_mode is flatten. object_visibility: type: object additionalProperties: true nullable: true description: Object visibility configuration for this database, as set via OBJECT_VISIBILITY (e.g. privileged_visibility, organization_targets, set_domain). required: - name DatabaseClone: type: object description: Clone database. allOf: - $ref: '#/components/schemas/Database' properties: point_of_time: $ref: common.yaml#/components/schemas/PointOfTime DatabaseFromShare: type: object description: Database from share. properties: name: $ref: ./common.yaml#/components/schemas/Identifier description: Name of the database. securitySchemes: KeyPair: $ref: common.yaml#/components/securitySchemes/KeyPair ExternalOAuth: $ref: common.yaml#/components/securitySchemes/ExternalOAuth SnowflakeOAuth: $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth ProgrammaticAccessToken: $ref: common.yaml#/components/securitySchemes/ProgrammaticAccessToken security: - KeyPair: [] - ExternalOAuth: [] - SnowflakeOAuth: [] - ProgrammaticAccessToken: []