# ionoscloud-cdn
This API manages CDN distributions.


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

- API version: 1.2.0
- Package version: 1.0.0-beta.1
- 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_cdn
```

### 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_cdn
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import ionoscloud_cdn
from ionoscloud_cdn.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://cdn.de-fra.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_cdn.Configuration(
    host = "https://cdn.de-fra.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_cdn.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with ionoscloud_cdn.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cdn.DistributionsApi(api_client)
    distribution_id = '9ba15778-16c4-543c-8775-e52acf4853f5' # str | The ID (UUID) of the Distribution.

    try:
        # Delete Distribution
        api_instance.distributions_delete(distribution_id)
    except ApiException as e:
        print("Exception when calling DistributionsApi->distributions_delete: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://cdn.de-fra.ionos.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DistributionsApi* | [**distributions_delete**](docs/api/DistributionsApi.md#distributions_delete) | **DELETE** /distributions/{distributionId} | Delete Distribution
*DistributionsApi* | [**distributions_find_by_id**](docs/api/DistributionsApi.md#distributions_find_by_id) | **GET** /distributions/{distributionId} | Retrieve Distribution
*DistributionsApi* | [**distributions_get**](docs/api/DistributionsApi.md#distributions_get) | **GET** /distributions | Retrieve all Distributions
*DistributionsApi* | [**distributions_post**](docs/api/DistributionsApi.md#distributions_post) | **POST** /distributions | Create Distribution
*DistributionsApi* | [**distributions_put**](docs/api/DistributionsApi.md#distributions_put) | **PUT** /distributions/{distributionId} | Ensure Distribution


## Documentation For Models

 - [Distribution](docs/models/Distribution.md)
 - [DistributionCreate](docs/models/DistributionCreate.md)
 - [DistributionMetadata](docs/models/DistributionMetadata.md)
 - [DistributionProperties](docs/models/DistributionProperties.md)
 - [DistributionUpdate](docs/models/DistributionUpdate.md)
 - [Distributions](docs/models/Distributions.md)
 - [Error](docs/models/Error.md)
 - [ErrorMessagesInner](docs/models/ErrorMessagesInner.md)
 - [IpAddresses](docs/models/IpAddresses.md)
 - [Links](docs/models/Links.md)
 - [Metadata](docs/models/Metadata.md)
 - [Pagination](docs/models/Pagination.md)
 - [ResourceState](docs/models/ResourceState.md)
 - [RoutingRule](docs/models/RoutingRule.md)
 - [Upstream](docs/models/Upstream.md)
 - [UpstreamGeoRestrictions](docs/models/UpstreamGeoRestrictions.md)


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


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

- **Type**: Bearer authentication (JWT)


## Author




