ModifyBackupConfig#

Description#

Request to modify the backup settings of a PaaS service. The settings apply to all backup jobs of the specified service.

Pass only the parameters whose values should change. Parameters omitted from the request keep their current values.

Request Parameters#

Required parameters#

  • serviceId — The PaaS service ID.

    • Type: String

    • Required: Yes

Optional parameters#

  • backupExpirationDays — The backup retention period, in days.

    • Type: Integer

    • Required: No

  • notificationEmail — The email address for notifications that a backup was created.

    • Type: String

    • Required: No

Response Elements#

  • backupConfig — The modified backup settings of the PaaS service.

Examples#

Managing PaaS services in K2 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="",
)

paas_client = session.client(
    'paas',
    endpoint_url='https://paas.ru-msk.k2.cloud/',
)

paas_client.modify_backup_config(
    serviceId='fm-cluster-1ACD3963',
    notificationEmail='admin@example.com',
    backupExpirationDays=7,
)

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

c2-paas ModifyBackupConfig serviceId fm-cluster-1ACD3963 notificationEmail admin@example.com backupExpirationDays 7