ModifyDatabase#

Description#

Request to modify a PaaS service database.

When modifying any database parameter, the request should include all current parameter values, along with the modified and new parameters. The current parameter values can be requested using DescribeDatabase method.

Attention

Some parameters cannot be modified after the database is created, and any such attempt will return an error. For such parameters, the previously set values should be specified. To learn which parameters cannot be modified, see the PaaS parameters section.

Request Parameters#

Required parameters#

  • serviceId — The service ID.

    • Type: String

    • Required: Yes

  • databaseId — The database identifier.

    • 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.modify_database(
   serviceId='fm-cluster-7867D61F',
   databaseId='paas-db-138AE138',
   database={
      "name": "database_name",
      "backupEnabled": True,
      "users": [{"name": "user_name"}],
   },
)

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

c2-paas ModifyDatabase serviceId fm-cluster-7867D61F databaseId paas-db-138AE138 database.backupEnabled true database.users.1.name user_name