context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The identifier (UUID) of the cluster.
Other Parameters
Other parameters are passed through a pointer to an apiClustersDeleteRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "ClustersApiService.ClustersDelete" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ClustersFindById
Retrieve Cluster
Example
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The identifier (UUID) of the cluster.
Other Parameters
Other parameters are passed through a pointer to an apiClustersFindByIdRequest struct via the builder pattern
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "ClustersApiService.ClustersFindById" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ClustersGet
Retrieve Clusters
Example
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiClustersGetRequest struct via the builder pattern
Name
Type
Description
Notes
offset
int32
The first element from the total list of elements to include in the response. Use this parameter together with the limit for pagination.
[default to 0]
limit
int32
The maximum number of elements to return. Use this parameter together with the offset for pagination.
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "ClustersApiService.ClustersGet" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ClustersPost
Create Cluster
Example
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiClustersPostRequest struct via the builder pattern
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "ClustersApiService.ClustersPost" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ClustersPut
Ensure Cluster
Example
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The ID (UUID) of the Cluster.
Other Parameters
Other parameters are passed through a pointer to an apiClustersPutRequest struct via the builder pattern
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "ClustersApiService.ClustersPut" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
var result ClusterReadList = ClustersGet(ctx)
.Offset(offset)
.Limit(limit)
.FilterDatacenterId(filterDatacenterId)
.Execute()
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-nfs"
)
func main() {
offset := int32(0) // int32 | The first element from the total list of elements to include in the response. Use this parameter together with the limit for pagination. (optional) (default to 0)
limit := int32(100) // int32 | The maximum number of elements to return. Use this parameter together with the offset for pagination. (optional) (default to 100)
filterDatacenterId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The datacenter identifier to filter by. (optional)
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ClustersApi.ClustersGet(context.Background()).Offset(offset).Limit(limit).FilterDatacenterId(filterDatacenterId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `ClustersGet`: ClusterReadList
fmt.Fprintf(os.Stdout, "Response from `ClustersApi.ClustersGet`: %v\n", resource)
}