Skip to content

Commit e51269a

Browse files
committed
auto-generated version 1.1.1
1 parent 3438aa0 commit e51269a

40 files changed

+808
-144
lines changed

README.md

+80-109
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general)
2+
13
# Go API client for ionoscloud
24

35
*Managed Stackable Data Platform* by IONOS Cloud provides a preconfigured Kubernetes cluster
@@ -140,8 +142,8 @@ and can only be modified or deleted via the API.
140142
## Overview
141143
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
142144

143-
- API version: 1.1.0
144-
- Package version: 1.1.0
145+
- API version: 1.2.0
146+
- Package version: 1.1.1
145147
- Build package: org.openapitools.codegen.languages.GoClientCodegen
146148
For more information, please visit [https://www.ionos.com](https://www.ionos.com)
147149

@@ -151,139 +153,108 @@ Install the following dependencies:
151153

152154
```shell
153155
go get github.com/stretchr/testify/assert
156+
go get golang.org/x/oauth2
154157
go get golang.org/x/net/context
158+
go get github.com/antihax/optional
155159
```
156160

157161
Put the package under your project folder and add the following in import:
158162

159163
```golang
160-
import ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform"
164+
import "./ionoscloud"
161165
```
162166

163-
To use a proxy, set the environment variable `HTTP_PROXY`:
164-
165-
```golang
166-
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
167-
```
167+
## Authentication
168168

169-
## Configuration of Server URL
169+
All available server URLs are:
170170

171-
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
171+
- *https://api.ionos.com/dataplatform* - IONOS Cloud - Managed Stackable Data Platform API
172172

173-
### Select Server Configuration
173+
By default, *https://api.ionos.com/dataplatform* is used, however this can be overriden at authentication, either
174+
by setting the `IONOS_API_URL` environment variable or by specifying the `hostUrl` parameter when
175+
initializing the sdk client.
174176

175-
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
177+
The username and password or the authentication token can be manually specified when initializing
178+
the sdk client:
176179

177180
```golang
178-
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)
179-
```
180-
181-
### Templated Server URL
182181

183-
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
182+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, hostUrl))
184183

185-
```golang
186-
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerVariables, map[string]string{
187-
"basePath": "v2",
188-
})
189184
```
190185

191-
Note, enum values are always validated and all unused variables are silently ignored.
192-
193-
## Documentation for API Endpoints
194-
195-
All URIs are relative to *https://api.ionos.com/dataplatform*
196-
197-
Class | Method | HTTP request | Description
198-
------------ | ------------- | ------------- | -------------
199-
*DataPlatformClusterApi* | [**ClustersDelete**](docs/api/DataPlatformClusterApi.md#clustersdelete) | **Delete** /clusters/{clusterId} | Delete a DataPlatformCluster
200-
*DataPlatformClusterApi* | [**ClustersFindById**](docs/api/DataPlatformClusterApi.md#clustersfindbyid) | **Get** /clusters/{clusterId} | Retrieve a DataPlatformCluster
201-
*DataPlatformClusterApi* | [**ClustersGet**](docs/api/DataPlatformClusterApi.md#clustersget) | **Get** /clusters | List the DataPlatformClusters
202-
*DataPlatformClusterApi* | [**ClustersKubeconfigFindByClusterId**](docs/api/DataPlatformClusterApi.md#clusterskubeconfigfindbyclusterid) | **Get** /clusters/{clusterId}/kubeconfig | Read the Kubeconfig
203-
*DataPlatformClusterApi* | [**ClustersPatch**](docs/api/DataPlatformClusterApi.md#clusterspatch) | **Patch** /clusters/{clusterId} | Partially Modify a DataPlatformCluster
204-
*DataPlatformClusterApi* | [**ClustersPost**](docs/api/DataPlatformClusterApi.md#clusterspost) | **Post** /clusters | Create a DataPlatformCluster
205-
*DataPlatformMetaDataApi* | [**VersionsGet**](docs/api/DataPlatformMetaDataApi.md#versionsget) | **Get** /versions | Managed Stackable Data Platform API Versions
206-
*DataPlatformNodePoolApi* | [**ClustersNodepoolsDelete**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsdelete) | **Delete** /clusters/{clusterId}/nodepools/{nodepoolId} | Remove a DataPlatformNodePool from a DataPlatformCluster
207-
*DataPlatformNodePoolApi* | [**ClustersNodepoolsFindById**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsfindbyid) | **Get** /clusters/{clusterId}/nodepools/{nodepoolId} | Retrieve a DataPlatformNodePool
208-
*DataPlatformNodePoolApi* | [**ClustersNodepoolsGet**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsget) | **Get** /clusters/{clusterId}/nodepools | List the DataPlatformNodePools of a DataPlatformCluster
209-
*DataPlatformNodePoolApi* | [**ClustersNodepoolsPatch**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolspatch) | **Patch** /clusters/{clusterId}/nodepools/{nodepoolId} | Partially Modify a DataPlatformNodePool
210-
*DataPlatformNodePoolApi* | [**ClustersNodepoolsPost**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolspost) | **Post** /clusters/{clusterId}/nodepools | Create a DataPlatformNodePool for a distinct DataPlatformCluster
211-
186+
Environment variables can also be used. The sdk uses the following variables:
187+
- IONOS_TOKEN - login via token. This is the recommended way to authenticate.
188+
- IONOS_USERNAME - to specify the username used to login
189+
- IONOS_PASSWORD - to specify the password
190+
- IONOS_API_URL - to specify the API server URL
212191

213-
## Documentation For Models
214-
215-
- [AvailabilityZone](docs/models/AvailabilityZone.md)
216-
- [Cluster](docs/models/Cluster.md)
217-
- [ClusterListResponseData](docs/models/ClusterListResponseData.md)
218-
- [ClusterResponseData](docs/models/ClusterResponseData.md)
219-
- [CreateClusterProperties](docs/models/CreateClusterProperties.md)
220-
- [CreateClusterRequest](docs/models/CreateClusterRequest.md)
221-
- [CreateNodePoolProperties](docs/models/CreateNodePoolProperties.md)
222-
- [CreateNodePoolRequest](docs/models/CreateNodePoolRequest.md)
223-
- [ErrorMessage](docs/models/ErrorMessage.md)
224-
- [ErrorResponse](docs/models/ErrorResponse.md)
225-
- [Lan](docs/models/Lan.md)
226-
- [MaintenanceWindow](docs/models/MaintenanceWindow.md)
227-
- [Metadata](docs/models/Metadata.md)
228-
- [NodePool](docs/models/NodePool.md)
229-
- [NodePoolListResponseData](docs/models/NodePoolListResponseData.md)
230-
- [NodePoolResponseData](docs/models/NodePoolResponseData.md)
231-
- [PatchClusterProperties](docs/models/PatchClusterProperties.md)
232-
- [PatchClusterRequest](docs/models/PatchClusterRequest.md)
233-
- [PatchNodePoolProperties](docs/models/PatchNodePoolProperties.md)
234-
- [PatchNodePoolRequest](docs/models/PatchNodePoolRequest.md)
235-
- [Route](docs/models/Route.md)
236-
- [StorageType](docs/models/StorageType.md)
237-
- [VersionsGet200Response](docs/models/VersionsGet200Response.md)
238-
239-
240-
## Documentation For Authorization
241-
242-
243-
Authentication schemes defined for the API:
244-
### tokenAuth
245-
246-
- **Type**: HTTP Bearer token authentication
247-
248-
Example
192+
In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()`.
249193

250194
```golang
251-
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
252-
r, err := client.Service.Operation(auth, args)
253-
```
254-
255-
### basicAuth
256195

257-
- **Type**: HTTP basic authentication
196+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())
258197

259-
Example
260-
261-
```golang
262-
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
263-
UserName: "username",
264-
Password: "password",
265-
})
266-
r, err := client.Service.Operation(auth, args)
267198
```
268199

269200

270-
## Documentation for Utility Methods
271-
272-
Due to the fact that model structure members are all pointers, this package contains
273-
a number of utility functions to easily obtain pointers to values of basic types.
274-
Each of these functions takes a value of the given basic type and returns a pointer to it:
275-
276-
* `PtrBool`
277-
* `PtrInt`
278-
* `PtrInt32`
279-
* `PtrInt64`
280-
* `PtrFloat`
281-
* `PtrFloat32`
282-
* `PtrFloat64`
283-
* `PtrString`
284-
* `PtrTime`
285-
286-
## Author
201+
## Documentation for API Endpoints
287202

203+
All URIs are relative to *https://api.ionos.com/dataplatform*
204+
<details >
205+
<summary title="Click to toggle">API Endpoints table</summary>
206+
207+
208+
| Class | Method | HTTP request | Description |
209+
| ------------- | ------------- | ------------- | ------------- |
210+
| DataPlatformClusterApi | [**ClustersDelete**](docs/api/DataPlatformClusterApi.md#ClustersDelete) | **Delete** /clusters/{clusterId} | Delete a DataPlatformCluster |
211+
| DataPlatformClusterApi | [**ClustersFindById**](docs/api/DataPlatformClusterApi.md#ClustersFindById) | **Get** /clusters/{clusterId} | Retrieve a DataPlatformCluster |
212+
| DataPlatformClusterApi | [**ClustersGet**](docs/api/DataPlatformClusterApi.md#ClustersGet) | **Get** /clusters | List the DataPlatformClusters |
213+
| DataPlatformClusterApi | [**ClustersKubeconfigFindByClusterId**](docs/api/DataPlatformClusterApi.md#ClustersKubeconfigFindByClusterId) | **Get** /clusters/{clusterId}/kubeconfig | Read the Kubeconfig |
214+
| DataPlatformClusterApi | [**ClustersPatch**](docs/api/DataPlatformClusterApi.md#ClustersPatch) | **Patch** /clusters/{clusterId} | Partially Modify a DataPlatformCluster |
215+
| DataPlatformClusterApi | [**ClustersPost**](docs/api/DataPlatformClusterApi.md#ClustersPost) | **Post** /clusters | Create a DataPlatformCluster |
216+
| DataPlatformMetaDataApi | [**VersionsGet**](docs/api/DataPlatformMetaDataApi.md#VersionsGet) | **Get** /versions | Managed Stackable Data Platform API Versions |
217+
| DataPlatformNodePoolApi | [**ClustersNodepoolsDelete**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsDelete) | **Delete** /clusters/{clusterId}/nodepools/{nodepoolId} | Remove a DataPlatformNodePool from a DataPlatformCluster |
218+
| DataPlatformNodePoolApi | [**ClustersNodepoolsFindById**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsFindById) | **Get** /clusters/{clusterId}/nodepools/{nodepoolId} | Retrieve a DataPlatformNodePool |
219+
| DataPlatformNodePoolApi | [**ClustersNodepoolsGet**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsGet) | **Get** /clusters/{clusterId}/nodepools | List the DataPlatformNodePools of a DataPlatformCluster |
220+
| DataPlatformNodePoolApi | [**ClustersNodepoolsPatch**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsPatch) | **Patch** /clusters/{clusterId}/nodepools/{nodepoolId} | Partially Modify a DataPlatformNodePool |
221+
| DataPlatformNodePoolApi | [**ClustersNodepoolsPost**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsPost) | **Post** /clusters/{clusterId}/nodepools | Create a DataPlatformNodePool for a distinct DataPlatformCluster |
222+
223+
</details>
288224

225+
## Documentation For Models
289226

227+
All URIs are relative to *https://api.ionos.com/dataplatform*
228+
<details >
229+
<summary title="Click to toggle">API models list</summary>
230+
231+
- [AutoScaling](docs/models/AutoScaling)
232+
- [AutoScalingBase](docs/models/AutoScalingBase)
233+
- [AvailabilityZone](docs/models/AvailabilityZone)
234+
- [Cluster](docs/models/Cluster)
235+
- [ClusterListResponseData](docs/models/ClusterListResponseData)
236+
- [ClusterResponseData](docs/models/ClusterResponseData)
237+
- [CreateClusterProperties](docs/models/CreateClusterProperties)
238+
- [CreateClusterRequest](docs/models/CreateClusterRequest)
239+
- [CreateNodePoolProperties](docs/models/CreateNodePoolProperties)
240+
- [CreateNodePoolRequest](docs/models/CreateNodePoolRequest)
241+
- [ErrorMessage](docs/models/ErrorMessage)
242+
- [ErrorResponse](docs/models/ErrorResponse)
243+
- [Lan](docs/models/Lan)
244+
- [MaintenanceWindow](docs/models/MaintenanceWindow)
245+
- [Metadata](docs/models/Metadata)
246+
- [NodePool](docs/models/NodePool)
247+
- [NodePoolListResponseData](docs/models/NodePoolListResponseData)
248+
- [NodePoolResponseData](docs/models/NodePoolResponseData)
249+
- [PatchClusterProperties](docs/models/PatchClusterProperties)
250+
- [PatchClusterRequest](docs/models/PatchClusterRequest)
251+
- [PatchNodePoolProperties](docs/models/PatchNodePoolProperties)
252+
- [PatchNodePoolRequest](docs/models/PatchNodePoolRequest)
253+
- [Route](docs/models/Route)
254+
- [StorageType](docs/models/StorageType)
255+
- [VersionsGet200Response](docs/models/VersionsGet200Response)
256+
257+
258+
[[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
259+
260+
</details>

api_data_platform_cluster.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)