Region Selections with the SkySQL DBaaS API
This page is part of MariaDB's Documentation.
The parent of this page is: Launch-Time Selections for the SkySQL DBaaS API
Topics on this page:
Overview
This reference page details how to select regions with the SkySQL DBaaS API for SkySQL.
SkySQL is available in regions worldwide on Amazon AWS and Google GCP.
Available Regions
Region choices are specific to cloud provider and topology.
Please contact us to request support for new regions.
AWS Regions
Region | Location |
---|---|
Tokyo, Japan | |
Seoul, South Korea | |
Jurong West, Singapore | |
Sydney, Australia | |
Montréal, Québec, Canada | |
Frankfurt, Germany | |
Stockholm, Sweden | |
Dublin, Ireland | |
London, England, UK | |
Paris, France | |
Northern Virginia, USA | |
Ohio, USA | |
Oregon, USA |
GCP Regions
Region | Location |
---|---|
Tokyo, Japan | |
Mumbai, India | |
Jurong West, Singapore | |
Jakarta, Indonesia | |
Sydney, Australia | |
Hamina, Finland | |
St. Ghislain, Belgium | |
London, England, UK | |
Frankfurt, Germany | |
Eemshaven, Netherlands | |
Paris, France | |
Montréal, Québec, Canada | |
Council Bluffs, Iowa, USA | |
Moncks Corner, South Carolina, USA | |
Ashburn (Loudoun County), Virginia, USA | |
The Dalles, Oregon, USA | |
Las Vegas, Nevada, USA |
REST Client
A REST client can use the SkySQL DBaaS API to query region selections and choose a region for a new service.
Query Options with REST Client
A REST client can query the SkySQL DBaaS API for the region selections for a specific cloud provider.
To see the available regions for a cloud provider, use curl
to call the /provisioning/v1/regions
API endpoint:
$ curl -sS --location \
--header "Authorization: Bearer ${SKYSQL_API_KEY}" \
'https://api.mariadb.com/provisioning/v1/regions?provider=gcp' \
| jq .
[
{
"id": "f8803104-f112-48d4-94c5-23528e85c5b6",
"name": "europe-north1",
"region": "EMEA",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "f1ab810f-36e2-42f7-a177-877b957b692e",
"name": "us-west1",
"region": "Americas",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "d92886c9-5760-42d4-8e2a-216f50a330c2",
"name": "europe-west2",
"region": "EMEA",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "c7921e34-85fd-4b05-9ece-09330cc0b180",
"name": "europe-west9",
"region": "EMEA",
"default": false,
"provider": "gcp"
},
{
"id": "afb4c460-abb8-40f3-b762-c5666c1aa203",
"name": "australia-southeast1",
"region": "APAC",
"default": false,
"provider": "gcp"
},
{
"id": "a85d88a2-372d-477d-a745-17d7800bec5d",
"name": "asia-southeast1",
"region": "APAC",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "9b0cb0de-cbd8-4588-99c3-aa8b645d074e",
"name": "asia-northeast1",
"region": "APAC",
"default": false,
"provider": "gcp"
},
{
"id": "79990078-7ca1-4d81-91bd-22b9ce9e0d3b",
"name": "us-east4",
"region": "Americas",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "76360065-b4ce-4284-a57c-fe0292d2c270",
"name": "us-central1",
"region": "Americas",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "66ac8353-42c9-4307-9a05-5cb64c2ab78f",
"name": "asia-south1",
"region": "APAC",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "64e248c4-2cf0-4bd8-a607-3c1ecc55a268",
"name": "europe-west4",
"region": "EMEA",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "507d5840-3a16-47a2-b37c-7fcaa7461a66",
"name": "us-west4",
"region": "Americas",
"default": false,
"provider": "gcp"
},
{
"id": "415a6836-9bef-4f14-bae1-90b2e3daf515",
"name": "europe-west3",
"region": "EMEA",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "3d2af2de-d8d4-494c-b821-a5ffd08218a2",
"name": "europe-west1",
"region": "EMEA",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "2afc522f-cfb5-47ca-867a-65185fdfc9d4",
"name": "us-east1",
"region": "Americas",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "2958a219-c625-407c-9854-c7fe99de4ea8",
"name": "asia-southeast2",
"region": "APAC",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
},
{
"id": "005e61cf-0409-4e52-806b-15567982b7f6",
"name": "northamerica-northeast1",
"region": "Americas",
"default": false,
"provider": "gcp",
"foundation_tier_maintenance_window": "..."
}
]
The output can show different regions, depending on whether your SkySQL account is Foundation tier or Power tier.
For the region that you would like to select, extract the name
attribute from the output and provide that value to the /provisioning/v1/services
API endpoint as the region
attribute.
Select Option with REST Client
A region is selected during service launch. When using a REST client, select a region by calling the /provisioning/v1/services
API endpoint with the region
attribute set.
For example, prepare a request body containing the desired service options in a file called request-service.json
:
$ cat > request-service.json <<EOF
{
"service_type": "transactional",
"topology": "es-single",
"provider": "gcp",
"region": "us-central1",
"architecture": "amd64",
"size": "sky-2x8",
"storage": 100,
"nodes": 1,
"version": "10.6.11-6-1",
"name": "skysql-nr-quickstart",
"ssl_enabled": true
}
EOF
Then use curl
to call the /provisioning/v1/services
API endpoint to create (launch) a new database service and save the response to the response-service.json
file:
$ curl -sS --location --request POST \
--header "Authorization: Bearer ${SKYSQL_API_KEY}" \
--header "Accept: application/json" \
--header "Content-type: application/json" \
--data '@request-service.json' \
https://api.mariadb.com/provisioning/v1/services \
| tee response-service.json | jq .
Upon success, the command will return JSON with details about the new service.
Terraform
Terraform can use the SkySQL Terraform provider to choose a region for a new service. When using Terraform, select a region using the region
attribute for the skysql_service
resource:
# Create a service
resource "skysql_service" "default" {
service_type = "transactional"
topology = "es-single"
cloud_provider = "gcp"
region = "us-central1"
architecture = "amd64"
size = "sky-2x8"
storage = 100
nodes = 1
version = "10.6.11-6-1"
name = "skysql-nr-quickstart"
ssl_enabled = true
deletion_protection = true
wait_for_creation = true
wait_for_deletion = true
wait_for_update = true
is_active = true
}