All URIs are relative to https://postgresql.de-txl.ionos.com
| Method | HTTP request | Description |
|---|---|---|
| clusters_delete | DELETE /clusters/{clusterId} | Delete Cluster |
| clusters_find_by_id | GET /clusters/{clusterId} | Retrieve Cluster |
| clusters_get | GET /clusters | Retrieve all Clusters |
| clusters_post | POST /clusters | Create Cluster |
| clusters_put | PUT /clusters/{clusterId} | Ensure Cluster |
clusters_delete(cluster_id)
Delete Cluster
Deletes the specified Cluster.
- Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://postgresql.de-txl.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://postgresql.de-txl.ionos.com"
)
# 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 Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
token = os.environ["IONOS_TOKEN"]
)
# 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.ClustersApi(api_client)
cluster_id = 'e69b22a5-8fee-56b1-b6fb-4a07e4205ead' # str | The ID (UUID) of the Cluster.
try:
# Delete Cluster
api_instance.clusters_delete(cluster_id)
except Exception as e:
print("Exception when calling ClustersApi->clusters_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cluster_id | str | The ID (UUID) of the Cluster. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Deleting Cluster was successful. | - |
| 400 | ### Bad Request The request send to the API was malformed. | - |
| 401 | ### Unauthorized The request is missing authorization information or the authorization information provided are expired. | - |
| 403 | ### Not Allowed The user issuing the request does not have the needed permissions. | - |
| 404 | ### Not Found The resource that was requested could not be found. | - |
| 429 | ### Too Many Requests The user has sent too many requests in a given amount of time. | - |
| 500 | ### Internal Server Error An internal error occurred. We apologize for the inconvenience! | - |
| 503 | ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | - |
| 0 | ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterRead clusters_find_by_id(cluster_id)
Retrieve Cluster
Returns the Cluster by ID.
- Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.cluster_read import ClusterRead
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://postgresql.de-txl.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://postgresql.de-txl.ionos.com"
)
# 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 Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
token = os.environ["IONOS_TOKEN"]
)
# 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.ClustersApi(api_client)
cluster_id = 'e69b22a5-8fee-56b1-b6fb-4a07e4205ead' # str | The ID (UUID) of the Cluster.
try:
# Retrieve Cluster
api_response = api_instance.clusters_find_by_id(cluster_id)
print("The response of ClustersApi->clusters_find_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClustersApi->clusters_find_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cluster_id | str | The ID (UUID) of the Cluster. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Getting Cluster was successful. | - |
| 400 | ### Bad Request The request send to the API was malformed. | - |
| 401 | ### Unauthorized The request is missing authorization information or the authorization information provided are expired. | - |
| 403 | ### Not Allowed The user issuing the request does not have the needed permissions. | - |
| 404 | ### Not Found The resource that was requested could not be found. | - |
| 429 | ### Too Many Requests The user has sent too many requests in a given amount of time. | - |
| 500 | ### Internal Server Error An internal error occurred. We apologize for the inconvenience! | - |
| 503 | ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | - |
| 0 | ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterReadList clusters_get(offset=offset, limit=limit, filter_name=filter_name, filter_state=filter_state)
Retrieve all Clusters
This endpoint enables retrieving all Clusters using pagination and optional filters.
- Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.cluster_read_list import ClusterReadList
from ionoscloud_dbaas_postgres.models.postgres_cluster_states import PostgresClusterStates
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://postgresql.de-txl.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://postgresql.de-txl.ionos.com"
)
# 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 Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
token = os.environ["IONOS_TOKEN"]
)
# 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.ClustersApi(api_client)
offset = 0 # int | The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. (optional) (default to 0)
limit = 100 # int | The maximum number of elements to return. Use this parameter together with the offset for pagination. (optional) (default to 100)
filter_name = 'filter_name_example' # str | Filters resources by name. It matches cluster names that contain the provided string. (optional)
filter_state = ionoscloud_dbaas_postgres.PostgresClusterStates() # PostgresClusterStates | Filters resources by state. (optional)
try:
# Retrieve all Clusters
api_response = api_instance.clusters_get(offset=offset, limit=limit, filter_name=filter_name, filter_state=filter_state)
print("The response of ClustersApi->clusters_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClustersApi->clusters_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| offset | int | The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. | [optional] [default to 0] |
| limit | int | The maximum number of elements to return. Use this parameter together with the offset for pagination. | [optional] [default to 100] |
| filter_name | str | Filters resources by name. It matches cluster names that contain the provided string. | [optional] |
| filter_state | PostgresClusterStates | Filters resources by state. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Returned all requested Clusters successfully. | - |
| 400 | ### Bad Request The request send to the API was malformed. | - |
| 401 | ### Unauthorized The request is missing authorization information or the authorization information provided are expired. | - |
| 403 | ### Not Allowed The user issuing the request does not have the needed permissions. | - |
| 429 | ### Too Many Requests The user has sent too many requests in a given amount of time. | - |
| 500 | ### Internal Server Error An internal error occurred. We apologize for the inconvenience! | - |
| 503 | ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | - |
| 0 | ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterRead clusters_post(cluster_create)
Create Cluster
Creates a new Cluster.
The full Cluster needs to be provided to create the object. Optional data will be filled with defaults or left empty.
- Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.cluster_create import ClusterCreate
from ionoscloud_dbaas_postgres.models.cluster_read import ClusterRead
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://postgresql.de-txl.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://postgresql.de-txl.ionos.com"
)
# 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 Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
token = os.environ["IONOS_TOKEN"]
)
# 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.ClustersApi(api_client)
cluster_create = ionoscloud_dbaas_postgres.ClusterCreate() # ClusterCreate | Cluster to create.
try:
# Create Cluster
api_response = api_instance.clusters_post(cluster_create)
print("The response of ClustersApi->clusters_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClustersApi->clusters_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cluster_create | ClusterCreate | Cluster to create. |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Cluster successfully created. | - |
| 400 | ### Bad Request The request send to the API was malformed. | - |
| 401 | ### Unauthorized The request is missing authorization information or the authorization information provided are expired. | - |
| 403 | ### Not Allowed The user issuing the request does not have the needed permissions. | - |
| 415 | ### Unsupported Media Type The request has an unsupported media type. | - |
| 422 | ### Unprocessable Entity The request was well-formed but was unable to be followed due to semantic errors. | - |
| 429 | ### Too Many Requests The user has sent too many requests in a given amount of time. | - |
| 500 | ### Internal Server Error An internal error occurred. We apologize for the inconvenience! | - |
| 503 | ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | - |
| 0 | ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClusterRead clusters_put(cluster_id, cluster_ensure)
Ensure Cluster
Ensures that the Cluster with the provided ID is created or modified. The full Cluster needs to be provided to ensure (either update or create) the Cluster. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.
- Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.cluster_ensure import ClusterEnsure
from ionoscloud_dbaas_postgres.models.cluster_read import ClusterRead
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://postgresql.de-txl.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://postgresql.de-txl.ionos.com"
)
# 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 Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
token = os.environ["IONOS_TOKEN"]
)
# 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.ClustersApi(api_client)
cluster_id = 'e69b22a5-8fee-56b1-b6fb-4a07e4205ead' # str | The ID (UUID) of the Cluster.
cluster_ensure = ionoscloud_dbaas_postgres.ClusterEnsure() # ClusterEnsure | update Cluster
try:
# Ensure Cluster
api_response = api_instance.clusters_put(cluster_id, cluster_ensure)
print("The response of ClustersApi->clusters_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClustersApi->clusters_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cluster_id | str | The ID (UUID) of the Cluster. | |
| cluster_ensure | ClusterEnsure | update Cluster |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Cluster successfully updated. | - |
| 201 | Cluster successfully ensured. | - |
| 400 | ### Bad Request The request send to the API was malformed. | - |
| 401 | ### Unauthorized The request is missing authorization information or the authorization information provided are expired. | - |
| 403 | ### Not Allowed The user issuing the request does not have the needed permissions. | - |
| 404 | ### Not Found The resource that was requested could not be found. | - |
| 409 | ### Conflict The UUID is already taken by another party, follow the guides to generate UUIDs uniquely. | - |
| 415 | ### Unsupported Media Type The request has an unsupported media type. | - |
| 422 | ### Unprocessable Entity The request was well-formed but was unable to be followed due to semantic errors. | - |
| 429 | ### Too Many Requests The user has sent too many requests in a given amount of time. | - |
| 500 | ### Internal Server Error An internal error occurred. We apologize for the inconvenience! | - |
| 503 | ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | - |
| 0 | ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]