---
name: "confdb_object_create"
section: "3"
platform: "linux"
package: "corosync-dev"
version: "1.4.6-1.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/confdb_object_create"
---

# confdb\_object\_create(3)

Create a new object in the Configuration Database

## NAME

confdb\_object\_create - Create a new object in the Configuration Database

## SYNOPSIS

**#include \<corosync/confdb.h\>**

**confdb\_error\_t confdb\_object\_create(confdb\_handle\_t** *handle***, unsigned int** *parent\_object\_handle***,** **void** *\*object\_name* **,** **int** *object\_name\_len* **,** **unsigned***int* **\*object\_handle** *);*

## DESCRIPTION

The **confdb\_object\_create** function create a new object in the configuration database. Objects may contain other sub-objects or keys with values. On success the handle of the new object is returned in **object\_handle.** This value should be used to refer to the object in future, eg when retrieving sub-keys or if the object is destroyed. **parent\_object\_handle** is the handle of the object that is the parent of the new object. This can be **OBJECT\_PARENT\_HANDLE** if the new object is to be a child of the top-level object. Object names are not required to be unique in the database. If you call **confdb\_object\_create** twice with the same parameters you will create two different objects with the same name but distinct object handles. You can iterate through similarly name objects using the **confdb\_object\_find** call.

## RETURN VALUE

This call returns the CONFDB\_OK value if successful, otherwise an error is returned.

## ERRORS

The errors are undocumented.

## SEE ALSO

[**confdb\_initialize**(3)](/confdb_initialize/3.md), [**confdb\_finalize**(3)](/confdb_finalize/3.md), [**confdb\_fd\_get**(3)](/confdb_fd_get/3.md), [**confdb\_dispatch**(3)](/confdb_dispatch/3.md), [**confdb\_object\_create**(3)](/confdb_object_create/3.md), [**confdb\_object\_destroy**(3)](/confdb_object_destroy/3.md), [**confdb\_object\_parent\_get**(3)](/confdb_object_parent_get/3.md), [**confdb\_key\_create**(3)](/confdb_key_create/3.md), [**confdb\_key\_delete**(3)](/confdb_key_delete/3.md), [**confdb\_key\_get**(3)](/confdb_key_get/3.md), [**confdb\_key\_replace**(3)](/confdb_key_replace/3.md), [**confdb\_object\_find\_start**(3)](/confdb_object_find_start/3.md), [**confdb\_object\_find**(3)](/confdb_object_find/3.md), [**confdb\_object\_iter\_start**(3)](/confdb_object_iter_start/3.md), [**confdb\_object\_iter**(3)](/confdb_object_iter/3.md), [**confdb\_key\_iter\_start**(3)](/confdb_key_iter_start/3.md), [**confdb\_key\_iter**(3)](/confdb_key_iter/3.md),
