Data Stores
Goal: Know what the Data Stores window does, and where each part of a database is managed.
This window opens as a panel: it floats at the right at first, docks anywhere, and keeps your place when you move it. See Node editors and work windows as panels.
Cloud -> Data Stores manages accounts: the CosmosDB accounts your workspace creates in your own Azure subscription. It is not where databases or containers are made:
| Level | Where you manage it |
|---|---|
| Account | Cloud -> Data Stores (this window) |
| Database | A Database node on the canvas that names the account |
| Container | Manage containers in that node's inspector - see Database Containers |
The fields, the scaling profiles, the region rule and what an account is not for are in CosmosDB Setup. This page covers the window itself.
Before you start
- A connected cloud and a provisioned private landing zone. Until both exist the menu has no Data Stores. An empty region list in the form is the usual sign that one is missing.
What the window shows
| Part | What it is |
|---|---|
| Latest deployment | The newest save from this window, followed until it ends |
| What is running now | With nothing running, the health of the accounts this window built |
| The hero | CosmosDB accounts, with a strip under it: Documents, not telemetry, Nothing to paste and In your own cloud |
| Proposal banner | "An agent has proposed a data store" (or several), with each one and the agent's reason |
| Accounts | One row per account: its name, region and scaling profile, its state, and its actions |
| The account form | Hidden until you ask for it. One form creates an account, finishes one, or edits a live one |
| What you get | Inside the account form, collapsed: what provisioning creates, and what to do next |
| Before you start | Inside the account form, collapsed: what the account needs, and what it is not for |
| History | "All databases: every change, not filtered by database." |
| Cost | Under each account, what it is estimated to cost. When it cannot be read, one sentence says why, for example "Its cost could not be read just now. Try again in a minute." |
With no accounts yet, the window says its one sentence: "This workspace has no data stores yet. Add one here to store your records."
The buttons
| Button | Where | What it does |
|---|---|---|
| Create your first account / Add account | The Accounts header | Opens a blank form |
| Save & Provision | The form | Creates the account, or finishes one, in your Azure subscription |
| Save & Apply | The form, on a live account | Saves your changes and re-runs provisioning against the account |
| Accept Proposal and Save | The form, on a proposal | Accepts the proposal, then provisions it, in one press |
| Reject Proposal | The form, on a proposal | Asks "Reject this proposal? Nothing is created in Azure." and removes it, with any account bundled with it |
| Cancel | The form | Closes the form and clears it |
| Finish setup | An account row | Opens an account whose provisioning has not run |
| Review Proposal | An account row | Opens a proposed account in the form |
| Try again | An account row | Opens an account whose provisioning reported an error |
| Edit settings | An account row | Opens a live account: name, description, scaling profile, backup and Protect from deletion can change; region, resource group and API cannot |
| Remove | An account row | Removes the account, after one confirmation (see Removing an account) |
Save and Deploy
Save & Provision and Save & Apply build in your Azure subscription at once; they do not wait for Deploy. Provisioning runs in the background and the row updates as it completes; you do not have to keep the window open.
Removing an account
Remove on an account row asks once. The confirmation names the account and says what goes with it. For a live account it ends: "Deleting the account deletes every database and record in it." Databases still in the account are named at the top of the confirmation: remove those databases first, or remove them together. The removal says so too: "Remove its databases and containers with it, or the Deploy refuses:" and the databases' names. The Deploy copies each container's documents before anything is deleted, but only for the containers removed with the account; an account removed on its own is not deleted while a database still names it.
- An account that was never created in Azure has nothing to delete there, so it is removed at once, with no Deploy.
- A live account stays, keeps working and keeps billing until the next Deploy. Its row turns grey and says "Removed at the next Deploy, with its Azure account and everything in it. Until then it keeps working and keeps billing. To keep it, restore it in the Deploy window." In the Deploy window you choose whether a copy of its records is kept before the account is deleted, or restore it.
- An account with Protect from deletion on is refused: "This data store is delete-protected. Turn that off on the store itself before removing it." Nothing changes.
A refusal shows under the row it is about.
The account a database lives in
A Database node's Settings, in its inspector, show which account the database is linked to. Under Data store account they list Account name, Region and Provisioned for that account. They are read-only: the link is chosen in the account picker (until the database is deployed), and the region belongs to the account, since a database has no region of its own. A fact the account has not recorded yet reads Not recorded yet. With no account chosen, the list is not shown.
Rights
Save & Provision checks no access right beyond being in the workspace. Reading and writing documents is a separate grant - see Table endpoints.
Thinky and agents
Thinky and agents can propose an account: its name, description, notes, scaling profile, backup and delete protection at any time; its type, region, resource group and API only before it is created. A new account has to state its region. Only the NoSQL (SQL API) can be created today. Turning delete protection off needs a person: a proposal that does it is accepted only by a person who confirms it.
A proposed account shows in the proposal banner and as a highlighted row. Review Proposal opens it in the form, and Accept Proposal and Save accepts and provisions it. The Data Stores menu item counts pending account proposals.
Messages you may see
| Code | Message |
|---|---|
PRIVATE_LANDING_ZONE_REQUIRED | "This needs a private landing zone, which this workspace does not have yet." |
REGION_REQUIRED | A new account has to state its region, and one is never chosen for you. Open Cloud > Data Stores, open the account, choose its Region and save |
CREATE_TIME_ONLY_FIELD | Region, resource group and API cannot change once the account exists |
API_TYPE_NOT_PROVISIONABLE | Only NoSQL (SQL API) accounts can be created today |
ILLEGAL_TRANSITION | A backup change Azure does not allow (continuous back to periodic), or a switch to or from serverless |
DELETE_PROTECTION_DISABLE | Turning delete protection off needs a person to approve it |
DATA_STORE_HAS_DATABASES | Shown on the removal confirmation, naming the databases: "A data store cannot be removed while databases still live in it. Remove those databases first, or remove them together." |
DATA_STORE_DELETE_PROTECTED | "This data store is delete-protected. Turn that off on the store itself before removing it." |
| A failed provision | "Provisioning did not complete. Use Finish setup to try again." unless the platform named the reason |
Next steps
- The account fields -> CosmosDB Setup
- Containers -> Database Containers
- The order things unlock in -> Cloud
On fathym.com: OpenX databases →