ModifyLoadBalancers
In this article:
ModifyLoadBalancers#
Description#
Request for creating or deleting load balancers.
Request Parameters#
Required parameters#
serviceId — The service ID.
Type: Boolean
Required: Yes
Optional parameters#
externalBalancerRequired — Create or delete an internet-facing load balancer.
Type: Boolean
Required: No
Constraints: A balancer can only be created for a high-availability PaaS service.
internalBalancerRequired — Create or delete an internal load balancer.
Type: Boolean
Required: No
Constraints: A balancer can only be created for a high-availability PaaS service.
Response Elements#
ModifyLoadBalancerResponse 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.k2.cloud/',
)
paas_client.modify_load_balancers(
serviceId='fm-cluster-82892C63',
internalBalancerRequired=False,
externalBalancerRequired=True
)
Or c2-paas utility from K2 Cloud API Client software suite:
c2-paas ModifyLoadBalancers serviceId fm-cluster-82892C63 internalBalancerRequired false externalBalancerRequired true