Skip to main content

kafkas

Creates, updates, deletes, gets or lists a kafkas resource.

Overview​

Namekafkas
TypeResource
Idovh.cloud_database.kafkas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Service ID
network_idstring (uuid)Private network ID in which the cluster is (wire: networkId)
subnet_idstring (uuid)Private subnet ID in which the cluster is (wire: subnetId)
backup_timestring (time)Time on which backups start every day (example: 15:04:05) (wire: backupTime)
backupsobjectInformation related to the backups, null if the engine does not support backups
capabilitiesobjectCapabilities of the services
categorystringCategory of the engine (analysis, operational, streaming)
created_atstring (date-time)Date of the creation of the cluster (wire: createdAt)
deletion_protectionbooleanEnable deletion protection (wire: deletionProtection)
descriptionstringDescription of the cluster
diskobjectDisk attributes of the cluster. DEPRECATED: use storage
enable_prometheusbooleanEnable Prometheus (wire: enablePrometheus)
endpointsarrayList of all endpoints of the service
enginestringName of the engine of the service (clickhouse, grafana, kafka, kafkaConnect, kafkaMirrorMaker, mongodb, mysql, opensearch, postgresql, valkey)
flavorstringThe VM flavor used for this cluster
ip_restrictionsarrayIP Blocks authorized to access to the cluster (wire: ipRestrictions)
maintenance_timestring (time)Time on which maintenances can start every day (example: 15:04:05) (wire: maintenanceTime)
network_typestringType of network of the cluster (private, public) (wire: networkType)
node_numberintegerNumber of nodes in the cluster. DEPRECATED: useNodes (wire: nodeNumber)
nodesarrayNodes of the cluster
openstack_regionstringOpenStack region of the cluster (wire: openstackRegion)
planstringPlan of the cluster
rest_apibooleanDefines whether the REST API is enabled on the cluster (wire: restApi)
schema_registrybooleanDefines whether the schema registry is enabled on the cluster (wire: schemaRegistry)
statusstringCurrent status of the cluster (CREATING, DELETING, DRAINED, ERROR, LOCKED, LOCKED_PENDING, LOCKED_UPDATING, PENDING, READY, SHELVED, TO_DRAIN, UPDATING)
storageobjectStorage attributes of the cluster
versionstringVersion of the engine deployed on the cluster

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcluster_id, service_nameGet kafka cluster properties
listselectservice_namex_pagination_modeList all the kafka of the project
createinsertservice_nameCreate a new kafka cluster
updateupdatecluster_id, service_nameUpdate an existing kafka cluster
deletedeletecluster_id, service_nameDelete a kafka cluster
log_urlexecclusterId, service_name, kindGenerates a temporary URL to read the logs of one kind. The URL expires.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
clusterIdstring (uuid)Cluster ID
cluster_idstring (uuid)Cluster ID (wire: clusterId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get kafka cluster properties

SELECT
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
deletion_protection,
description,
disk,
enable_prometheus,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
rest_api,
schema_registry,
status,
storage,
version
FROM ovh.cloud_database.kafkas
WHERE cluster_id = '{{ cluster_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new kafka cluster

INSERT INTO ovh.cloud_database.kafkas (
backup,
backup_time,
backups,
description,
disk,
fork_from,
ip_restrictions,
maintenance_time,
network_id,
nodes_list,
nodes_pattern,
plan,
subnet_id,
version,
service_name
)
SELECT
'{{ backup }}',
'{{ backup_time }}',
'{{ backups }}',
'{{ description }}',
'{{ disk }}',
'{{ fork_from }}',
'{{ ip_restrictions }}',
'{{ maintenance_time }}',
'{{ network_id }}',
'{{ nodes_list }}',
'{{ nodes_pattern }}',
'{{ plan }}',
'{{ subnet_id }}',
'{{ version }}',
'{{ service_name }}'
RETURNING
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
deletion_protection,
description,
disk,
enable_prometheus,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
rest_api,
schema_registry,
status,
storage,
version
;

UPDATE examples​

Update an existing kafka cluster

UPDATE ovh.cloud_database.kafkas
SET
backup_time = '{{ backup_time }}',
backups = '{{ backups }}',
deletion_protection = {{ deletion_protection }},
description = '{{ description }}',
disk = '{{ disk }}',
enable_prometheus = {{ enable_prometheus }},
flavor = '{{ flavor }}',
ip_restrictions = '{{ ip_restrictions }}',
maintenance_time = '{{ maintenance_time }}',
network_id = '{{ network_id }}',
node_number = {{ node_number }},
plan = '{{ plan }}',
rest_api = {{ rest_api }},
schema_registry = {{ schema_registry }},
storage = '{{ storage }}',
subnet_id = '{{ subnet_id }}',
version = '{{ version }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
deletion_protection,
description,
disk,
enable_prometheus,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
rest_api,
schema_registry,
status,
storage,
version;

DELETE examples​

Delete a kafka cluster

DELETE FROM ovh.cloud_database.kafkas
WHERE cluster_id = '{{ cluster_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generates a temporary URL to read the logs of one kind. The URL expires.

EXEC ovh.cloud_database.kafkas.log_url
@clusterId='{{ clusterId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;