All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| ListClusterEvents | Get /core/clusters/{cluster_id}/events | Fetch all of a cluster events |
ClusterEvents ListClusterEvents(ctx, clusterId).Execute()
Fetch all of a cluster events
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
clusterId := "clusterId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ClusterEventsAPI.ListClusterEvents(context.Background(), clusterId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClusterEventsAPI.ListClusterEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListClusterEvents`: ClusterEvents
fmt.Fprintf(os.Stdout, "Response from `ClusterEventsAPI.ListClusterEvents`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| clusterId | string |
Other parameters are passed through a pointer to a apiListClusterEventsRequest 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]