CreateDatabase#

Description#

Request to create a PaaS service database.

For some DBMS, a new database can be created from a backup. To learn which DBMS offer this feature, see Databases page. To find already existing backups, use the method.

Request Parameters#

Required parameters#

  • serviceId — The service ID.

    • Type: String

    • Required: Yes

  • databases — Database parameters.

Response Elements#

Examples#

Managing PaaS services in NGN Cloud via API requires a customized version of the boto3 library:

import boto3

session = boto3.Session(
   aws_access_key_id="<AWS_ACCESS_KEY_ID>",
   aws_secret_access_key="<AWS_SECRET_ACCESS_KEY>",
   region_name="ngn",
)

paas_client = session.client(
   'paas',
   endpoint_url='https://paas.cloud.ngn.com.tr/',
)

paas_client.create_database(
   serviceId='fm-cluster-7867D61F',
   database={
      "name": "database_name",
      "backupEnabled": True,
      "users": [{"name": "user_name"}],
   },
)

Or c2-paas utility from CROC Cloud API Client software suite:

c2-paas CreateDatabase serviceId fm-cluster-7867D61F database.name database_name database.backupEnabled true database.users.1.name user_name