# README

Go API client for openapi

Authentication

The REST API can be used with your Personal Access Token (PAT). You don't know what a PAT is, check our documentation here.

After you created a PAT click on Authorize and add your PAT under BearerAuth.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

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

import openapi "github.com/GIT_USER_ID/GIT_REPO_ID"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi.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.

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

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

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://cloud.exasol.com

ClassMethodHTTP requestDescription
ClustersApiCreateClusterPost /api/v1/accounts/{accountID}/databases/{databaseID}/clustersCreate cluster
ClustersApiDeleteClusterDelete /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}Delete cluster
ClustersApiGetClusterGet /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}Get cluster
ClustersApiGetClusterConnectionGet /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}/connectGet connection information
ClustersApiListClustersGet /api/v1/accounts/{accountID}/databases/{databaseID}/clustersList clusters
ClustersApiScaleClusterPut /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}/scaleScale cluster
ClustersApiStartClusterPut /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}/startStart cluster
ClustersApiStopClusterPut /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}/stopStop cluster
ClustersApiUpdateClusterPut /api/v1/accounts/{accountID}/databases/{databaseID}/clusters/{clusterID}Update cluster
DatabasesApiCreateDatabasePost /api/v1/accounts/{accountID}/databasesCreate database
DatabasesApiDeleteDatabaseDelete /api/v1/accounts/{accountID}/databases/{databaseID}Delete database
DatabasesApiGetDatabaseGet /api/v1/accounts/{accountID}/databases/{databaseID}Get database
DatabasesApiListDatabasesGet /api/v1/accounts/{accountID}/databasesList databases
DatabasesApiStartDatabasePut /api/v1/accounts/{accountID}/databases/{databaseID}/startStart database
DatabasesApiStopDatabasePut /api/v1/accounts/{accountID}/databases/{databaseID}/stopStop database
DatabasesApiUpdateDatabasePut /api/v1/accounts/{accountID}/databases/{databaseID}Update database
PlatformApiListClusterSizesGet /api/v1/platforms/{platform}/sizesGet cluster sizes for platform
PlatformApiListPlatformsGet /api/v1/platformsList platforms
PlatformApiListRegionsGet /api/v1/platforms/{platform}/regionsGet regions for platform
SecurityApiAddAllowedIPPost /api/v1/accounts/{accountID}/security/allowlist_ipAdd security rule (CIDR)
SecurityApiDeleteAllowedIPDelete /api/v1/accounts/{accountID}/security/allowlist_ip/{ID}Delete security rule (CIDR)
SecurityApiGetAllowedIPGet /api/v1/accounts/{accountID}/security/allowlist_ip/{ID}Get security rule (CIDR)
SecurityApiListAllowedIPsGet /api/v1/accounts/{accountID}/security/allowlist_ipList security rules (CIDR)
SecurityApiUpdateAllowedIPPut /api/v1/accounts/{accountID}/security/allowlist_ip/{ID}Update security rule (CIDR)
UsageApiGetUsageGet /api/v1/accounts/{accountID}/usageGet usage
UsersApiDeleteUserDelete /api/v1/accounts/{accountID}/users/{userID}Remove user
UsersApiListUsersGet /api/v1/accounts/{accountID}/usersList users
UsersApiPatchUserPatch /api/v1/accounts/{accountID}/users/{userID}Patch user
UsersApiUpdateUserPut /api/v1/accounts/{accountID}/users/{userID}Update user

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
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

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAllowedIP instantiates a new AllowedIP object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAllowedIPWithDefaults instantiates a new AllowedIP object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAPIClient creates a new API client.
NewAPIError instantiates a new APIError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAPIErrorWithDefaults instantiates a new APIError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAPIResponse returns a new APIResponse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewAutoStop instantiates a new AutoStop object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAutoStopWithDefaults instantiates a new AutoStop object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCluster instantiates a new Cluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterOverview instantiates a new ClusterOverview object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterOverviewWithDefaults instantiates a new ClusterOverview object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterSize instantiates a new ClusterSize object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterSizeWithDefaults instantiates a new ClusterSize object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterWithDefaults instantiates a new Cluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewConfiguration returns a new Configuration object.
NewConnectionIPs instantiates a new ConnectionIPs object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewConnectionIPsWithDefaults instantiates a new ConnectionIPs object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewConnections instantiates a new Connections object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewConnectionsWithDefaults instantiates a new Connections object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCreateAllowedIP instantiates a new CreateAllowedIP object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCreateAllowedIPWithDefaults instantiates a new CreateAllowedIP object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCreateCluster instantiates a new CreateCluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCreateClusterWithDefaults instantiates a new CreateCluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCreateDatabase instantiates a new CreateDatabase object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCreateDatabaseWithDefaults instantiates a new CreateDatabase object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDatabase instantiates a new Database object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDatabaseWithDefaults instantiates a new Database object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewIntegrations instantiates a new Integrations object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewIntegrationsWithDefaults instantiates a new Integrations object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPatchDatabases instantiates a new PatchDatabases object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPatchDatabasesWithDefaults instantiates a new PatchDatabases object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPatchUser instantiates a new PatchUser object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPatchUserWithDefaults instantiates a new PatchUser object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPlatform instantiates a new Platform object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPlatformWithDefaults instantiates a new Platform object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewProfile instantiates a new Profile object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewProfileWithDefaults instantiates a new Profile object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRegion instantiates a new Region object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRegionWithDefaults instantiates a new Region object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewScaleCluster instantiates a new ScaleCluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewScaleClusterWithDefaults instantiates a new ScaleCluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewStatusFromValue returns a pointer to a valid Status for the value passed as argument, or an error if the value passed is not allowed by the enum.
NewUpdateAllowedIP instantiates a new UpdateAllowedIP object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateAllowedIPWithDefaults instantiates a new UpdateAllowedIP object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUpdateCluster instantiates a new UpdateCluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateClusterWithDefaults instantiates a new UpdateCluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUpdateDatabase instantiates a new UpdateDatabase object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateDatabaseWithDefaults instantiates a new UpdateDatabase object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUpdateUser instantiates a new UpdateUser object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateUserWithDefaults instantiates a new UpdateUser object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUsageCluster instantiates a new UsageCluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUsageClusterWithDefaults instantiates a new UsageCluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUsageDatabase instantiates a new UsageDatabase object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUsageDatabaseWithDefaults instantiates a new UsageDatabase object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserDatabase instantiates a new UserDatabase object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserDatabaseWithDefaults instantiates a new UserDatabase object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserRole instantiates a new UserRole object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserRoleWithDefaults instantiates a new UserRole object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserStatusFromValue returns a pointer to a valid UserStatus for the value passed as argument, or an error if the value passed is not allowed by the enum.
PtrBool is a helper routine that returns a pointer to given boolean value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Constants

List of UserStatus.
List of Status.
List of UserStatus.
List of Status.
List of Status.
List of Status.
List of Status.
List of UserStatus.
List of Status.
List of Status.
List of Status.
List of Status.
List of Status.
List of Status.
List of Status.
List of Status.

# Variables

All allowed values of Status enum.
All allowed values of UserStatus enum.
ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKeys takes a string apikey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextServerIndex uses a server configuration from the index.
ContextServerVariables overrides a server configuration variables.

# Structs

AllowedIP struct for AllowedIP.
No description provided by the author
APIClient manages communication with the Exasol SaaS REST-API API v1.0 In most cases there should be only one, shared, APIClient.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIError struct for APIError.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIResponse stores the API response returned by the server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AutoStop struct for AutoStop.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Cluster struct for Cluster.
ClusterOverview struct for ClusterOverview.
ClusterSize struct for ClusterSize.
Configuration stores the configuration of the API client.
ConnectionIPs struct for ConnectionIPs.
Connections struct for Connections.
CreateAllowedIP struct for CreateAllowedIP.
CreateCluster struct for CreateCluster.
CreateDatabase struct for CreateDatabase.
Database struct for Database.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
Integrations struct for Integrations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PatchDatabases struct for PatchDatabases.
PatchUser struct for PatchUser.
Platform struct for Platform.
Profile struct for Profile.
Region struct for Region.
ScaleCluster struct for ScaleCluster.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
UpdateAllowedIP struct for UpdateAllowedIP.
UpdateCluster struct for UpdateCluster.
UpdateDatabase struct for UpdateDatabase.
UpdateUser struct for UpdateUser.
UsageCluster struct for UsageCluster.
UsageDatabase struct for UsageDatabase.
UserDatabase struct for UserDatabase.
UserRole struct for UserRole.

# Type aliases

ClustersApiService ClustersApi service.
DatabasesApiService DatabasesApi service.
PlatformApiService PlatformApi service.
SecurityApiService SecurityApi service.
ServerConfigurations stores multiple ServerConfiguration items.
Status the model 'Status'.
UsageApiService UsageApi service.
UsersApiService UsersApi service.
UserStatus the model 'UserStatus'.