Skip to content

Commit

Permalink
auto-generated version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ionoscloudsdk committed Dec 10, 2024
1 parent 3438aa0 commit e51269a
Show file tree
Hide file tree
Showing 40 changed files with 808 additions and 144 deletions.
189 changes: 80 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general)

# Go API client for ionoscloud

*Managed Stackable Data Platform* by IONOS Cloud provides a preconfigured Kubernetes cluster
Expand Down Expand Up @@ -140,8 +142,8 @@ and can only be modified or deleted via the API.
## Overview
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.

- API version: 1.1.0
- Package version: 1.1.0
- API version: 1.2.0
- Package version: 1.1.1
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://www.ionos.com](https://www.ionos.com)

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

```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
```

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

```golang
import ionoscloud "github.com/ionos-cloud/sdk-go-dataplatform"
import "./ionoscloud"
```

To use a proxy, set the environment variable `HTTP_PROXY`:

```golang
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```
## Authentication

## Configuration of Server URL
All available server URLs are:

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

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

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

```golang
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)
```

### Templated Server URL

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

```golang
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```

Note, enum values are always validated and all unused variables are silently ignored.

## Documentation for API Endpoints

All URIs are relative to *https://api.ionos.com/dataplatform*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DataPlatformClusterApi* | [**ClustersDelete**](docs/api/DataPlatformClusterApi.md#clustersdelete) | **Delete** /clusters/{clusterId} | Delete a DataPlatformCluster
*DataPlatformClusterApi* | [**ClustersFindById**](docs/api/DataPlatformClusterApi.md#clustersfindbyid) | **Get** /clusters/{clusterId} | Retrieve a DataPlatformCluster
*DataPlatformClusterApi* | [**ClustersGet**](docs/api/DataPlatformClusterApi.md#clustersget) | **Get** /clusters | List the DataPlatformClusters
*DataPlatformClusterApi* | [**ClustersKubeconfigFindByClusterId**](docs/api/DataPlatformClusterApi.md#clusterskubeconfigfindbyclusterid) | **Get** /clusters/{clusterId}/kubeconfig | Read the Kubeconfig
*DataPlatformClusterApi* | [**ClustersPatch**](docs/api/DataPlatformClusterApi.md#clusterspatch) | **Patch** /clusters/{clusterId} | Partially Modify a DataPlatformCluster
*DataPlatformClusterApi* | [**ClustersPost**](docs/api/DataPlatformClusterApi.md#clusterspost) | **Post** /clusters | Create a DataPlatformCluster
*DataPlatformMetaDataApi* | [**VersionsGet**](docs/api/DataPlatformMetaDataApi.md#versionsget) | **Get** /versions | Managed Stackable Data Platform API Versions
*DataPlatformNodePoolApi* | [**ClustersNodepoolsDelete**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsdelete) | **Delete** /clusters/{clusterId}/nodepools/{nodepoolId} | Remove a DataPlatformNodePool from a DataPlatformCluster
*DataPlatformNodePoolApi* | [**ClustersNodepoolsFindById**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsfindbyid) | **Get** /clusters/{clusterId}/nodepools/{nodepoolId} | Retrieve a DataPlatformNodePool
*DataPlatformNodePoolApi* | [**ClustersNodepoolsGet**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolsget) | **Get** /clusters/{clusterId}/nodepools | List the DataPlatformNodePools of a DataPlatformCluster
*DataPlatformNodePoolApi* | [**ClustersNodepoolsPatch**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolspatch) | **Patch** /clusters/{clusterId}/nodepools/{nodepoolId} | Partially Modify a DataPlatformNodePool
*DataPlatformNodePoolApi* | [**ClustersNodepoolsPost**](docs/api/DataPlatformNodePoolApi.md#clustersnodepoolspost) | **Post** /clusters/{clusterId}/nodepools | Create a DataPlatformNodePool for a distinct DataPlatformCluster

Environment variables can also be used. The sdk uses the following variables:
- IONOS_TOKEN - login via token. This is the recommended way to authenticate.
- IONOS_USERNAME - to specify the username used to login
- IONOS_PASSWORD - to specify the password
- IONOS_API_URL - to specify the API server URL

## Documentation For Models

- [AvailabilityZone](docs/models/AvailabilityZone.md)
- [Cluster](docs/models/Cluster.md)
- [ClusterListResponseData](docs/models/ClusterListResponseData.md)
- [ClusterResponseData](docs/models/ClusterResponseData.md)
- [CreateClusterProperties](docs/models/CreateClusterProperties.md)
- [CreateClusterRequest](docs/models/CreateClusterRequest.md)
- [CreateNodePoolProperties](docs/models/CreateNodePoolProperties.md)
- [CreateNodePoolRequest](docs/models/CreateNodePoolRequest.md)
- [ErrorMessage](docs/models/ErrorMessage.md)
- [ErrorResponse](docs/models/ErrorResponse.md)
- [Lan](docs/models/Lan.md)
- [MaintenanceWindow](docs/models/MaintenanceWindow.md)
- [Metadata](docs/models/Metadata.md)
- [NodePool](docs/models/NodePool.md)
- [NodePoolListResponseData](docs/models/NodePoolListResponseData.md)
- [NodePoolResponseData](docs/models/NodePoolResponseData.md)
- [PatchClusterProperties](docs/models/PatchClusterProperties.md)
- [PatchClusterRequest](docs/models/PatchClusterRequest.md)
- [PatchNodePoolProperties](docs/models/PatchNodePoolProperties.md)
- [PatchNodePoolRequest](docs/models/PatchNodePoolRequest.md)
- [Route](docs/models/Route.md)
- [StorageType](docs/models/StorageType.md)
- [VersionsGet200Response](docs/models/VersionsGet200Response.md)


## Documentation For Authorization


Authentication schemes defined for the API:
### tokenAuth

- **Type**: HTTP Bearer token authentication

Example
In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()`.

```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```

### basicAuth

- **Type**: HTTP basic authentication
client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())

Example

```golang
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
```


## Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:

* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`

## Author
## Documentation for API Endpoints

All URIs are relative to *https://api.ionos.com/dataplatform*
<details >
<summary title="Click to toggle">API Endpoints table</summary>


| Class | Method | HTTP request | Description |
| ------------- | ------------- | ------------- | ------------- |
| DataPlatformClusterApi | [**ClustersDelete**](docs/api/DataPlatformClusterApi.md#ClustersDelete) | **Delete** /clusters/{clusterId} | Delete a DataPlatformCluster |
| DataPlatformClusterApi | [**ClustersFindById**](docs/api/DataPlatformClusterApi.md#ClustersFindById) | **Get** /clusters/{clusterId} | Retrieve a DataPlatformCluster |
| DataPlatformClusterApi | [**ClustersGet**](docs/api/DataPlatformClusterApi.md#ClustersGet) | **Get** /clusters | List the DataPlatformClusters |
| DataPlatformClusterApi | [**ClustersKubeconfigFindByClusterId**](docs/api/DataPlatformClusterApi.md#ClustersKubeconfigFindByClusterId) | **Get** /clusters/{clusterId}/kubeconfig | Read the Kubeconfig |
| DataPlatformClusterApi | [**ClustersPatch**](docs/api/DataPlatformClusterApi.md#ClustersPatch) | **Patch** /clusters/{clusterId} | Partially Modify a DataPlatformCluster |
| DataPlatformClusterApi | [**ClustersPost**](docs/api/DataPlatformClusterApi.md#ClustersPost) | **Post** /clusters | Create a DataPlatformCluster |
| DataPlatformMetaDataApi | [**VersionsGet**](docs/api/DataPlatformMetaDataApi.md#VersionsGet) | **Get** /versions | Managed Stackable Data Platform API Versions |
| DataPlatformNodePoolApi | [**ClustersNodepoolsDelete**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsDelete) | **Delete** /clusters/{clusterId}/nodepools/{nodepoolId} | Remove a DataPlatformNodePool from a DataPlatformCluster |
| DataPlatformNodePoolApi | [**ClustersNodepoolsFindById**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsFindById) | **Get** /clusters/{clusterId}/nodepools/{nodepoolId} | Retrieve a DataPlatformNodePool |
| DataPlatformNodePoolApi | [**ClustersNodepoolsGet**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsGet) | **Get** /clusters/{clusterId}/nodepools | List the DataPlatformNodePools of a DataPlatformCluster |
| DataPlatformNodePoolApi | [**ClustersNodepoolsPatch**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsPatch) | **Patch** /clusters/{clusterId}/nodepools/{nodepoolId} | Partially Modify a DataPlatformNodePool |
| DataPlatformNodePoolApi | [**ClustersNodepoolsPost**](docs/api/DataPlatformNodePoolApi.md#ClustersNodepoolsPost) | **Post** /clusters/{clusterId}/nodepools | Create a DataPlatformNodePool for a distinct DataPlatformCluster |

</details>

## Documentation For Models

All URIs are relative to *https://api.ionos.com/dataplatform*
<details >
<summary title="Click to toggle">API models list</summary>

- [AutoScaling](docs/models/AutoScaling)
- [AutoScalingBase](docs/models/AutoScalingBase)
- [AvailabilityZone](docs/models/AvailabilityZone)
- [Cluster](docs/models/Cluster)
- [ClusterListResponseData](docs/models/ClusterListResponseData)
- [ClusterResponseData](docs/models/ClusterResponseData)
- [CreateClusterProperties](docs/models/CreateClusterProperties)
- [CreateClusterRequest](docs/models/CreateClusterRequest)
- [CreateNodePoolProperties](docs/models/CreateNodePoolProperties)
- [CreateNodePoolRequest](docs/models/CreateNodePoolRequest)
- [ErrorMessage](docs/models/ErrorMessage)
- [ErrorResponse](docs/models/ErrorResponse)
- [Lan](docs/models/Lan)
- [MaintenanceWindow](docs/models/MaintenanceWindow)
- [Metadata](docs/models/Metadata)
- [NodePool](docs/models/NodePool)
- [NodePoolListResponseData](docs/models/NodePoolListResponseData)
- [NodePoolResponseData](docs/models/NodePoolResponseData)
- [PatchClusterProperties](docs/models/PatchClusterProperties)
- [PatchClusterRequest](docs/models/PatchClusterRequest)
- [PatchNodePoolProperties](docs/models/PatchNodePoolProperties)
- [PatchNodePoolRequest](docs/models/PatchNodePoolRequest)
- [Route](docs/models/Route)
- [StorageType](docs/models/StorageType)
- [VersionsGet200Response](docs/models/VersionsGet200Response)


[[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)

</details>
2 changes: 1 addition & 1 deletion api_data_platform_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e51269a

Please sign in to comment.