\CouchbaseClusterManager

Provides management capabilities for a Couchbase Server Cluster

Summary

Methods
Properties
Constants
listBuckets()
createBucket()
removeBucket()
info()
listUsers()
getUser()
upsertUser()
removeUser()
No public properties found
RBAC_DOMAIN_LOCAL
RBAC_DOMAIN_EXTERNAL
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

RBAC_DOMAIN_LOCAL

RBAC_DOMAIN_LOCAL

The user account managed by Couchbase Cluster.

RBAC_DOMAIN_EXTERNAL

RBAC_DOMAIN_EXTERNAL

The user account managed by external system (e.g. LDAP).

Methods

listBuckets()

listBuckets() : array

Lists all buckets on this cluster.

Returns

array

createBucket()

createBucket(string  $name, array  $options = array()) 

Creates new bucket

Parameters

string $name

Name of the bucket

array $options

Bucket options

  • "authType" (default: "sasl") type of the bucket authentication
  • "bucketType" (default: "couchbase") type of the bucket
  • "ramQuotaMB" (default: 100) memory quota of the bucket
  • "replicaNumber" (default: 1) number of replicas.

removeBucket()

removeBucket(string  $name) 

Removes a bucket identified by its name.

Parameters

string $name

name of the bucket

info()

info() : array

Provides information about the cluster.

Returns an associative array of status information as seen on the cluster. The exact structure of the returned data can be seen in the Couchbase Manual by looking at the cluster /info endpoint.

Returns

array

listUsers()

listUsers(integer  $domain = RBAC_DOMAIN_LOCAL) : array

Lists all users on this cluster.

Parameters

integer $domain

RBAC domain

Returns

array

getUser()

getUser(string  $username, integer  $domain = RBAC_DOMAIN_LOCAL) : array

Fetch single user by its name

Parameters

string $username

The user's identifier

integer $domain

RBAC domain

Returns

array

upsertUser()

upsertUser(string  $name, \Couchbase\UserSettings  $settings, integer  $domain = RBAC_DOMAIN_LOCAL) 

Creates new user

Parameters

string $name

Name of the user

\Couchbase\UserSettings $settings

settings (credentials and roles)

integer $domain

RBAC domain

removeUser()

removeUser(string  $name, integer  $domain = RBAC_DOMAIN_LOCAL) 

Removes a user identified by its name.

Parameters

string $name

name of the bucket

integer $domain

RBAC domain