Create a DBaaS Grafana service

POST /dbaas-grafana/{name}

Create a DBaaS Grafana service

Path parameters

  • name string Required

    Service name

    Minimum length is 0, maximum length is 63.

application/json

Body Required

  • Automatic maintenance settings

    Hide maintenance attributes Show maintenance attributes
    • dow string Required

      Day of week for installing updates

      Values are saturday, tuesday, never, wednesday, sunday, friday, monday, or thursday.

    • time string Required

      Time for installing updates, UTC

      Minimum length is 8, maximum length is 8.

  • plan string Required

    Subscription plan

    Minimum length is 1, maximum length is 128.

  • Service is protected against termination and powering off

  • Service name

    Minimum length is 0, maximum length is 63.

  • Grafana specific settings

    Hide grafana-settings attributes Show grafana-settings attributes
    • This feature is new in Grafana 9 and is quite resource intensive. It may cause low-end plans to work more slowly while the dashboard previews are rendering.

    • Maximum length is 128. Format should match the following pattern: ^[a-zA-Z0-9-_:.]+$.

    • Hide auth_azuread attributes Show auth_azuread attributes
      • client_id string Required

        Maximum length is 1024. Format should match the following pattern: ^[ -~]+$.

      • client_secret string Required

        Maximum length is 1024. Format should match the following pattern: ^[ -~]+$.

      • auth_url string Required

        Maximum length is 2048.

      • token_url string Required

        Maximum length is 2048.

      • allowed_groups array[string]

        Not more than 50 elements. Maximum length of each is 36. Format of each should match the following pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$.

      • allowed_domains array[string]

        Not more than 50 elements. Maximum length of each is 255.

    • Hide auth_github attributes Show auth_github attributes
    • Maximum length is 64. Format should match the following pattern: ^(G|UA|YT|MO)-[a-zA-Z0-9-]+$.

    • Minimum value is 1, maximum value is 100.

    • Hide smtp_server attributes Show smtp_server attributes
      • host string Required

        Maximum length is 255.

      • port integer Required

        Minimum value is 1, maximum value is 65535.

      • username string | null

        Maximum length is 255. Format should match the following pattern: ^[^\x00-\x1F]+$.

      • password string | null

        Maximum length is 255. Format should match the following pattern: ^[^\x00-\x1F]+$.

      • from_address string Required

        Maximum length is 319. Format should match the following pattern: ^[A-Za-z0-9_\-\.+'&]+@(([\da-zA-Z])([_\w-]{0,62})\.){0,127}(([\da-zA-Z])[_\w-]{0,61})?([\da-zA-Z]\.((xn\-\-[a-zA-Z\d]+)|([a-zA-Z\d]{2,})))$.

      • from_name string | null

        Maximum length is 128. Format should match the following pattern: ^[^\x00-\x1F]+$.

      • Values are OpportunisticStartTLS, MandatoryStartTLS, or NoStartTLS.

    • Hide auth_gitlab attributes Show auth_gitlab attributes
    • Values are alerting, no_data, keep_state, or ok.

    • Hide date_formats attributes Show date_formats attributes
      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 128. Format should match the following pattern: ^(([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|LTS|LT|LL?L?L?|l{1,4}|[-+/T,;.: ]?)*)$.

      • Maximum length is 64. Format should match the following pattern: ^([a-zA-Z_]+/){1,2}[a-zA-Z_-]+$|^(Etc/)?([Uu][Tt][Cc]|[Gg][Mm][Tt])([+-](\d){1,2})?$|^([Ff][Aa][Cc][Tt][Oo][Rr][Yy])$|^([Bb][Rr][Oo][Ww][Ss][Ee][Rr])$.

    • Values are Viewer, Admin, or Editor.

    • Minimum value is 15, maximum value is 90.

    • Signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s, 1h

      Maximum length is 16. Format should match the following pattern: ^[0-9]+(ms|s|m|h|d)$.

    • Hide auth_google attributes Show auth_google attributes
    • Minimum value is 0, maximum value is 1000000.

    • Hide auth_generic_oauth attributes Show auth_generic_oauth attributes
      • scopes array[string]

        Not more than 50 elements. Maximum length of each is 256. Format of each should match the following pattern: ^[\S]+$.

      • allowed_domains array[string]

        Not more than 50 elements. Maximum length of each is 255.

      • Not more than 50 elements. Maximum length of each is 256. Format of each should match the following pattern: ^[\S]+$.

      • token_url string Required

        Maximum length is 2048.

      • name string

        Maximum length is 128. Format should match the following pattern: ^[a-zA-Z0-9_\- ]+$.

      • auth_url string Required

        Maximum length is 2048.

      • api_url string Required

        Maximum length is 2048.

      • auto_login boolean
      • client_id string Required

        Maximum length is 1024. Format should match the following pattern: ^[ -~]+$.

      • client_secret string Required

        Maximum length is 1024. Format should match the following pattern: ^[ -~]+$.

    • Values are alerting or keep_state.

  • ip-filter array[string]

    Allowed CIDR address blocks for incoming connections

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      Hide reference attributes Show reference attributes
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /dbaas-grafana/{name}
curl \
 -X POST https://api-ch-gva-2.exoscale.com/v2/dbaas-grafana/{name} \
 -H "Content-Type: application/json" \
 -d '{"maintenance":{"dow":"saturday","time":"string"},"plan":"string","termination-protection":true,"fork-from-service":"string","grafana-settings":{"allow_embedding":false,"cookie_samesite":"lax","dashboard_previews_enabled":false,"metrics_enabled":true,"recovery_basebackup_name":"backup-20191112t091354293891z","auth_azuread":{"allow_sign_up":false,"client_id":"b1ba0bf54a4c2c0a1c29","client_secret":"bfa6gea4f129076761dcba8ce5e1e406bd83af7b","auth_url":"https://login.microsoftonline.com/\u003cAZURE_TENANT_ID\u003e/oauth2/v2.0/authorize","token_url":"https://login.microsoftonline.com/\u003cAZURE_TENANT_ID\u003e/oauth2/v2.0/token","allowed_groups":["c0ffee15-c01d-0000-1111-012345abcdef"],"allowed_domains":["mycompany.com"]},"alerting_enabled":true,"unified_alerting_enabled":true,"auth_github":{"allow_sign_up":false,"client_id":"b1ba0bf54a4c2c0a1c29","client_secret":"bfa6gea4f129076761dcba8ce5e1e406bd83af7b","team_ids":[150],"allowed_organizations":["aiven"]},"user_auto_assign_org":false,"dataproxy_send_user_header":false,"privatelink_access":{"grafana":true},"google_analytics_ua_id":"UA-123456-4","dashboards_versions_to_keep":20,"editors_can_admin":false,"smtp_server":{"host":"smtp.example.com","port":25,"skip_verify":"false","username":"smtpuser","password":"ein0eemeev5eeth3Ahfu","from_address":"yourgrafanauser@yourdomain.example.com","from_name":"Company Grafana","starttls_policy":"NoStartTLS"},"auth_gitlab":{"allow_sign_up":false,"api_url":"https://gitlab.com/api/v4","auth_url":"https://gitlab.com/oauth/authorize","client_id":"b1ba0bf54a4c2c0a1c29","client_secret":"bfa6gea4f129076761dcba8ce5e1e406bd83af7b","allowed_groups":["aiven/developers"],"token_url":"https://gitlab.com/oauth/token"},"alerting_nodata_or_nullvalues":"ok","auth_basic_enabled":true,"date_formats":{"full_date":"YYYY MM DD","interval_second":"HH:mm:ss","interval_minute":"HH:mm","interval_hour":"MM/DD HH:mm","interval_day":"MM/DD","interval_month":"YYYY-MM","interval_year":"YYYY","default_timezone":"Europe/Helsinki"},"disable_gravatar":false,"user_auto_assign_org_role":"Viewer","dataproxy_timeout":30,"viewers_can_edit":false,"dashboards_min_refresh_interval":"5s","auth_google":{"allow_sign_up":false,"client_id":"b1ba0bf54a4c2c0a1c29","client_secret":"bfa6gea4f129076761dcba8ce5e1e406bd83af7b","allowed_domains":["example.com"]},"oauth_allow_insecure_email_lookup":false,"alerting_max_annotations_to_keep":0,"auth_generic_oauth":{"scopes":["email"],"allowed_domains":["mycompany.com"],"allowed_organizations":["myorg"],"token_url":"https://yourprovider.com/oauth/token","name":"My authentication","auth_url":"https://yourprovider.com/oauth/authorize","api_url":"https://yourprovider.com/api","auto_login":false,"client_id":"b1ba0bf54a4c2c0a1c29","client_secret":"bfa6gea4f129076761dcba8ce5e1e406bd83af7b","allow_sign_up":false},"alerting_error_or_timeout":"alerting"},"ip-filter":["string"]}'
Request example
{
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "plan": "string",
  "termination-protection": true,
  "fork-from-service": "string",
  "grafana-settings": {
    "allow_embedding": false,
    "cookie_samesite": "lax",
    "dashboard_previews_enabled": false,
    "metrics_enabled": true,
    "recovery_basebackup_name": "backup-20191112t091354293891z",
    "auth_azuread": {
      "allow_sign_up": false,
      "client_id": "b1ba0bf54a4c2c0a1c29",
      "client_secret": "bfa6gea4f129076761dcba8ce5e1e406bd83af7b",
      "auth_url": "https://login.microsoftonline.com/<AZURE_TENANT_ID>/oauth2/v2.0/authorize",
      "token_url": "https://login.microsoftonline.com/<AZURE_TENANT_ID>/oauth2/v2.0/token",
      "allowed_groups": [
        "c0ffee15-c01d-0000-1111-012345abcdef"
      ],
      "allowed_domains": [
        "mycompany.com"
      ]
    },
    "alerting_enabled": true,
    "unified_alerting_enabled": true,
    "auth_github": {
      "allow_sign_up": false,
      "client_id": "b1ba0bf54a4c2c0a1c29",
      "client_secret": "bfa6gea4f129076761dcba8ce5e1e406bd83af7b",
      "team_ids": [
        150
      ],
      "allowed_organizations": [
        "aiven"
      ]
    },
    "user_auto_assign_org": false,
    "dataproxy_send_user_header": false,
    "privatelink_access": {
      "grafana": true
    },
    "google_analytics_ua_id": "UA-123456-4",
    "dashboards_versions_to_keep": 20,
    "editors_can_admin": false,
    "smtp_server": {
      "host": "smtp.example.com",
      "port": 25,
      "skip_verify": "false",
      "username": "smtpuser",
      "password": "ein0eemeev5eeth3Ahfu",
      "from_address": "yourgrafanauser@yourdomain.example.com",
      "from_name": "Company Grafana",
      "starttls_policy": "NoStartTLS"
    },
    "auth_gitlab": {
      "allow_sign_up": false,
      "api_url": "https://gitlab.com/api/v4",
      "auth_url": "https://gitlab.com/oauth/authorize",
      "client_id": "b1ba0bf54a4c2c0a1c29",
      "client_secret": "bfa6gea4f129076761dcba8ce5e1e406bd83af7b",
      "allowed_groups": [
        "aiven/developers"
      ],
      "token_url": "https://gitlab.com/oauth/token"
    },
    "alerting_nodata_or_nullvalues": "ok",
    "auth_basic_enabled": true,
    "date_formats": {
      "full_date": "YYYY MM DD",
      "interval_second": "HH:mm:ss",
      "interval_minute": "HH:mm",
      "interval_hour": "MM/DD HH:mm",
      "interval_day": "MM/DD",
      "interval_month": "YYYY-MM",
      "interval_year": "YYYY",
      "default_timezone": "Europe/Helsinki"
    },
    "disable_gravatar": false,
    "user_auto_assign_org_role": "Viewer",
    "dataproxy_timeout": 30,
    "viewers_can_edit": false,
    "dashboards_min_refresh_interval": "5s",
    "auth_google": {
      "allow_sign_up": false,
      "client_id": "b1ba0bf54a4c2c0a1c29",
      "client_secret": "bfa6gea4f129076761dcba8ce5e1e406bd83af7b",
      "allowed_domains": [
        "example.com"
      ]
    },
    "oauth_allow_insecure_email_lookup": false,
    "alerting_max_annotations_to_keep": 0,
    "auth_generic_oauth": {
      "scopes": [
        "email"
      ],
      "allowed_domains": [
        "mycompany.com"
      ],
      "allowed_organizations": [
        "myorg"
      ],
      "token_url": "https://yourprovider.com/oauth/token",
      "name": "My authentication",
      "auth_url": "https://yourprovider.com/oauth/authorize",
      "api_url": "https://yourprovider.com/api",
      "auto_login": false,
      "client_id": "b1ba0bf54a4c2c0a1c29",
      "client_secret": "bfa6gea4f129076761dcba8ce5e1e406bd83af7b",
      "allow_sign_up": false
    },
    "alerting_error_or_timeout": "alerting"
  },
  "ip-filter": [
    "string"
  ]
}
Response examples (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}