---
title: BioPut
description: "对象写入接口。"
url: https://www.hikunpeng.com/document/detail/zh/boostsds/BoostIO/kunpengboostIO_009.html
sourcePath: /source/zh/boostsds/BoostIO/kunpengboostIO_009.html
indexId: 05edaa68c9788adf4b896f72dbdc8c5ec6de62f8f1ca806fa2e0e74ecf8b980051
---
# BioPut

#### 函数定义

对象写入接口。


#### 实现方法

CResult BioPut(uint64_t tenantId, const char *key, const char *value, uint64_t length, ObjLocation location)


#### 参数说明


**表1 参数说明**

| 参数名 | 数据类型 | 参数类型 | 描述 |
| --- | --- | --- | --- |
| tenantId | uint64\_t | 入参 | 租户ID。 |
| key | const char\* | 入参 | 对象的key。 |
| value | const char\* | 入参 | 待写入的数据buffer，value空间的长度必须和入参length一致。 |
| length | uint64\_t | 入参 | 写入数据长度。 |
| location | ObjLocation | 入参 | 对象位置。 |


#### 返回值


**表2 返回值说明**

| 返回值 | 描述 |
| --- | --- |
| RET\_CACHE\_OK | 操作成功。 |
| RET\_CACHE\_NOT\_FOUND | Cache实例不存在。 |
| RET\_CACHE\_EPERM | 传入参数错误。 |
| RET\_CACHE\_NOT\_READY | BoostIO服务未就绪。 |
| RET\_CACHE\_NEED\_RETRY | 需要外部重试。 |
| RET\_CACHE\_PT\_FAULT | 分区错误，对象位置无法写入。 |
| RET\_CACHE\_ERROR | 操作失败。 |
