Skip to content

Latest commit

 

History

History
150 lines (95 loc) · 3.86 KB

CloudsApi.md

File metadata and controls

150 lines (95 loc) · 3.86 KB

\CloudsApi

All URIs are relative to https://cloudapi.cloud.couchbase.com

Method HTTP request Description
CloudsList Get /v2/clouds List Clouds
CloudsShow Get /v2/clouds/{id} Get Cloud

CloudsList

ListCloudsResponse CloudsList(ctx).Page(page).PerPage(perPage).SortBy(sortBy).Execute()

List Clouds

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)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudsApi.CloudsList(context.Background()).Page(page).PerPage(perPage).SortBy(sortBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudsApi.CloudsList``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CloudsList`: ListCloudsResponse
    fmt.Fprintf(os.Stdout, "Response from `CloudsApi.CloudsList`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCloudsListRequest 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

Return type

ListCloudsResponse

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]

CloudsShow

Cloud CloudsShow(ctx, id).Execute()

Get Cloud

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := TODO // string | Cloud IDA

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudsApi.CloudsShow(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudsApi.CloudsShow``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CloudsShow`: Cloud
    fmt.Fprintf(os.Stdout, "Response from `CloudsApi.CloudsShow`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Cloud

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]