corestack_ external_ db_ enable
Turn on external database access.
When to use it
Turn on external database access for an environment, so an outside system (an order system, an ERP or a reporting tool) can connect to its database with its own external user. It gives the environment a fixed public address and a host name such as example-furniture-co-uk-db.cfstack.io, reachable only from the addresses you list; MariaDB itself stays private.
It costs £15.00 / month on the environment's contract (the Dedicated IP address add-on), from when access is on until it is turned off; a contract still in its trial is not charged until the trial ends. Tell the person the price, and send confirm_cost: true only after they agreed. Turning it on needs the site's billing rights: an agency that manages the site but does not pay for it asks the site's owner.
The first turn-on of an environment waits for its nightly maintenance window: the call answers at once with no task, {"operation": null,, whose status is tonight and window_date the night it applies; the night bills the charge confirmed now. If that charge cannot be checked at night and the price has changed since, the turn-on is not applied: corestack_pending_changes_list shows the change failed with "The monthly charge for external access changed after it was confirmed…", and the person confirms the new charge by turning access on again. Later turn-ons answer a task and apply within minutes. Then add external users with corestack_external_db_user_add.
Ask for it
Using the Corefinity MCP server, call corestack_external_db_enable with site_id 4211, sources [{"cidr":"203.0.113.10/32","label":"Order system"}]. (Turn on external database access.) Tell me what it returned.Inputs
true: the person agreed to the £15.00 / month charge.
At least 1.
The addresses that may connect: at least one. Each is {"cidr": "203.0.113.10/: a public IPv4 address or block from /32 to /28, written from its first address. Private, shared, loopback, link-local, multicast and reserved ranges are refused, and so is the whole internet.
Fields of each item
A public IPv4 address or block from /32 to /28, e.g. 203.0.113.10/32.
What the address is, e.g. "Order system".
Example call
{
"name": "corestack_external_db_enable",
"arguments": {
"site_id": 4211,
"sources": [
{
"cidr": "203.0.113.10/32",
"label": "Order system"
}
],
"confirm_cost": true
}
}If it is refused
| Reason | What to do |
|---|---|
billing_forbidden | The person cannot change this site's billing; the site's owner turns it on. |
invalid_arguments | An address breaks the rules above, a duplicate, more than 10, no address at all, or confirm_cost is not true; fields names each. |
currency_unpublished | The contract's currency has no published price for the add-on yet. |
external_db_not_available | This environment cannot take external access yet; Corefinity support can say when. |
external_db_already_on | External access is on already (or turning on); change its addresses with corestack_external_db_sources_set. |
external_db_failed | The last change to external access failed; Corefinity support retries or releases it. |
busy | Another change to this environment is applying. |
deleted | The site is deleted (in its grace period). |
provisioning | The site is still being created. |
demo_keep_required | The site or cluster is a free demo that is not kept yet, and the dedicated database address costs money: it starts once the demo is kept. Ask the person to keep it (corestack_demo_keep, or open keep_url); change names this change and what it would cost a month once kept. |
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |