Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "DataPlatformClusterApiService.ClustersDelete" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "DataPlatformClusterApiService.ClustersFindById" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
var result ClusterListResponseData=ClustersGet(ctx) .Name(name) .Execute()
List the DataPlatformClusters
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform")funcmain() { name := "name_example" // string | Response filter to list only the clusters which include the specified name. The value is case insensitive and matched on the `name` property of the cluster. The input is limited to 63 characters with alphanumeric characters (`[a-z0-9A-Z]`), dashes (`-`), underscores (`_`), and dots (`.`) allowed. (optional)
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataPlatformClusterApi.ClustersGet(context.Background()).Name(name).Execute()if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `DataPlatformClusterApi.ClustersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `ClustersGet`: ClusterListResponseData fmt.Fprintf(os.Stdout, "Response from `DataPlatformClusterApi.ClustersGet`: %v\n", resource)}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiClustersGetRequest 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 "DataPlatformClusterApiService.ClustersGet" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
var result map[string]interface{} =ClustersKubeconfigFindByClusterId(ctx, clusterId) .Execute()
Read the Kubeconfig
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform")funcmain() { clusterId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the cluster. Must conform to the UUID format.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataPlatformClusterApi.ClustersKubeconfigFindByClusterId(context.Background(), clusterId).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `DataPlatformClusterApi.ClustersKubeconfigFindByClusterId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `ClustersKubeconfigFindByClusterId`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `DataPlatformClusterApi.ClustersKubeconfigFindByClusterId`: %v\n", resource)}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiClustersKubeconfigFindByClusterIdRequest struct via the builder pattern
Return type
map[string]interface{}
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 "DataPlatformClusterApiService.ClustersKubeconfigFindByClusterId" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
var result ClusterResponseData=ClustersPatch(ctx, clusterId) .PatchClusterRequest(patchClusterRequest) .Execute()
Partially Modify a DataPlatformCluster
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform")funcmain() { clusterId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the cluster. Must conform to the UUID format.
patchClusterRequest := *openapiclient.NewPatchClusterRequest(*openapiclient.NewPatchClusterProperties()) // PatchClusterRequest | Request payload with the properties that shall be applied to an existing DataPlatformCluster.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataPlatformClusterApi.ClustersPatch(context.Background(), clusterId).PatchClusterRequest(patchClusterRequest).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `DataPlatformClusterApi.ClustersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `ClustersPatch`: ClusterResponseData fmt.Fprintf(os.Stdout, "Response from `DataPlatformClusterApi.ClustersPatch`: %v\n", resource)}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiClustersPatchRequest 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 "DataPlatformClusterApiService.ClustersPatch" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
var result ClusterResponseData=ClustersPost(ctx) .CreateClusterRequest(createClusterRequest) .Execute()
Create a DataPlatformCluster
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform")funcmain() { createClusterRequest := *openapiclient.NewCreateClusterRequest(*openapiclient.NewCreateClusterProperties("my-cluster", "DatacenterId_example")) // CreateClusterRequest | Request payload with the properties that defines a new DataPlatformCluster and the credentials to interact with the PaaS API to create it.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataPlatformClusterApi.ClustersPost(context.Background()).CreateClusterRequest(createClusterRequest).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `DataPlatformClusterApi.ClustersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `ClustersPost`: ClusterResponseData fmt.Fprintf(os.Stdout, "Response from `DataPlatformClusterApi.ClustersPost`: %v\n", resource)}
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 "DataPlatformClusterApiService.ClustersPost" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster. Must conform to the UUID format.
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster. Must conform to the UUID format.
name
string
Response filter to list only the clusters which include the specified name. The value is case insensitive and matched on the `name` property of the cluster. The input is limited to 63 characters with alphanumeric characters (`[a-z0-9A-Z]`), dashes (`-`), underscores (`_`), and dots (`.`) allowed.
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster. Must conform to the UUID format.
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster. Must conform to the UUID format.