All URIs are relative to https://cloudapi.cloud.couchbase.com
Method | HTTP request | Description |
---|---|---|
ClustersCreate | Post /v2/clusters | Create cluster |
ClustersCreateAllowlistEntry | Post /v2/clusters/{id}/allowlist | Adds entry to allowlist |
ClustersCreateBucket | Post /v2/clusters/{id}/buckets | Create bucket in cluster |
ClustersCreateUser | Post /v2/clusters/{id}/users | Create Database User |
ClustersDelete | Delete /v2/clusters/{id} | Delete cluster |
ClustersDeleteAllowlistEntry | Delete /v2/clusters/{id}/allowlist | Delete entry from allowlist |
ClustersDeleteBucket | Delete /v2/clusters/{id}/buckets | Delete bucket in cluster |
ClustersDeleteSingleBucket | Delete /v2/clusters/{id}/buckets/{bucketId} | Delete an existing bucket |
ClustersDeleteUser | Delete /v2/clusters/{id}/users/{username} | Delete Database User |
ClustersGetAllowlist | Get /v2/clusters/{id}/allowlist | Get current allowlist |
ClustersGetCertificate | Get /v2/clusters/{id}/certificate | Get Cluster Certificate |
ClustersHealth | Get /v2/clusters/{id}/health | Get Cluster Health |
ClustersList | Get /v2/clusters | List Clusters |
ClustersListBuckets | Get /v2/clusters/{id}/buckets | List cluster buckets |
ClustersListUsers | Get /v2/clusters/{id}/users | List Database Users |
ClustersShow | Get /v2/clusters/{id} | Get Cluster |
ClustersStatus | Get /v2/clusters/{id}/status | Get Cluster Status |
ClustersUpdateAllowlist | Put /v2/clusters/{id}/allowlist | Update the allowlist for a cluster |
ClustersUpdateBucket | Put /v2/clusters/{id}/buckets | Update bucket in cluster |
ClustersUpdateSingleBucket | Put /v2/clusters/{id}/buckets/{bucketId} | Update an existing bucket |
ClustersUpdateUser | Put /v2/clusters/{id}/users/{username} | Update Database User |
ClustersCreate(ctx).CreateClusterRequest(createClusterRequest).Execute()
Create cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createClusterRequest := *openapiclient.NewCreateClusterRequest("Name_example", "CloudId_example", "ProjectId_example") // CreateClusterRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersCreate(context.Background()).CreateClusterRequest(createClusterRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiClustersCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createClusterRequest | CreateClusterRequest |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersCreateAllowlistEntry(ctx, id).AppendAllowListRequest(appendAllowListRequest).Execute()
Adds entry to allowlist
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
appendAllowListRequest := *openapiclient.NewAppendAllowListRequest("0.0.0.0/32", openapiclient.allowListRules("temporary")) // AppendAllowListRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersCreateAllowlistEntry(context.Background(), id).AppendAllowListRequest(appendAllowListRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersCreateAllowlistEntry``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersCreateAllowlistEntryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
appendAllowListRequest | AppendAllowListRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CouchbaseBucketSpec ClustersCreateBucket(ctx, id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()
Create bucket in cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
couchbaseBucketSpec := *openapiclient.NewCouchbaseBucketSpec("Name_example", int32(123)) // CouchbaseBucketSpec | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersCreateBucket(context.Background(), id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersCreateBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersCreateBucket`: CouchbaseBucketSpec
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersCreateBucket`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersCreateBucketRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
couchbaseBucketSpec | CouchbaseBucketSpec | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersCreateUser(ctx, id).CreateDatabaseUserRequest(createDatabaseUserRequest).Execute()
Create Database User
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
createDatabaseUserRequest := *openapiclient.NewCreateDatabaseUserRequest("Username_example", "Password_example") // CreateDatabaseUserRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersCreateUser(context.Background(), id).CreateDatabaseUserRequest(createDatabaseUserRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersCreateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersCreateUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createDatabaseUserRequest | CreateDatabaseUserRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersDelete(ctx, id).Execute()
Delete cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersDelete(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersDeleteAllowlistEntry(ctx, id).DeleteAllowListEntryRequest(deleteAllowListEntryRequest).Execute()
Delete entry from allowlist
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
deleteAllowListEntryRequest := *openapiclient.NewDeleteAllowListEntryRequest("0.0.0.0/32") // DeleteAllowListEntryRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersDeleteAllowlistEntry(context.Background(), id).DeleteAllowListEntryRequest(deleteAllowListEntryRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersDeleteAllowlistEntry``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersDeleteAllowlistEntryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
deleteAllowListEntryRequest | DeleteAllowListEntryRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersDeleteBucket(ctx, id).DeleteBucketRequest(deleteBucketRequest).Execute()
Delete bucket in cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
deleteBucketRequest := *openapiclient.NewDeleteBucketRequest("Name_example") // DeleteBucketRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersDeleteBucket(context.Background(), id).DeleteBucketRequest(deleteBucketRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersDeleteBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersDeleteBucketRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
deleteBucketRequest | DeleteBucketRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersDeleteSingleBucket(ctx, id, bucketId).Execute()
Delete an existing bucket
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
bucketId := "Y291Y2hiYXNlY2xvdWRidWNrZXQ=" // string | Bucket ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersDeleteSingleBucket(context.Background(), id, bucketId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersDeleteSingleBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID | |
bucketId | string | Bucket ID |
Other parameters are passed through a pointer to a apiClustersDeleteSingleBucketRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersDeleteUser(ctx, id, username).Execute()
Delete Database User
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
username := "foobar" // string | Database User username
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersDeleteUser(context.Background(), id, username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersDeleteUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID | |
username | string | Database User username |
Other parameters are passed through a pointer to a apiClustersDeleteUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AllowListEntry ClustersGetAllowlist(ctx, id).Execute()
Get current allowlist
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersGetAllowlist(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersGetAllowlist``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersGetAllowlist`: []AllowListEntry
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersGetAllowlist`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersGetAllowlistRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCertificateResponse ClustersGetCertificate(ctx, id).Execute()
Get Cluster Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersGetCertificate(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersGetCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersGetCertificate`: GetCertificateResponse
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersGetCertificate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersGetCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterHealthResponse ClustersHealth(ctx, id).Execute()
Get Cluster Health
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersHealth(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersHealth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersHealth`: ClusterHealthResponse
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersHealth`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersHealthRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListClustersResponse ClustersList(ctx).Page(page).PerPage(perPage).SortBy(sortBy).CloudId(cloudId).ProjectId(projectId).Execute()
List Clusters
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
page := int32(56) // int32 | Sets how many results you would like to have on each page (optional)
perPage := int32(56) // int32 | Sets what page you would like to view (optional)
sortBy := "name.desc" // string | Sets order of how you would like to sort results and also the key you would like to order by (optional)
cloudId := TODO // string | Cloud ID for filtering cloud clusters. (optional)
projectId := TODO // string | Project ID for filtering project clusters. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersList(context.Background()).Page(page).PerPage(perPage).SortBy(sortBy).CloudId(cloudId).ProjectId(projectId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersList`: ListClustersResponse
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersList`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiClustersListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | int32 | Sets how many results you would like to have on each page | |
perPage | int32 | Sets what page you would like to view | |
sortBy | string | Sets order of how you would like to sort results and also the key you would like to order by | |
cloudId | string | Cloud ID for filtering cloud clusters. | |
projectId | string | Project ID for filtering project clusters. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListBucketItem ClustersListBuckets(ctx, id).Execute()
List cluster buckets
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersListBuckets(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersListBuckets``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersListBuckets`: []ListBucketItem
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersListBuckets`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersListBucketsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListDatabaseUsersResponseItem ClustersListUsers(ctx, id).Execute()
List Database Users
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersListUsers(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersListUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersListUsers`: []ListDatabaseUsersResponseItem
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersListUsers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersListUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]ListDatabaseUsersResponseItem
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Cluster ClustersShow(ctx, id).Execute()
Get Cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersShow(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersShow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersShow`: Cluster
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersShow`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersShowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterStatusResponse ClustersStatus(ctx, id).Execute()
Get Cluster Status
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersStatus(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersStatus`: ClusterStatusResponse
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersUpdateAllowlist(ctx, id).AllowListEntry(allowListEntry).Execute()
Update the allowlist for a cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
allowListEntry := []openapiclient.AllowListEntry{*openapiclient.NewAllowListEntry("0.0.0.0/32", openapiclient.allowListRules("temporary"))} // []AllowListEntry | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersUpdateAllowlist(context.Background(), id).AllowListEntry(allowListEntry).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersUpdateAllowlist``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersUpdateAllowlistRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
allowListEntry | []AllowListEntry | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CouchbaseBucketSpec ClustersUpdateBucket(ctx, id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()
Update bucket in cluster
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
couchbaseBucketSpec := []openapiclient.CouchbaseBucketSpec{*openapiclient.NewCouchbaseBucketSpec("Name_example", int32(123))} // []CouchbaseBucketSpec | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersUpdateBucket(context.Background(), id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersUpdateBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClustersUpdateBucket`: CouchbaseBucketSpec
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersUpdateBucket`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID |
Other parameters are passed through a pointer to a apiClustersUpdateBucketRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
couchbaseBucketSpec | []CouchbaseBucketSpec | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersUpdateSingleBucket(ctx, id, bucketId).UpdateBucketRequest(updateBucketRequest).Execute()
Update an existing bucket
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
bucketId := "Y291Y2hiYXNlY2xvdWRidWNrZXQ=" // string | Bucket ID
updateBucketRequest := *openapiclient.NewUpdateBucketRequest(int32(123)) // UpdateBucketRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersUpdateSingleBucket(context.Background(), id, bucketId).UpdateBucketRequest(updateBucketRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersUpdateSingleBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID | |
bucketId | string | Bucket ID |
Other parameters are passed through a pointer to a apiClustersUpdateSingleBucketRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateBucketRequest | UpdateBucketRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClustersUpdateUser(ctx, id, username).UpdateDatabaseUserRequest(updateDatabaseUserRequest).Execute()
Update Database User
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := TODO // string | Cluster ID
username := "foobar" // string | Database User username
updateDatabaseUserRequest := *openapiclient.NewUpdateDatabaseUserRequest() // UpdateDatabaseUserRequest | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ClustersApi.ClustersUpdateUser(context.Background(), id, username).UpdateDatabaseUserRequest(updateDatabaseUserRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersUpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Cluster ID | |
username | string | Database User username |
Other parameters are passed through a pointer to a apiClustersUpdateUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateDatabaseUserRequest | UpdateDatabaseUserRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]