Skip to content

Latest commit

 

History

History
1507 lines (955 loc) · 40.2 KB

ClustersApi.md

File metadata and controls

1507 lines (955 loc) · 40.2 KB

\ClustersApi

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

ClustersCreate(ctx).CreateClusterRequest(createClusterRequest).Execute()

Create cluster

Example

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)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiClustersCreateRequest struct via the builder pattern

Name Type Description Notes
createClusterRequest CreateClusterRequest

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersCreateAllowlistEntry

ClustersCreateAllowlistEntry(ctx, id).AppendAllowListRequest(appendAllowListRequest).Execute()

Adds entry to allowlist

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersCreateAllowlistEntryRequest struct via the builder pattern

Name Type Description Notes

appendAllowListRequest | AppendAllowListRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersCreateBucket

CouchbaseBucketSpec ClustersCreateBucket(ctx, id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()

Create bucket in cluster

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersCreateBucketRequest struct via the builder pattern

Name Type Description Notes

couchbaseBucketSpec | CouchbaseBucketSpec | |

Return type

CouchbaseBucketSpec

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersCreateUser

ClustersCreateUser(ctx, id).CreateDatabaseUserRequest(createDatabaseUserRequest).Execute()

Create Database User

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersCreateUserRequest struct via the builder pattern

Name Type Description Notes

createDatabaseUserRequest | CreateDatabaseUserRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersDelete

ClustersDelete(ctx, id).Execute()

Delete cluster

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersDeleteRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersDeleteAllowlistEntry

ClustersDeleteAllowlistEntry(ctx, id).DeleteAllowListEntryRequest(deleteAllowListEntryRequest).Execute()

Delete entry from allowlist

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersDeleteAllowlistEntryRequest struct via the builder pattern

Name Type Description Notes

deleteAllowListEntryRequest | DeleteAllowListEntryRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersDeleteBucket

ClustersDeleteBucket(ctx, id).DeleteBucketRequest(deleteBucketRequest).Execute()

Delete bucket in cluster

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersDeleteBucketRequest struct via the builder pattern

Name Type Description Notes

deleteBucketRequest | DeleteBucketRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersDeleteSingleBucket

ClustersDeleteSingleBucket(ctx, id, bucketId).Execute()

Delete an existing bucket

Example

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)
    }
}

Path Parameters

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

Other parameters are passed through a pointer to a apiClustersDeleteSingleBucketRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersDeleteUser

ClustersDeleteUser(ctx, id, username).Execute()

Delete Database User

Example

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)
    }
}

Path Parameters

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

Other parameters are passed through a pointer to a apiClustersDeleteUserRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersGetAllowlist

[]AllowListEntry ClustersGetAllowlist(ctx, id).Execute()

Get current allowlist

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersGetAllowlistRequest struct via the builder pattern

Name Type Description Notes

Return type

[]AllowListEntry

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersGetCertificate

GetCertificateResponse ClustersGetCertificate(ctx, id).Execute()

Get Cluster Certificate

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersGetCertificateRequest struct via the builder pattern

Name Type Description Notes

Return type

GetCertificateResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersHealth

ClusterHealthResponse ClustersHealth(ctx, id).Execute()

Get Cluster Health

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersHealthRequest struct via the builder pattern

Name Type Description Notes

Return type

ClusterHealthResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersList

ListClustersResponse ClustersList(ctx).Page(page).PerPage(perPage).SortBy(sortBy).CloudId(cloudId).ProjectId(projectId).Execute()

List Clusters

Example

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)
}

Path Parameters

Other Parameters

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.

Return type

ListClustersResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersListBuckets

[]ListBucketItem ClustersListBuckets(ctx, id).Execute()

List cluster buckets

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersListBucketsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]ListBucketItem

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersListUsers

[]ListDatabaseUsersResponseItem ClustersListUsers(ctx, id).Execute()

List Database Users

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersListUsersRequest struct via the builder pattern

Name Type Description Notes

Return type

[]ListDatabaseUsersResponseItem

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersShow

Cluster ClustersShow(ctx, id).Execute()

Get Cluster

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersShowRequest struct via the builder pattern

Name Type Description Notes

Return type

Cluster

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersStatus

ClusterStatusResponse ClustersStatus(ctx, id).Execute()

Get Cluster Status

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersStatusRequest struct via the builder pattern

Name Type Description Notes

Return type

ClusterStatusResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersUpdateAllowlist

ClustersUpdateAllowlist(ctx, id).AllowListEntry(allowListEntry).Execute()

Update the allowlist for a cluster

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersUpdateAllowlistRequest struct via the builder pattern

Name Type Description Notes

allowListEntry | []AllowListEntry | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersUpdateBucket

CouchbaseBucketSpec ClustersUpdateBucket(ctx, id).CouchbaseBucketSpec(couchbaseBucketSpec).Execute()

Update bucket in cluster

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Cluster ID

Other Parameters

Other parameters are passed through a pointer to a apiClustersUpdateBucketRequest struct via the builder pattern

Name Type Description Notes

couchbaseBucketSpec | []CouchbaseBucketSpec | |

Return type

CouchbaseBucketSpec

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersUpdateSingleBucket

ClustersUpdateSingleBucket(ctx, id, bucketId).UpdateBucketRequest(updateBucketRequest).Execute()

Update an existing bucket

Example

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)
    }
}

Path Parameters

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

Other parameters are passed through a pointer to a apiClustersUpdateSingleBucketRequest struct via the builder pattern

Name Type Description Notes

updateBucketRequest | UpdateBucketRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ClustersUpdateUser

ClustersUpdateUser(ctx, id, username).UpdateDatabaseUserRequest(updateDatabaseUserRequest).Execute()

Update Database User

Example

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)
    }
}

Path Parameters

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

Other parameters are passed through a pointer to a apiClustersUpdateUserRequest struct via the builder pattern

Name Type Description Notes

updateDatabaseUserRequest | UpdateDatabaseUserRequest | |

Return type

(empty response body)

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]