Skip to main content

Python SDK for the ionoscloud-cert-manager API

Project description

Gitter Quality Gate Status Bugs Maintainability Rating Reliability Rating Security Rating Vulnerabilities Release Release Date PyPI version

Alt text

Python API client for ionoscloud_cert_manager

Using the Certificate Manager Service, you can conveniently provision and manage SSL certificates with IONOS services and your internal connected resources.

For the Application Load Balancer, you usually need a certificate to encrypt your HTTPS traffic. The service provides the basic functions of uploading and deleting your certificates for this purpose.

Overview

The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.

Installation & Usage

Requirements:

  • Python >= 3.5

pip install

Since this package is hosted on Pypi you can install it by using:

pip install ionoscloud-cert-manager

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

pip install git+https://github.com/ionos-cloud/sdk-python-cert-manager.git

Note: you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python-cert-manager.git

Then import the package:

import ionoscloud_cert_manager

Setuptools

Install via Setuptools.

python setup.py install --user

or sudo python setup.py install to install the package for all users

Then import the package:

import ionoscloud_cert_manager

NOTE: The Python SDK does not support Python 2. It only supports Python >= 3.5.

Authentication

All available server URLs are:

By default, https://certificate-manager.de-fra.ionos.com is used, however this can be overriden at authentication, either by setting the IONOS_API_URL environment variable or by specifying the host parameter when initializing the sdk client.

The username and password or the authentication token can be manually specified when initializing the SDK client:

configuration = ionoscloud_cert_manager.Configuration(
                username='YOUR_USERNAME',
                password='YOUR_PASSWORD',
                token='YOUR_TOKEN',
                host='SERVER_API_URL'
                )
client = ionoscloud_cert_manager.ApiClient(configuration)

Environment variables can also be used. This is an example of how one would do that:

import os

configuration = ionoscloud_cert_manager.Configuration(
                username=os.environ.get('IONOS_USERNAME'),
                password=os.environ.get('IONOS_PASSWORD'),
                token=os.environ.get('IONOS_TOKEN'),
                host=os.environ.get('IONOS_API_URL')
                )
client = ionoscloud_cert_manager.ApiClient(configuration)

Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.

HTTP proxies

You can use http proxies by setting the following environment variables:

  • IONOS_HTTP_PROXY - proxy URL
  • IONOS_HTTP_PROXY_HEADERS - proxy headers

Each line in IONOS_HTTP_PROXY_HEADERS represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example:

Connection: Keep-Alive
User-Info: MyID
User-Group: my long\nheader value

Changing the base URL

Base URL for the HTTP operation can be changed in the following way:

import os

configuration = ionoscloud_cert_manager.Configuration(
                username=os.environ.get('IONOS_USERNAME'),
                password=os.environ.get('IONOS_PASSWORD'),
                host=os.environ.get('IONOS_API_URL'),
                server_index=None,
                )
client = ionoscloud_cert_manager.ApiClient(configuration)

Certificate pinning:

You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following:

Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>

You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.

Documentation for API Endpoints

All URIs are relative to https://certificate-manager.de-fra.ionos.com

API Endpoints table
Class Method HTTP request Description
AutoCertificateApi auto_certificates_delete DELETE /auto-certificates/{autoCertificateId} Delete AutoCertificate
AutoCertificateApi auto_certificates_find_by_id GET /auto-certificates/{autoCertificateId} Retrieve AutoCertificate
AutoCertificateApi auto_certificates_get GET /auto-certificates Retrieve all AutoCertificate
AutoCertificateApi auto_certificates_patch PATCH /auto-certificates/{autoCertificateId} Updates AutoCertificate
AutoCertificateApi auto_certificates_post POST /auto-certificates Create AutoCertificate
CertificateApi certificates_delete DELETE /certificates/{certificateId} Delete Certificate
CertificateApi certificates_find_by_id GET /certificates/{certificateId} Retrieve Certificate
CertificateApi certificates_get GET /certificates Retrieve all Certificate
CertificateApi certificates_patch PATCH /certificates/{certificateId} Updates Certificate
CertificateApi certificates_post POST /certificates Create Certificate
ProviderApi providers_delete DELETE /providers/{providerId} Delete Provider
ProviderApi providers_find_by_id GET /providers/{providerId} Retrieve Provider
ProviderApi providers_get GET /providers Retrieve all Provider
ProviderApi providers_patch PATCH /providers/{providerId} Updates Provider
ProviderApi providers_post POST /providers Create Provider

Documentation For Models

All URIs are relative to https://certificate-manager.de-fra.ionos.com

API models list

[Back to API list] [Back to Model list]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ionoscloud-cert-manager-2.0.0.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ionoscloud_cert_manager-2.0.0-py3-none-any.whl (130.4 kB view details)

Uploaded Python 3

File details

Details for the file ionoscloud-cert-manager-2.0.0.tar.gz.

File metadata

  • Download URL: ionoscloud-cert-manager-2.0.0.tar.gz
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for ionoscloud-cert-manager-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e42d5d861881b4924f9f99c03b08342c9688db0629192c03c1e776c5c8da9c3c
MD5 8d40dc83392d23a7a6530f4425c49242
BLAKE2b-256 14ad75a5e9708ea73f6c7b8386de7dcdd2ed2c6add5ce55af8f0b5f6328f11be

See more details on using hashes here.

File details

Details for the file ionoscloud_cert_manager-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ionoscloud_cert_manager-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e586cc51ae6cc3aa0bf69c5dbfa77c17f4cfc990b9d771d7530962ad7abc30bf
MD5 0ae6c18c6a01f37bb4ddaa794c5dc46a
BLAKE2b-256 1ff65d5977b417edc46e49a203bb423b808088815851ef37f095376fa5393481

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page