ListServices
In this article:
ListServices#
Description#
Request for the list of installed PaaS services.
Request Parameters#
serviceClass — The PaaS service class.
Type: String
Required: No
Valid values for a specific service type:
mysql:
database
pgsql:
database
redis:
database
|cacher
memcached:
cacher
mongodb:
database
elasticsearch:
search
rabbitmq:
message_broker
serviceType — PaaS service type.
Type: String
Required: No
Valid values:
mysql
|pgsql
|redis
|memcached
|mongodb
|elasticsearch
|rabbitmq
Response Elements#
services — List of running services.
Type: List of ServiceShort objects
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.list_services(
serviceType='redis',
)
Or c2-paas utility from K2 Cloud API Client software suite:
c2-paas ListServices serviceType redis