# LabelsApi

## LabelsApi

All URIs are relative to *<https://api.ionos.com/cloudapi/v6>*

| Method                                                                                     | HTTP request                                                           | Description                       |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | --------------------------------- |
| [**datacenters\_labels\_delete**](#datacenters_labels_delete)                              | **DELETE** /datacenters/{datacenterId}/labels/{key}                    | Delete data center labels         |
| [**datacenters\_labels\_find\_by\_key**](#datacenters_labels_find_by_key)                  | **GET** /datacenters/{datacenterId}/labels/{key}                       | Retrieve data center labels       |
| [**datacenters\_labels\_get**](#datacenters_labels_get)                                    | **GET** /datacenters/{datacenterId}/labels                             | List data center labels           |
| [**datacenters\_labels\_post**](#datacenters_labels_post)                                  | **POST** /datacenters/{datacenterId}/labels                            | Create a Data Center Label        |
| [**datacenters\_labels\_put**](#datacenters_labels_put)                                    | **PUT** /datacenters/{datacenterId}/labels/{key}                       | Modify a Data Center Label by Key |
| [**datacenters\_servers\_labels\_delete**](#datacenters_servers_labels_delete)             | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels              |
| [**datacenters\_servers\_labels\_find\_by\_key**](#datacenters_servers_labels_find_by_key) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels/{key}    | Retrieve server labels            |
| [**datacenters\_servers\_labels\_get**](#datacenters_servers_labels_get)                   | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels          | List server labels                |
| [**datacenters\_servers\_labels\_post**](#datacenters_servers_labels_post)                 | **POST** /datacenters/{datacenterId}/servers/{serverId}/labels         | Create a Server Label             |
| [**datacenters\_servers\_labels\_put**](#datacenters_servers_labels_put)                   | **PUT** /datacenters/{datacenterId}/servers/{serverId}/labels/{key}    | Modify a Server Label             |
| [**datacenters\_volumes\_labels\_delete**](#datacenters_volumes_labels_delete)             | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels              |
| [**datacenters\_volumes\_labels\_find\_by\_key**](#datacenters_volumes_labels_find_by_key) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}    | Retrieve volume labels            |
| [**datacenters\_volumes\_labels\_get**](#datacenters_volumes_labels_get)                   | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels          | List volume labels                |
| [**datacenters\_volumes\_labels\_post**](#datacenters_volumes_labels_post)                 | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/labels         | Create a Volume Label             |
| [**datacenters\_volumes\_labels\_put**](#datacenters_volumes_labels_put)                   | **PUT** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}    | Modify a Volume Label             |
| [**ipblocks\_labels\_delete**](#ipblocks_labels_delete)                                    | **DELETE** /ipblocks/{ipblockId}/labels/{key}                          | Delete IP block labels            |
| [**ipblocks\_labels\_find\_by\_key**](#ipblocks_labels_find_by_key)                        | **GET** /ipblocks/{ipblockId}/labels/{key}                             | Retrieve IP block labels          |
| [**ipblocks\_labels\_get**](#ipblocks_labels_get)                                          | **GET** /ipblocks/{ipblockId}/labels                                   | List IP block labels              |
| [**ipblocks\_labels\_post**](#ipblocks_labels_post)                                        | **POST** /ipblocks/{ipblockId}/labels                                  | Create IP block labels            |
| [**ipblocks\_labels\_put**](#ipblocks_labels_put)                                          | **PUT** /ipblocks/{ipblockId}/labels/{key}                             | Modify a IP Block Label by ID     |
| [**labels\_find\_by\_urn**](#labels_find_by_urn)                                           | **GET** /labels/{labelurn}                                             | Retrieve labels by URN            |
| [**labels\_get**](#labels_get)                                                             | **GET** /labels                                                        | List labels                       |
| [**snapshots\_labels\_delete**](#snapshots_labels_delete)                                  | **DELETE** /snapshots/{snapshotId}/labels/{key}                        | Delete snapshot labels            |
| [**snapshots\_labels\_find\_by\_key**](#snapshots_labels_find_by_key)                      | **GET** /snapshots/{snapshotId}/labels/{key}                           | Retrieve snapshot labels          |
| [**snapshots\_labels\_get**](#snapshots_labels_get)                                        | **GET** /snapshots/{snapshotId}/labels                                 | List snapshot labels              |
| [**snapshots\_labels\_post**](#snapshots_labels_post)                                      | **POST** /snapshots/{snapshotId}/labels                                | Create a Snapshot Label           |
| [**snapshots\_labels\_put**](#snapshots_labels_put)                                        | **PUT** /snapshots/{snapshotId}/labels/{key}                           | Modify a Snapshot Label by ID     |

## **datacenters\_labels\_delete**

> datacenters\_labels\_delete(datacenter\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Delete data center labels

Delete the specified data center label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    key = 'key_example' # str | The label key
    try:
        # Delete data center labels
        api_instance.datacenters_labels_delete(datacenter_id, key)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_labels_delete: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

void (empty response body)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_labels\_find\_by\_key**

> LabelResource datacenters\_labels\_find\_by\_key(datacenter\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve data center labels

Retrieve the properties of the specified data center label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    key = 'key_example' # str | The label key
    try:
        # Retrieve data center labels
        api_response = api_instance.datacenters_labels_find_by_key(datacenter_id, key)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_labels_find_by_key: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_labels\_get**

> LabelResources datacenters\_labels\_get(datacenter\_id, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List data center labels

List all the the labels for the specified data center.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    try:
        # List data center labels
        api_response = api_instance.datacenters_labels_get(datacenter_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResources**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresources)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_labels\_post**

> LabelResource datacenters\_labels\_post(datacenter\_id, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Create a Data Center Label

Adds a new label to the specified data center.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    label = ionoscloud.LabelResource() # LabelResource | The label to create.
    try:
        # Create a Data Center Label
        api_response = api_instance.datacenters_labels_post(datacenter_id, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_labels_post: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The label to create.                                                                                                                                                                                                                                                                                                                                                                                                                     |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **datacenters\_labels\_put**

> LabelResource datacenters\_labels\_put(datacenter\_id, key, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Modify a Data Center Label by Key

Modifies the specified data center label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    key = 'key_example' # str | The label key
    label = ionoscloud.LabelResource() # LabelResource | The modified label
    try:
        # Modify a Data Center Label by Key
        api_response = api_instance.datacenters_labels_put(datacenter_id, key, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_labels_put: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **key**                 | **str**                                                                                                        | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The modified label                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **datacenters\_servers\_labels\_delete**

> datacenters\_servers\_labels\_delete(datacenter\_id, server\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Delete server labels

Delete the specified server label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    server_id = 'server_id_example' # str | The unique ID of the server.
    key = 'key_example' # str | The label key
    try:
        # Delete server labels
        api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_servers_labels_delete: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **server\_id**          | **str**  | The unique ID of the server.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

void (empty response body)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_servers\_labels\_find\_by\_key**

> LabelResource datacenters\_servers\_labels\_find\_by\_key(datacenter\_id, server\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve server labels

Retrieve the properties of the specified server label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    server_id = 'server_id_example' # str | The unique ID of the server.
    key = 'key_example' # str | The label key
    try:
        # Retrieve server labels
        api_response = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_servers_labels_find_by_key: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **server\_id**          | **str**  | The unique ID of the server.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_servers\_labels\_get**

> LabelResources datacenters\_servers\_labels\_get(datacenter\_id, server\_id, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List server labels

List all the the labels for the specified server.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    server_id = 'server_id_example' # str | The unique ID of the server.
    try:
        # List server labels
        api_response = api_instance.datacenters_servers_labels_get(datacenter_id, server_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_servers_labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **server\_id**          | **str**  | The unique ID of the server.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResources**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresources)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_servers\_labels\_post**

> LabelResource datacenters\_servers\_labels\_post(datacenter\_id, server\_id, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Create a Server Label

Adds a new label to the specified server.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    server_id = 'server_id_example' # str | The unique ID of the server.
    label = ionoscloud.LabelResource() # LabelResource | The label to create.
    try:
        # Create a Server Label
        api_response = api_instance.datacenters_servers_labels_post(datacenter_id, server_id, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_servers_labels_post: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **server\_id**          | **str**                                                                                                        | The unique ID of the server.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The label to create.                                                                                                                                                                                                                                                                                                                                                                                                                     |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **datacenters\_servers\_labels\_put**

> LabelResource datacenters\_servers\_labels\_put(datacenter\_id, server\_id, key, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Modify a Server Label

Modifies the specified server label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    server_id = 'server_id_example' # str | The unique ID of the server.
    key = 'key_example' # str | The label key
    label = ionoscloud.LabelResource() # LabelResource | The modified label
    try:
        # Modify a Server Label
        api_response = api_instance.datacenters_servers_labels_put(datacenter_id, server_id, key, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_servers_labels_put: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **server\_id**          | **str**                                                                                                        | The unique ID of the server.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**                                                                                                        | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The modified label                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **datacenters\_volumes\_labels\_delete**

> datacenters\_volumes\_labels\_delete(datacenter\_id, volume\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Delete volume labels

Delete the specified volume label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    volume_id = 'volume_id_example' # str | The unique ID of the volume.
    key = 'key_example' # str | The label key
    try:
        # Delete volume labels
        api_instance.datacenters_volumes_labels_delete(datacenter_id, volume_id, key)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_volumes_labels_delete: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **volume\_id**          | **str**  | The unique ID of the volume.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

void (empty response body)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_volumes\_labels\_find\_by\_key**

> LabelResource datacenters\_volumes\_labels\_find\_by\_key(datacenter\_id, volume\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve volume labels

Retrieve the properties of the specified volume label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    volume_id = 'volume_id_example' # str | The unique ID of the volume.
    key = 'key_example' # str | The label key
    try:
        # Retrieve volume labels
        api_response = api_instance.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_volumes_labels_find_by_key: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **volume\_id**          | **str**  | The unique ID of the volume.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_volumes\_labels\_get**

> LabelResources datacenters\_volumes\_labels\_get(datacenter\_id, volume\_id, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List volume labels

List all the the labels for the specified volume.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    volume_id = 'volume_id_example' # str | The unique ID of the volume.
    try:
        # List volume labels
        api_response = api_instance.datacenters_volumes_labels_get(datacenter_id, volume_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_volumes_labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**  | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **volume\_id**          | **str**  | The unique ID of the volume.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResources**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresources)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **datacenters\_volumes\_labels\_post**

> LabelResource datacenters\_volumes\_labels\_post(datacenter\_id, volume\_id, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Create a Volume Label

Adds a new label to the specified volume.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    volume_id = 'volume_id_example' # str | The unique ID of the volume.
    label = ionoscloud.LabelResource() # LabelResource | The label to create.
    try:
        # Create a Volume Label
        api_response = api_instance.datacenters_volumes_labels_post(datacenter_id, volume_id, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_volumes_labels_post: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **volume\_id**          | **str**                                                                                                        | The unique ID of the volume.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The label to create.                                                                                                                                                                                                                                                                                                                                                                                                                     |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **datacenters\_volumes\_labels\_put**

> LabelResource datacenters\_volumes\_labels\_put(datacenter\_id, volume\_id, key, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Modify a Volume Label

Modifies the specified volume label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
    volume_id = 'volume_id_example' # str | The unique ID of the volume.
    key = 'key_example' # str | The label key
    label = ionoscloud.LabelResource() # LabelResource | The modified label
    try:
        # Modify a Volume Label
        api_response = api_instance.datacenters_volumes_labels_put(datacenter_id, volume_id, key, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.datacenters_volumes_labels_put: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **datacenter\_id**      | **str**                                                                                                        | The unique ID of the data center.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **volume\_id**          | **str**                                                                                                        | The unique ID of the volume.                                                                                                                                                                                                                                                                                                                                                                                                             |                                |
| **key**                 | **str**                                                                                                        | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The modified label                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **ipblocks\_labels\_delete**

> ipblocks\_labels\_delete(ipblock\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Delete IP block labels

Delete the specified IP block label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block.
    key = 'key_example' # str | The label key
    try:
        # Delete IP block labels
        api_instance.ipblocks_labels_delete(ipblock_id, key)
    except ApiException as e:
        print('Exception when calling LabelsApi.ipblocks_labels_delete: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **ipblock\_id**         | **str**  | The unique ID of the IP block.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

void (empty response body)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **ipblocks\_labels\_find\_by\_key**

> LabelResource ipblocks\_labels\_find\_by\_key(ipblock\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve IP block labels

Retrieve the properties of the specified IP block label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block.
    key = 'key_example' # str | The label key
    try:
        # Retrieve IP block labels
        api_response = api_instance.ipblocks_labels_find_by_key(ipblock_id, key)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.ipblocks_labels_find_by_key: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **ipblock\_id**         | **str**  | The unique ID of the IP block.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **ipblocks\_labels\_get**

> LabelResources ipblocks\_labels\_get(ipblock\_id, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List IP block labels

List all the the labels for the specified IP block.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block.
    try:
        # List IP block labels
        api_response = api_instance.ipblocks_labels_get(ipblock_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.ipblocks_labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **ipblock\_id**         | **str**  | The unique ID of the IP block.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResources**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresources)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **ipblocks\_labels\_post**

> LabelResource ipblocks\_labels\_post(ipblock\_id, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Create IP block labels

Add a new label to the specified IP block.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block.
    label = ionoscloud.LabelResource() # LabelResource | The label to create.
    try:
        # Create IP block labels
        api_response = api_instance.ipblocks_labels_post(ipblock_id, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.ipblocks_labels_post: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **ipblock\_id**         | **str**                                                                                                        | The unique ID of the IP block.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The label to create.                                                                                                                                                                                                                                                                                                                                                                                                                     |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **ipblocks\_labels\_put**

> LabelResource ipblocks\_labels\_put(ipblock\_id, key, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Modify a IP Block Label by ID

Modifies the specified IP block label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block.
    key = 'key_example' # str | The label key
    label = ionoscloud.LabelResource() # LabelResource | The modified label
    try:
        # Modify a IP Block Label by ID
        api_response = api_instance.ipblocks_labels_put(ipblock_id, key, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.ipblocks_labels_put: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **ipblock\_id**         | **str**                                                                                                        | The unique ID of the IP block.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**                                                                                                        | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The modified label                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **labels\_find\_by\_urn**

> Label labels\_find\_by\_urn(labelurn, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve labels by URN

Retrieve a label by label URN. The URN is unique for each label, and consists of: urn:label:\<resource\_type>:\<resource\_uuid>:

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    labelurn = 'labelurn_example' # str | The label URN; URN is unique for each label, and consists of:  urn:label:<resource_type>:<resource_uuid>:<key><key>
    try:
        # Retrieve labels by URN
        api_response = api_instance.labels_find_by_urn(labelurn)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.labels_find_by_urn: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **labelurn**            | **str**  | The label URN; URN is unique for each label, and consists of: urn:label:\<resource\_type>:\<resource\_uuid>:\<key>\<key>                                                                                                                                                                                                                                                                                                                 |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Label**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/label)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **labels\_get**

> Labels labels\_get(pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List labels

List all available labels.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    try:
        # List labels 
        api_response = api_instance.labels_get()
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**Labels**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labels)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **snapshots\_labels\_delete**

> snapshots\_labels\_delete(snapshot\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Delete snapshot labels

Delete the specified snapshot label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot.
    key = 'key_example' # str | The label key
    try:
        # Delete snapshot labels
        api_instance.snapshots_labels_delete(snapshot_id, key)
    except ApiException as e:
        print('Exception when calling LabelsApi.snapshots_labels_delete: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **snapshot\_id**        | **str**  | The unique ID of the snapshot.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

void (empty response body)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **snapshots\_labels\_find\_by\_key**

> LabelResource snapshots\_labels\_find\_by\_key(snapshot\_id, key, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Retrieve snapshot labels

Retrieve the properties of the specified snapshot label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot.
    key = 'key_example' # str | The label key
    try:
        # Retrieve snapshot labels
        api_response = api_instance.snapshots_labels_find_by_key(snapshot_id, key)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.snapshots_labels_find_by_key: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **snapshot\_id**        | **str**  | The unique ID of the snapshot.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**  | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **snapshots\_labels\_get**

> LabelResources snapshots\_labels\_get(snapshot\_id, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

List snapshot labels

List all the the labels for the specified snapshot.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot.
    try:
        # List snapshot labels
        api_response = api_instance.snapshots_labels_get(snapshot_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.snapshots_labels_get: %s\n' % e)
```

#### Parameters

| Name                    | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **snapshot\_id**        | **str**  | The unique ID of the snapshot.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **pretty**              | **bool** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResources**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresources)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **snapshots\_labels\_post**

> LabelResource snapshots\_labels\_post(snapshot\_id, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Create a Snapshot Label

Adds a new label to the specified snapshot.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot.
    label = ionoscloud.LabelResource() # LabelResource | The label to create.
    try:
        # Create a Snapshot Label
        api_response = api_instance.snapshots_labels_post(snapshot_id, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.snapshots_labels_post: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **snapshot\_id**        | **str**                                                                                                        | The unique ID of the snapshot.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The label to create.                                                                                                                                                                                                                                                                                                                                                                                                                     |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **snapshots\_labels\_put**

> LabelResource snapshots\_labels\_put(snapshot\_id, key, label, pretty=pretty, depth=depth, x\_contract\_number=x\_contract\_number)

Modify a Snapshot Label by ID

Modifies the specified snapshot label.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v6',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.LabelsApi(api_client)
    snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot.
    key = 'key_example' # str | The label key
    label = ionoscloud.LabelResource() # LabelResource | The modified label
    try:
        # Modify a Snapshot Label by ID
        api_response = api_instance.snapshots_labels_put(snapshot_id, key, label)
        print(api_response)
    except ApiException as e:
        print('Exception when calling LabelsApi.snapshots_labels_put: %s\n' % e)
```

#### Parameters

| Name                    | Type                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **snapshot\_id**        | **str**                                                                                                        | The unique ID of the snapshot.                                                                                                                                                                                                                                                                                                                                                                                                           |                                |
| **key**                 | **str**                                                                                                        | The label key                                                                                                                                                                                                                                                                                                                                                                                                                            |                                |
| **label**               | [**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource) | The modified label                                                                                                                                                                                                                                                                                                                                                                                                                       |                                |
| **pretty**              | **bool**                                                                                                       | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                       | \[optional] \[default to True] |
| **depth**               | **int**                                                                                                        | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | \[optional] \[default to 0]    |
| **x\_contract\_number** | **int**                                                                                                        | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                           | \[optional]                    |

#### Return type

[**LabelResource**](https://docs.ionos.com/sections-test/python-sdk/cloud-api-python-sdk/models/labelresource)

#### Authorization

Basic Authentication, Token Authentication

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json
