updateBucket

suspend fun updateBucket(name: String, common: CommonOptions = CommonOptions.Default, ramQuota: StorageSize? = null, flushEnabled: Boolean? = null, replicas: Int? = null, maximumExpiry: Expiry? = null, compressionMode: CompressionMode? = null, minimumDurability: Durability? = null, evictionPolicy: EvictionPolicyType? = null)

Modifies an existing bucket.

Samples

import com.couchbase.client.kotlin.Cluster
import com.couchbase.client.kotlin.util.StorageSize.Companion.mebibytes
fun main() { 
   //sampleStart 
   // Modify the RAM quota of an existing bucket
cluster.buckets.updateBucket(
    name = "my-bucket",
    ramQuota = 1024.mebibytes,
) 
   //sampleEnd
}

Throws

com.couchbase.client.core.error.BucketNotFoundException

if the bucket does not exist