ModifyServiceParameters#

Description#

Request to modify PaaS service parameters.

To modify any parameter, the request must include all other parameters that are allowed to be changed. Full lists of parameters along with their current values can be obtained using DescribeService method.

Attention

If a pre-set configurable parameter is not specified in the request, it will be excluded from the list of current parameters. If you include 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 service is created, and any such attempt will return an error. For such parameters, the pre-set values must be specified or values must not be passed at all. To learn which parameters can or cannot be modified, see PaaS parameters section.

Request Parameters#

  • parameters — A list of modifiable PaaS service parameters.

    • Type: Dict

    • Required: Yes

    • Valid values: Depend on service type (see PaaS Parameters)

  • serviceId — The service ID.

    • Type: String

    • Required: Yes

Response Elements#

  • service — Detailed description of a 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.k2.cloud/",
)

paas_client.modify_service_parameters(
   serviceId="fm-cluster-9EE731A6",
   parameters={
      "logging": True,
      "log_to": "fm-cluster-C27426C0",
      "monitoring": False,
   }
)

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

c2-paas ModifyServiceParameters serviceId fm-cluster-7867D61F parameters.monitoring false parameters.logging true parameters.log_to fm-cluster-C27426C0