Metadata-Version: 2.4
Name: ionoscloud_dbaas_postgres
Version: 3.0.0
Summary: IONOS DBaaS PostgreSQL REST API
License: NoLicense
License-File: LICENSE
Keywords: OpenAPI,OpenAPI-Generator,IONOS DBaaS PostgreSQL REST API
Author: OpenAPI Generator Community
Author-email: team@openapitools.org
Requires-Python: >=3.9,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: pydantic (>=2)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: typing-extensions (>=4.7.1)
Requires-Dist: urllib3 (>=2.1.0,<3.0.0)
Project-URL: Repository, https://github.com/ionos-cloud/sdk-python
Description-Content-Type: text/markdown

# ionoscloud-dbaas-postgres
An enterprise-grade Database is provided as a Service (DBaaS) solution that
can be managed through a browser-based \"Data Center Designer\" (DCD) tool or
via an easy to use API.

The API allows you to create additional PostgreSQL database clusters or modify existing
ones. It is designed to allow users to leverage the same power and
flexibility found within the DCD visual tool. Both tools are consistent with
their concepts and lend well to making the experience smooth and intuitive.


This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 3.0.0
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/ionos-cloud/sdk-python.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ionos-cloud/sdk-python.git`)

Then import the package:
```python
import ionoscloud_dbaas_postgres
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import ionoscloud_dbaas_postgres
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
import os

# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
    host = "https://api.ionos.com/databases/postgresql"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_dbaas_postgres.BackupsApi(api_client)
    cluster_id = '498ae72f-411f-11eb-9d07-046c59cc737e' # str | The unique ID of the cluster.
    limit = 100 # int | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100)
    offset = 0 # int | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0)

    try:
        # List backups of cluster
        api_response = api_instance.cluster_backups_get(cluster_id, limit=limit, offset=offset)
        print("The response of BackupsApi->cluster_backups_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BackupsApi->cluster_backups_get: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BackupsApi* | [**cluster_backups_get**](docs/api/BackupsApi.md#cluster_backups_get) | **GET** /clusters/{clusterId}/backups | List backups of cluster
*BackupsApi* | [**clusters_backups_find_by_id**](docs/api/BackupsApi.md#clusters_backups_find_by_id) | **GET** /clusters/backups/{backupId} | Fetch a cluster backup
*BackupsApi* | [**clusters_backups_get**](docs/api/BackupsApi.md#clusters_backups_get) | **GET** /clusters/backups | List cluster backups
*ClustersApi* | [**cluster_postgres_versions_get**](docs/api/ClustersApi.md#cluster_postgres_versions_get) | **GET** /clusters/{clusterId}/postgresversions | List PostgreSQL versions
*ClustersApi* | [**clusters_delete**](docs/api/ClustersApi.md#clusters_delete) | **DELETE** /clusters/{clusterId} | Delete a cluster
*ClustersApi* | [**clusters_find_by_id**](docs/api/ClustersApi.md#clusters_find_by_id) | **GET** /clusters/{clusterId} | Fetch a cluster
*ClustersApi* | [**clusters_get**](docs/api/ClustersApi.md#clusters_get) | **GET** /clusters | List clusters
*ClustersApi* | [**clusters_patch**](docs/api/ClustersApi.md#clusters_patch) | **PATCH** /clusters/{clusterId} | Patch a cluster
*ClustersApi* | [**clusters_post**](docs/api/ClustersApi.md#clusters_post) | **POST** /clusters | Create a cluster
*ClustersApi* | [**clusters_versions_get**](docs/api/ClustersApi.md#clusters_versions_get) | **GET** /clusters/{clusterId}/versions | Supported PostgreSQL versions of cluster
*ClustersApi* | [**postgres_versions_get**](docs/api/ClustersApi.md#postgres_versions_get) | **GET** /clusters/postgresversions | List all PostgreSQL versions
*DatabasesApi* | [**databases_delete**](docs/api/DatabasesApi.md#databases_delete) | **DELETE** /clusters/{clusterId}/databases/{databasename} | Delete database
*DatabasesApi* | [**databases_get**](docs/api/DatabasesApi.md#databases_get) | **GET** /clusters/{clusterId}/databases/{databasename} | Get database
*DatabasesApi* | [**databases_list**](docs/api/DatabasesApi.md#databases_list) | **GET** /clusters/{clusterId}/databases | List databases
*DatabasesApi* | [**databases_post**](docs/api/DatabasesApi.md#databases_post) | **POST** /clusters/{clusterId}/databases | Create a database
*LogsApi* | [**cluster_logs_get**](docs/api/LogsApi.md#cluster_logs_get) | **GET** /clusters/{clusterId}/logs | Get logs of your cluster
*MetadataApi* | [**infos_version_get**](docs/api/MetadataApi.md#infos_version_get) | **GET** /infos/version | Get the current API version
*MetadataApi* | [**infos_versions_get**](docs/api/MetadataApi.md#infos_versions_get) | **GET** /infos/versions | Fetch all API versions
*MetadataApi* | [**versions_get**](docs/api/MetadataApi.md#versions_get) | **GET** /versions | PostgreSQL versions for new clusters
*RestoresApi* | [**cluster_restore_post**](docs/api/RestoresApi.md#cluster_restore_post) | **POST** /clusters/{clusterId}/restore | In-place restore of a cluster
*UsersApi* | [**users_delete**](docs/api/UsersApi.md#users_delete) | **DELETE** /clusters/{clusterId}/users/{username} | Delete user
*UsersApi* | [**users_get**](docs/api/UsersApi.md#users_get) | **GET** /clusters/{clusterId}/users/{username} | Get user
*UsersApi* | [**users_list**](docs/api/UsersApi.md#users_list) | **GET** /clusters/{clusterId}/users | List users
*UsersApi* | [**users_patch**](docs/api/UsersApi.md#users_patch) | **PATCH** /clusters/{clusterId}/users/{username} | Patch user
*UsersApi* | [**users_post**](docs/api/UsersApi.md#users_post) | **POST** /clusters/{clusterId}/users | Create a user


## Documentation For Models

 - [APIVersion](docs/models/APIVersion.md)
 - [BackupMetadata](docs/models/BackupMetadata.md)
 - [BackupResponse](docs/models/BackupResponse.md)
 - [ClusterBackup](docs/models/ClusterBackup.md)
 - [ClusterBackupList](docs/models/ClusterBackupList.md)
 - [ClusterList](docs/models/ClusterList.md)
 - [ClusterLogs](docs/models/ClusterLogs.md)
 - [ClusterLogsInstancesInner](docs/models/ClusterLogsInstancesInner.md)
 - [ClusterLogsInstancesInnerMessagesInner](docs/models/ClusterLogsInstancesInnerMessagesInner.md)
 - [ClusterMetadata](docs/models/ClusterMetadata.md)
 - [ClusterProperties](docs/models/ClusterProperties.md)
 - [ClusterResponse](docs/models/ClusterResponse.md)
 - [Connection](docs/models/Connection.md)
 - [ConnectionPooler](docs/models/ConnectionPooler.md)
 - [CreateClusterProperties](docs/models/CreateClusterProperties.md)
 - [CreateClusterRequest](docs/models/CreateClusterRequest.md)
 - [CreateRestoreRequest](docs/models/CreateRestoreRequest.md)
 - [CreateSynchronizationMode](docs/models/CreateSynchronizationMode.md)
 - [DBUser](docs/models/DBUser.md)
 - [Database](docs/models/Database.md)
 - [DatabaseItems](docs/models/DatabaseItems.md)
 - [DatabaseList](docs/models/DatabaseList.md)
 - [DatabaseProperties](docs/models/DatabaseProperties.md)
 - [DatabaseResource](docs/models/DatabaseResource.md)
 - [DayOfTheWeek](docs/models/DayOfTheWeek.md)
 - [DeprecatedPagination](docs/models/DeprecatedPagination.md)
 - [ErrorMessage](docs/models/ErrorMessage.md)
 - [ErrorResponse](docs/models/ErrorResponse.md)
 - [MaintenanceWindow](docs/models/MaintenanceWindow.md)
 - [Metadata](docs/models/Metadata.md)
 - [Pagination](docs/models/Pagination.md)
 - [PaginationLinks](docs/models/PaginationLinks.md)
 - [PatchClusterProperties](docs/models/PatchClusterProperties.md)
 - [PatchClusterRequest](docs/models/PatchClusterRequest.md)
 - [PatchUserProperties](docs/models/PatchUserProperties.md)
 - [PoolMode](docs/models/PoolMode.md)
 - [PostgresVersionList](docs/models/PostgresVersionList.md)
 - [PostgresVersionListDataInner](docs/models/PostgresVersionListDataInner.md)
 - [Resource](docs/models/Resource.md)
 - [ResourceMetadata](docs/models/ResourceMetadata.md)
 - [ResourceType](docs/models/ResourceType.md)
 - [State](docs/models/State.md)
 - [StorageType](docs/models/StorageType.md)
 - [SynchronizationMode](docs/models/SynchronizationMode.md)
 - [User](docs/models/User.md)
 - [UserItems](docs/models/UserItems.md)
 - [UserList](docs/models/UserList.md)
 - [UserProperties](docs/models/UserProperties.md)
 - [UserResource](docs/models/UserResource.md)
 - [UsersPatchRequest](docs/models/UsersPatchRequest.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="basicAuth"></a>
### basicAuth

- **Type**: HTTP basic authentication

<a id="tokenAuth"></a>
### tokenAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Author





