ModifyService#

Description#

Request to change a PaaS service.

When modifying any parameter in the user and/or database list, the request should include all other users and/or databases with all current parameter values. Full lists and current parameter values can be requested using the DescribeService method.

To add a new user and/or database, the request should include their names and parameters, as well as a complete list of all existing users and/or databases with all current parameter values.

Attention

If not specified in the request, the user or database will be deleted. If not specified in the request, any previously set parameter will be excluded from the list of current parameters. If you specify in the request any parameter that was not previously set, this new parameter will be applied. If the value of any parameter in the request differs from the current one, the latter will be modified.

Attention

Some parameters cannot be modified after the user or 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 PaaS parameters section.

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.

Attention

Currently, empty lists cannot be specified as arguments for the c2-paas utility. Consequently, it is not possible to provide an empty list in databases or users. This means that you cannot completely delete all databases or all users using the ModifySevice method along with the c2-paas utility. To bypass this restriction, use a customized version of the boto3 library for passing empty lists to the ModifyService method. You can also use the DeleteDatabase method to delete databases and the DeleteUser method to delete users.

Request Parameters#

Required parameters#

  • serviceId — The service ID.

    • Type: String

    • Required: Yes

Optional parameters#

Response Elements#

  • service — Detailed description of a service.

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_service(
   serviceId='fm-cluster-7867D61F',
   users=[
      {
         "name": "user_name",
         "parameters": {"password": "passwd123#!"},
      },
   ],
   databases=[
      {
         "name": "database_name",
         "users": [{"name": "user_name"}],
         "backupEnabled": True,
      },
   ],
   backupSettings={
      "enabled": True,
      "userLogin": "backup_user@company",
      "bucketName": "backup_bucket",
      "startTime": "22:30",
   },
)

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

c2-paas ModifyService serviceId fm-cluster-7867D61F users.1.name user_name users.1.parameters.password passwd123#! databases.1.name database_name databases.1.users.1.name user_name databases.1.backupEnabled true backupSettings.enabled true backupSettings.userLogin backup_user@company backupSettings.bucketName backup_bucket backupSettings.startTime 22:30