AddNodes#

Description#

Добавление узлов к сервису PaaS.

Request Parameters#

Required parameters#

  • nodeQty — The number of nodes.

    • Type: String

    • Required: Yes

  • nodeRole — Роль узла.

    • Type: String

    • Required: Yes

  • serviceId — The service ID.

    • Type: String

    • Required: Yes

Optional parameters#

  • networkInterfaceIds — List of network interface IDs.

    • Type: Array of strings

    • Required: No

    • Ограничения: Только если при создании сервиса был указан параметр networkInterfaceIds

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.ru-msk.k2.cloud/',
)

paas_client.add_nodes(
   serviceId='fm-cluster-7867D61F',
   nodeRole='node',
   nodeQty='3'
)

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

c2-paas AddNodes serviceId fm-cluster-7867D61F nodeRole node nodeQty 3