ModifyInstanceType
In this article:
ModifyInstanceType#
Description#
Request to modify an instance type for a node with a specific role.
Important
The value can be modified in environment versions starting from paas_v3_5
.
Request Parameters#
InstanceType — The target instance type.
Type: String
Required: Yes
Valid values: Available instance types
nodeRole — The role name of the node whose instance type will be modified.
Type: String
Required: Yes
Valid values: Roles supported by the service
Constraint: Roles for which the instance type can be modified
serviceId — The service ID.
Type: String
Required: Yes
Response Elements#
service — Detailed description of a service.
Type: Service object
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_instance_type(
serviceId="fm-cluster-7867D61F",
nodeRole="main",
instanceType="c1.2large",
)
Or c2-paas utility from K2 Cloud API Client software suite:
c2-paas ModifyInstanceType serviceId "fm-cluster-7867D61F" nodeRole "main" instanceType "c1.2large"