Creates a database.

POST {{baseUrl}}/api/v2/databases?createMode=errorIfExists&kind=<string>

Creates a database, with modifiers as query parameters. You must provide the full database definition when creating a database.

Request Params

KeyDatatypeRequiredDescription
createModestringQuery 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. | | kind | string | | Type of database to create. Currently, Snowflake supports only transient and permanent (also represented by the empty string). |

Request Body

{"name"=>"Pv657gLOx", "created_on"=>"<dateTime>", "kind"=>"PERMANENT", "is_default"=>"<boolean>", "is_current"=>"<boolean>", "origin"=>"<string>", "owner"=>"<string>", "comment"=>"<string>", "options"=>"<string>", "retention_time"=>"<integer>", "dropped_on"=>"<dateTime>", "budget"=>"<string>", "owner_role_type"=>"<string>", "data_retention_time_in_days"=>"<integer>", "default_ddl_collation"=>"<string>", "log_level"=>"<string>", "max_data_extension_time_in_days"=>"<integer>", "suspend_task_after_num_failures"=>"<integer>", "trace_level"=>"<string>", "user_task_managed_initial_warehouse_size"=>"<string>", "user_task_timeout_ms"=>"<integer>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:&quot;\u003cstring\u003e&quot;}