UpdateAutoDiskExpansionSettings
In this article:
UpdateAutoDiskExpansionSettings#
Description#
Request to change the auto volume expansion settings for a PaaS service.
Note
Automatic volume expansion is supported only for services that have data volumes.
Request Parameters#
conditionValue — The utilization level of the data volume (in percent), upon exceeding which, within 10 minutes on at least one node, automatic expansion is triggered.
Type: Integer
Required: Yes
Valid values: From 70 to 90
enabled — Indicates whether auto volume expansion is enabled.
Type: Boolean
Required: Yes
maxSizeGb — The limit in GiB up to which the volume can be increased.
Type: Integer
Required: Yes
Valid values: From 8, multiples of 8
Constraints: The value must be greater than the current size of the data volume and must not exceed the preset cloud limit
serviceId — The service ID.
Type: String
Required: Yes
Response Elements#
return —
Trueis returned, if the request is successful, and an error otherwise.Type: Boolean
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.update_auto_disk_expansion_settings(
serviceId='fm-cluster-7867D61F',
enabled=True,
conditionValue=80,
maxSizeGb=512,
)
Or c2-paas utility from K2 Cloud API Client software suite:
c2-paas UpdateAutoDiskExpansionSettings serviceId fm-cluster-7867D61F enabled true conditionValue 80 maxSizeGb 512