././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2402747 ionoscloud-6.1.13/0000755000175100001660000000000015046550321013364 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976426.0 ionoscloud-6.1.13/LICENSE0000644000175100001660000002477515046550252014413 0ustar00runnerdocker Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2021 IONOS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2402747 ionoscloud-6.1.13/PKG-INFO0000644000175100001660000021644015046550321014470 0ustar00runnerdockerMetadata-Version: 2.1 Name: ionoscloud Version: 6.1.13 Summary: Python SDK for the Ionos Cloud API Home-page: https://github.com/ionos-cloud/ionos-cloud-sdk-python Author: Ionos Cloud Author-email: sdk@cloud.ionos.com Keywords: OpenAPI,OpenAPI-Generator,CLOUD API Classifier: Natural Language :: English Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Software Development :: Libraries :: Application Frameworks Classifier: Topic :: Internet :: WWW/HTTP Description-Content-Type: text/markdown License-File: LICENSE ![CI](https://github.com/ionos-cloud/sdk-resources/workflows/[%20CI%20]%20CloudApi%20V6%20/%20Python/badge.svg) [![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=alert_status)](https://sonarcloud.io/summary?id=ionos-cloud_sdk-python) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=bugs)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Release](https://img.shields.io/github/v/release/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) [![Release Date](https://img.shields.io/github/release-date/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) ![Alt text](.github/IONOS.CLOUD.BLU.svg?raw=true "Title") # Python API client for ionoscloud IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. ## Overview The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. The SDK for Python wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. ### Installation & Usage **Requirements:** - Python >= 3.5 ### pip install Since this package is hosted on [Pypi](https://pypi.org/) you can install it by using: ```bash pip install ionoscloud ``` If the python package is hosted on a repository, you can install directly using: ```bash pip install git+https://github.com/ionos-cloud/sdk-python.git ``` Note: you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ionos-cloud/sdk-python.git` Then import the package: ```python import ionoscloud ``` ### Setuptools Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```bash python setup.py install --user ``` or `sudo python setup.py install` to install the package for all users Then import the package: ```python import ionoscloud ``` > **_NOTE:_** The Python SDK does not support Python 2. It only supports Python >= 3.5. ### Authentication All available server URLs are: - *https://api.ionos.com/cloudapi/v6* - No description provided By default, *https://api.ionos.com/cloudapi/v6* is used, however this can be overriden at authentication, either by setting the `IONOS_API_URL` environment variable or by specifying the `host` parameter when initializing the sdk client. The username and password **or** the authentication token can be manually specified when initializing the SDK client: ```python configuration = ionoscloud.Configuration( username='YOUR_USERNAME', password='YOUR_PASSWORD', token='YOUR_TOKEN', host='API_URL' ) client = ionoscloud.ApiClient(configuration) ``` Environment variables can also be used. This is an example of how one would do that: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), token=os.environ.get('IONOS_TOKEN'), host=os.environ.get('IONOS_API_URL'), ) client = ionoscloud.ApiClient(configuration) ``` **Warning**: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file. ### HTTP proxies You can use http proxies by setting the following environment variables: - `IONOS_HTTP_PROXY` - proxy URL - `IONOS_HTTP_PROXY_HEADERS` - proxy headers Each line in `IONOS_HTTP_PROXY_HEADERS` represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example: ``` Connection: Keep-Alive User-Info: MyID User-Group: my long\nheader value ``` ### Depth Many of the _List_ or _Get_ operations will accept an optional _depth_ argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern. By default, the SDK sets the _depth_ argument to the maximum value. | Depth | Description | | :--- | :--- | | 0 | Only direct properties are included. Children are not included. | | 1 | Direct properties and children's references are returned. | | 2 | Direct properties and children's properties are returned. | | 3 | Direct properties, children's properties, and descendants' references are returned. | | 4 | Direct properties, children's properties, and descendants' properties are returned. | | 5 | Returns all available properties. | ### Pretty The operations will also accept an optional _pretty_ argument. Setting this to a value of `true` or `false` controls whether the response is pretty-printed \(with indentation and new lines\). By default, the SDK sets the _pretty_ argument to `true`. ### Changing the base URL Base URL for the HTTP operation can be changed in the following way: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), host=os.environ.get('IONOS_API_URL'), server_index=None, ) client = ionoscloud.ApiClient(configuration) ``` ## Certificate pinning: You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following: Set env variable IONOS_PINNED_CERT= You can get the sha256 fingerprint most easily from the browser by inspecting the certificate. ## Documentation for API Endpoints All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API Endpoints table | Class | Method | HTTP request | Description | | ------------- | ------------- | ------------- | ------------- | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_find_by_application_load_balancer_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_find_by_application_load_balancer_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID | | BackupUnitsApi | [**backupunits_delete**](docs/api/BackupUnitsApi.md#backupunits_delete) | **DELETE** /backupunits/{backupunitId} | Delete backup units | | BackupUnitsApi | [**backupunits_find_by_id**](docs/api/BackupUnitsApi.md#backupunits_find_by_id) | **GET** /backupunits/{backupunitId} | Retrieve backup units | | BackupUnitsApi | [**backupunits_get**](docs/api/BackupUnitsApi.md#backupunits_get) | **GET** /backupunits | List backup units | | BackupUnitsApi | [**backupunits_patch**](docs/api/BackupUnitsApi.md#backupunits_patch) | **PATCH** /backupunits/{backupunitId} | Partially modify backup units | | BackupUnitsApi | [**backupunits_post**](docs/api/BackupUnitsApi.md#backupunits_post) | **POST** /backupunits | Create backup units | | BackupUnitsApi | [**backupunits_put**](docs/api/BackupUnitsApi.md#backupunits_put) | **PUT** /backupunits/{backupunitId} | Modify backup units | | BackupUnitsApi | [**backupunits_ssourl_get**](docs/api/BackupUnitsApi.md#backupunits_ssourl_get) | **GET** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs | | ContractResourcesApi | [**contracts_get**](docs/api/ContractResourcesApi.md#contracts_get) | **GET** /contracts | Get Contract Information | | DataCentersApi | [**datacenters_delete**](docs/api/DataCentersApi.md#datacenters_delete) | **DELETE** /datacenters/{datacenterId} | Delete data centers | | DataCentersApi | [**datacenters_find_by_id**](docs/api/DataCentersApi.md#datacenters_find_by_id) | **GET** /datacenters/{datacenterId} | Retrieve data centers | | DataCentersApi | [**datacenters_get**](docs/api/DataCentersApi.md#datacenters_get) | **GET** /datacenters | List your data centers | | DataCentersApi | [**datacenters_patch**](docs/api/DataCentersApi.md#datacenters_patch) | **PATCH** /datacenters/{datacenterId} | Partially modify a Data Center by ID | | DataCentersApi | [**datacenters_post**](docs/api/DataCentersApi.md#datacenters_post) | **POST** /datacenters | Create a Data Center | | DataCentersApi | [**datacenters_put**](docs/api/DataCentersApi.md#datacenters_put) | **PUT** /datacenters/{datacenterId} | Modify a Data Center by ID | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_delete**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_find_by_id**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_get**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_patch**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_post**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_put**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_delete**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_find_by_id**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_get**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_patch**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_post**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_put**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs | | IPBlocksApi | [**ipblocks_delete**](docs/api/IPBlocksApi.md#ipblocks_delete) | **DELETE** /ipblocks/{ipblockId} | Delete IP blocks | | IPBlocksApi | [**ipblocks_find_by_id**](docs/api/IPBlocksApi.md#ipblocks_find_by_id) | **GET** /ipblocks/{ipblockId} | Retrieve IP blocks | | IPBlocksApi | [**ipblocks_get**](docs/api/IPBlocksApi.md#ipblocks_get) | **GET** /ipblocks | List IP blocks | | IPBlocksApi | [**ipblocks_patch**](docs/api/IPBlocksApi.md#ipblocks_patch) | **PATCH** /ipblocks/{ipblockId} | Partially modify IP blocks | | IPBlocksApi | [**ipblocks_post**](docs/api/IPBlocksApi.md#ipblocks_post) | **POST** /ipblocks | Reserve a IP Block | | IPBlocksApi | [**ipblocks_put**](docs/api/IPBlocksApi.md#ipblocks_put) | **PUT** /ipblocks/{ipblockId} | Modify a IP Block by ID | | ImagesApi | [**images_delete**](docs/api/ImagesApi.md#images_delete) | **DELETE** /images/{imageId} | Delete images | | ImagesApi | [**images_find_by_id**](docs/api/ImagesApi.md#images_find_by_id) | **GET** /images/{imageId} | Retrieve images | | ImagesApi | [**images_get**](docs/api/ImagesApi.md#images_get) | **GET** /images | List images | | ImagesApi | [**images_patch**](docs/api/ImagesApi.md#images_patch) | **PATCH** /images/{imageId} | Partially modify images | | ImagesApi | [**images_put**](docs/api/ImagesApi.md#images_put) | **PUT** /images/{imageId} | Modify an Image by ID | | KubernetesApi | [**k8s_delete**](docs/api/KubernetesApi.md#k8s_delete) | **DELETE** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_find_by_cluster_id**](docs/api/KubernetesApi.md#k8s_find_by_cluster_id) | **GET** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_get**](docs/api/KubernetesApi.md#k8s_get) | **GET** /k8s | Get Kubernetes Clusters | | KubernetesApi | [**k8s_kubeconfig_get**](docs/api/KubernetesApi.md#k8s_kubeconfig_get) | **GET** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File | | KubernetesApi | [**k8s_nodepools_delete**](docs/api/KubernetesApi.md#k8s_nodepools_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_get**](docs/api/KubernetesApi.md#k8s_nodepools_get) | **GET** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools | | KubernetesApi | [**k8s_nodepools_nodes_delete**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_get**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_get) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes | | KubernetesApi | [**k8s_nodepools_nodes_replace_post**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_replace_post) | **POST** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_post**](docs/api/KubernetesApi.md#k8s_nodepools_post) | **POST** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool | | KubernetesApi | [**k8s_nodepools_put**](docs/api/KubernetesApi.md#k8s_nodepools_put) | **PUT** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_post**](docs/api/KubernetesApi.md#k8s_post) | **POST** /k8s | Create a Kubernetes Cluster | | KubernetesApi | [**k8s_put**](docs/api/KubernetesApi.md#k8s_put) | **PUT** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_versions_default_get**](docs/api/KubernetesApi.md#k8s_versions_default_get) | **GET** /k8s/versions/default | Get Default Kubernetes Version | | KubernetesApi | [**k8s_versions_get**](docs/api/KubernetesApi.md#k8s_versions_get) | **GET** /k8s/versions | Get Kubernetes Versions | | LANsApi | [**datacenters_lans_delete**](docs/api/LANsApi.md#datacenters_lans_delete) | **DELETE** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs | | LANsApi | [**datacenters_lans_find_by_id**](docs/api/LANsApi.md#datacenters_lans_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs | | LANsApi | [**datacenters_lans_get**](docs/api/LANsApi.md#datacenters_lans_get) | **GET** /datacenters/{datacenterId}/lans | List LANs | | LANsApi | [**datacenters_lans_nics_find_by_id**](docs/api/LANsApi.md#datacenters_lans_nics_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs | | LANsApi | [**datacenters_lans_nics_get**](docs/api/LANsApi.md#datacenters_lans_nics_get) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members | | LANsApi | [**datacenters_lans_nics_post**](docs/api/LANsApi.md#datacenters_lans_nics_post) | **POST** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs | | LANsApi | [**datacenters_lans_patch**](docs/api/LANsApi.md#datacenters_lans_patch) | **PATCH** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs | | LANsApi | [**datacenters_lans_post**](docs/api/LANsApi.md#datacenters_lans_post) | **POST** /datacenters/{datacenterId}/lans | Create LANs | | LANsApi | [**datacenters_lans_put**](docs/api/LANsApi.md#datacenters_lans_put) | **PUT** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs | | LabelsApi | [**datacenters_labels_delete**](docs/api/LabelsApi.md#datacenters_labels_delete) | **DELETE** /datacenters/{datacenterId}/labels/{key} | Delete data center labels | | LabelsApi | [**datacenters_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_labels_find_by_key) | **GET** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels | | LabelsApi | [**datacenters_labels_get**](docs/api/LabelsApi.md#datacenters_labels_get) | **GET** /datacenters/{datacenterId}/labels | List data center labels | | LabelsApi | [**datacenters_labels_post**](docs/api/LabelsApi.md#datacenters_labels_post) | **POST** /datacenters/{datacenterId}/labels | Create a Data Center Label | | LabelsApi | [**datacenters_labels_put**](docs/api/LabelsApi.md#datacenters_labels_put) | **PUT** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key | | LabelsApi | [**datacenters_servers_labels_delete**](docs/api/LabelsApi.md#datacenters_servers_labels_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels | | LabelsApi | [**datacenters_servers_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_servers_labels_find_by_key) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels | | LabelsApi | [**datacenters_servers_labels_get**](docs/api/LabelsApi.md#datacenters_servers_labels_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels | | LabelsApi | [**datacenters_servers_labels_post**](docs/api/LabelsApi.md#datacenters_servers_labels_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label | | LabelsApi | [**datacenters_servers_labels_put**](docs/api/LabelsApi.md#datacenters_servers_labels_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label | | LabelsApi | [**datacenters_volumes_labels_delete**](docs/api/LabelsApi.md#datacenters_volumes_labels_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels | | LabelsApi | [**datacenters_volumes_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_volumes_labels_find_by_key) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels | | LabelsApi | [**datacenters_volumes_labels_get**](docs/api/LabelsApi.md#datacenters_volumes_labels_get) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels | | LabelsApi | [**datacenters_volumes_labels_post**](docs/api/LabelsApi.md#datacenters_volumes_labels_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label | | LabelsApi | [**datacenters_volumes_labels_put**](docs/api/LabelsApi.md#datacenters_volumes_labels_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label | | LabelsApi | [**images_labels_delete**](docs/api/LabelsApi.md#images_labels_delete) | **DELETE** /images/{imageId}/labels/{key} | Delete image label | | LabelsApi | [**images_labels_find_by_key**](docs/api/LabelsApi.md#images_labels_find_by_key) | **GET** /images/{imageId}/labels/{key} | Retrieve image labels | | LabelsApi | [**images_labels_get**](docs/api/LabelsApi.md#images_labels_get) | **GET** /images/{imageId}/labels | List image labels | | LabelsApi | [**images_labels_post**](docs/api/LabelsApi.md#images_labels_post) | **POST** /images/{imageId}/labels | Create an Image Label | | LabelsApi | [**images_labels_put**](docs/api/LabelsApi.md#images_labels_put) | **PUT** /images/{imageId}/labels/{key} | Modify an Image Label by Key | | LabelsApi | [**ipblocks_labels_delete**](docs/api/LabelsApi.md#ipblocks_labels_delete) | **DELETE** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels | | LabelsApi | [**ipblocks_labels_find_by_key**](docs/api/LabelsApi.md#ipblocks_labels_find_by_key) | **GET** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels | | LabelsApi | [**ipblocks_labels_get**](docs/api/LabelsApi.md#ipblocks_labels_get) | **GET** /ipblocks/{ipblockId}/labels | List IP block labels | | LabelsApi | [**ipblocks_labels_post**](docs/api/LabelsApi.md#ipblocks_labels_post) | **POST** /ipblocks/{ipblockId}/labels | Create IP block labels | | LabelsApi | [**ipblocks_labels_put**](docs/api/LabelsApi.md#ipblocks_labels_put) | **PUT** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID | | LabelsApi | [**labels_find_by_urn**](docs/api/LabelsApi.md#labels_find_by_urn) | **GET** /labels/{labelurn} | Retrieve labels by URN | | LabelsApi | [**labels_get**](docs/api/LabelsApi.md#labels_get) | **GET** /labels | List labels | | LabelsApi | [**snapshots_labels_delete**](docs/api/LabelsApi.md#snapshots_labels_delete) | **DELETE** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels | | LabelsApi | [**snapshots_labels_find_by_key**](docs/api/LabelsApi.md#snapshots_labels_find_by_key) | **GET** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels | | LabelsApi | [**snapshots_labels_get**](docs/api/LabelsApi.md#snapshots_labels_get) | **GET** /snapshots/{snapshotId}/labels | List snapshot labels | | LabelsApi | [**snapshots_labels_post**](docs/api/LabelsApi.md#snapshots_labels_post) | **POST** /snapshots/{snapshotId}/labels | Create a Snapshot Label | | LabelsApi | [**snapshots_labels_put**](docs/api/LabelsApi.md#snapshots_labels_put) | **PUT** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_find_by_nic_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_find_by_nic_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_get) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_post) | **POST** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_find_by_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_find_by_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_get) | **GET** /datacenters/{datacenterId}/loadbalancers | List Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_patch**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_post) | **POST** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer | | LoadBalancersApi | [**datacenters_loadbalancers_put**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_put) | **PUT** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID | | LocationsApi | [**locations_find_by_region_id**](docs/api/LocationsApi.md#locations_find_by_region_id) | **GET** /locations/{regionId} | Get Locations within a Region | | LocationsApi | [**locations_find_by_region_id_and_id**](docs/api/LocationsApi.md#locations_find_by_region_id_and_id) | **GET** /locations/{regionId}/{locationId} | Get Location by ID | | LocationsApi | [**locations_get**](docs/api/LocationsApi.md#locations_get) | **GET** /locations | Get Locations | | NATGatewaysApi | [**datacenters_natgateways_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_find_by_nat_gateway_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_find_by_nat_gateway_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_find_by_flow_log_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_get) | **GET** /datacenters/{datacenterId}/natgateways | List NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_post) | **POST** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway | | NATGatewaysApi | [**datacenters_natgateways_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_rules_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_find_by_nat_gateway_rule_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_find_by_nat_gateway_rule_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID | | NATGatewaysApi | [**datacenters_natgateways_rules_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule | | NATGatewaysApi | [**datacenters_natgateways_rules_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_find_by_network_load_balancer_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_find_by_network_load_balancer_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers | | NetworkInterfacesApi | [**datacenters_servers_nics_delete**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_find_by_id**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_get**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_patch**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_post**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC | | NetworkInterfacesApi | [**datacenters_servers_nics_put**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs | | PrivateCrossConnectsApi | [**pccs_delete**](docs/api/PrivateCrossConnectsApi.md#pccs_delete) | **DELETE** /pccs/{pccId} | Delete Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_find_by_id**](docs/api/PrivateCrossConnectsApi.md#pccs_find_by_id) | **GET** /pccs/{pccId} | Retrieve a Cross Connect | | PrivateCrossConnectsApi | [**pccs_get**](docs/api/PrivateCrossConnectsApi.md#pccs_get) | **GET** /pccs | List Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_patch**](docs/api/PrivateCrossConnectsApi.md#pccs_patch) | **PATCH** /pccs/{pccId} | Partially modify a Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_post**](docs/api/PrivateCrossConnectsApi.md#pccs_post) | **POST** /pccs | Create a Cross Connect | | RequestsApi | [**requests_find_by_id**](docs/api/RequestsApi.md#requests_find_by_id) | **GET** /requests/{requestId} | Retrieve requests | | RequestsApi | [**requests_get**](docs/api/RequestsApi.md#requests_get) | **GET** /requests | List requests | | RequestsApi | [**requests_status_get**](docs/api/RequestsApi.md#requests_status_get) | **GET** /requests/{requestId}/status | Retrieve request status | | SecurityGroupsApi | [**datacenters_securitygroups_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Delete a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Retrieve a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Remove a Firewall Rule from a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_post) | **POST** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | Create Firewall rule to a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_get) | **GET** /datacenters/{datacenterId}/securitygroups | List Security Groups | | SecurityGroupsApi | [**datacenters_securitygroups_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Partially modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_post) | **POST** /datacenters/{datacenterId}/securitygroups | Create a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_rules_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Retrieve security group rule by id | | SecurityGroupsApi | [**datacenters_securitygroups_rules_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_get) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | List Security Group rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Partially modify Security Group Rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Modify a Security Group Rule | | SecurityGroupsApi | [**datacenters_servers_nics_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_nics_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups | Attach a list of Security Groups to a NIC | | SecurityGroupsApi | [**datacenters_servers_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/securitygroups | Attach a list of Security Groups to a Server | | ServersApi | [**datacenters_servers_cdroms_delete**](docs/api/ServersApi.md#datacenters_servers_cdroms_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_find_by_id**](docs/api/ServersApi.md#datacenters_servers_cdroms_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_get**](docs/api/ServersApi.md#datacenters_servers_cdroms_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs | | ServersApi | [**datacenters_servers_cdroms_post**](docs/api/ServersApi.md#datacenters_servers_cdroms_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM | | ServersApi | [**datacenters_servers_delete**](docs/api/ServersApi.md#datacenters_servers_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId} | Delete servers | | ServersApi | [**datacenters_servers_find_by_id**](docs/api/ServersApi.md#datacenters_servers_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID | | ServersApi | [**datacenters_servers_get**](docs/api/ServersApi.md#datacenters_servers_get) | **GET** /datacenters/{datacenterId}/servers | List servers | | ServersApi | [**datacenters_servers_patch**](docs/api/ServersApi.md#datacenters_servers_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers | | ServersApi | [**datacenters_servers_post**](docs/api/ServersApi.md#datacenters_servers_post) | **POST** /datacenters/{datacenterId}/servers | Create a Server | | ServersApi | [**datacenters_servers_put**](docs/api/ServersApi.md#datacenters_servers_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID | | ServersApi | [**datacenters_servers_reboot_post**](docs/api/ServersApi.md#datacenters_servers_reboot_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers | | ServersApi | [**datacenters_servers_remote_console_get**](docs/api/ServersApi.md#datacenters_servers_remote_console_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link | | ServersApi | [**datacenters_servers_resume_post**](docs/api/ServersApi.md#datacenters_servers_resume_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID | | ServersApi | [**datacenters_servers_start_post**](docs/api/ServersApi.md#datacenters_servers_start_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID | | ServersApi | [**datacenters_servers_stop_post**](docs/api/ServersApi.md#datacenters_servers_stop_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID | | ServersApi | [**datacenters_servers_suspend_post**](docs/api/ServersApi.md#datacenters_servers_suspend_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID | | ServersApi | [**datacenters_servers_token_get**](docs/api/ServersApi.md#datacenters_servers_token_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/token | Get JSON Web Token | | ServersApi | [**datacenters_servers_upgrade_post**](docs/api/ServersApi.md#datacenters_servers_upgrade_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID | | ServersApi | [**datacenters_servers_volumes_delete**](docs/api/ServersApi.md#datacenters_servers_volumes_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID | | ServersApi | [**datacenters_servers_volumes_find_by_id**](docs/api/ServersApi.md#datacenters_servers_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID | | ServersApi | [**datacenters_servers_volumes_get**](docs/api/ServersApi.md#datacenters_servers_volumes_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes | | ServersApi | [**datacenters_servers_volumes_post**](docs/api/ServersApi.md#datacenters_servers_volumes_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server | | SnapshotsApi | [**snapshots_delete**](docs/api/SnapshotsApi.md#snapshots_delete) | **DELETE** /snapshots/{snapshotId} | Delete snapshots | | SnapshotsApi | [**snapshots_find_by_id**](docs/api/SnapshotsApi.md#snapshots_find_by_id) | **GET** /snapshots/{snapshotId} | Retrieve snapshots by ID | | SnapshotsApi | [**snapshots_get**](docs/api/SnapshotsApi.md#snapshots_get) | **GET** /snapshots | List snapshots | | SnapshotsApi | [**snapshots_patch**](docs/api/SnapshotsApi.md#snapshots_patch) | **PATCH** /snapshots/{snapshotId} | Partially modify snapshots | | SnapshotsApi | [**snapshots_put**](docs/api/SnapshotsApi.md#snapshots_put) | **PUT** /snapshots/{snapshotId} | Modify a Snapshot by ID | | TargetGroupsApi | [**target_groups_delete**](docs/api/TargetGroupsApi.md#target_groups_delete) | **DELETE** /targetgroups/{targetGroupId} | Delete a Target Group by ID | | TargetGroupsApi | [**targetgroups_find_by_target_group_id**](docs/api/TargetGroupsApi.md#targetgroups_find_by_target_group_id) | **GET** /targetgroups/{targetGroupId} | Get a Target Group by ID | | TargetGroupsApi | [**targetgroups_get**](docs/api/TargetGroupsApi.md#targetgroups_get) | **GET** /targetgroups | Get Target Groups | | TargetGroupsApi | [**targetgroups_patch**](docs/api/TargetGroupsApi.md#targetgroups_patch) | **PATCH** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID | | TargetGroupsApi | [**targetgroups_post**](docs/api/TargetGroupsApi.md#targetgroups_post) | **POST** /targetgroups | Create a Target Group | | TargetGroupsApi | [**targetgroups_put**](docs/api/TargetGroupsApi.md#targetgroups_put) | **PUT** /targetgroups/{targetGroupId} | Modify a Target Group by ID | | TemplatesApi | [**templates_find_by_id**](docs/api/TemplatesApi.md#templates_find_by_id) | **GET** /templates/{templateId} | Get Cubes Template by ID | | TemplatesApi | [**templates_get**](docs/api/TemplatesApi.md#templates_get) | **GET** /templates | Get Cubes Templates | | UserS3KeysApi | [**um_users_s3keys_delete**](docs/api/UserS3KeysApi.md#um_users_s3keys_delete) | **DELETE** /um/users/{userId}/s3keys/{keyId} | Delete Object storage keys | | UserS3KeysApi | [**um_users_s3keys_find_by_key_id**](docs/api/UserS3KeysApi.md#um_users_s3keys_find_by_key_id) | **GET** /um/users/{userId}/s3keys/{keyId} | Retrieve user Object storage keys by key ID | | UserS3KeysApi | [**um_users_s3keys_get**](docs/api/UserS3KeysApi.md#um_users_s3keys_get) | **GET** /um/users/{userId}/s3keys | List user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_post**](docs/api/UserS3KeysApi.md#um_users_s3keys_post) | **POST** /um/users/{userId}/s3keys | Create user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_put**](docs/api/UserS3KeysApi.md#um_users_s3keys_put) | **PUT** /um/users/{userId}/s3keys/{keyId} | Modify a Object storage Key by Key ID | | UserS3KeysApi | [**um_users_s3ssourl_get**](docs/api/UserS3KeysApi.md#um_users_s3ssourl_get) | **GET** /um/users/{userId}/s3ssourl | Retrieve Object storage single sign-on URLs | | UserManagementApi | [**um_groups_delete**](docs/api/UserManagementApi.md#um_groups_delete) | **DELETE** /um/groups/{groupId} | Delete groups | | UserManagementApi | [**um_groups_find_by_id**](docs/api/UserManagementApi.md#um_groups_find_by_id) | **GET** /um/groups/{groupId} | Retrieve groups | | UserManagementApi | [**um_groups_get**](docs/api/UserManagementApi.md#um_groups_get) | **GET** /um/groups | List all groups | | UserManagementApi | [**um_groups_post**](docs/api/UserManagementApi.md#um_groups_post) | **POST** /um/groups | Create groups | | UserManagementApi | [**um_groups_put**](docs/api/UserManagementApi.md#um_groups_put) | **PUT** /um/groups/{groupId} | Modify groups | | UserManagementApi | [**um_groups_resources_get**](docs/api/UserManagementApi.md#um_groups_resources_get) | **GET** /um/groups/{groupId}/resources | Retrieve group resources | | UserManagementApi | [**um_groups_shares_delete**](docs/api/UserManagementApi.md#um_groups_shares_delete) | **DELETE** /um/groups/{groupId}/shares/{resourceId} | Remove group shares | | UserManagementApi | [**um_groups_shares_find_by_resource_id**](docs/api/UserManagementApi.md#um_groups_shares_find_by_resource_id) | **GET** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares | | UserManagementApi | [**um_groups_shares_get**](docs/api/UserManagementApi.md#um_groups_shares_get) | **GET** /um/groups/{groupId}/shares | List group shares | | UserManagementApi | [**um_groups_shares_post**](docs/api/UserManagementApi.md#um_groups_shares_post) | **POST** /um/groups/{groupId}/shares/{resourceId} | Add group shares | | UserManagementApi | [**um_groups_shares_put**](docs/api/UserManagementApi.md#um_groups_shares_put) | **PUT** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges | | UserManagementApi | [**um_groups_users_delete**](docs/api/UserManagementApi.md#um_groups_users_delete) | **DELETE** /um/groups/{groupId}/users/{userId} | Remove users from groups | | UserManagementApi | [**um_groups_users_get**](docs/api/UserManagementApi.md#um_groups_users_get) | **GET** /um/groups/{groupId}/users | List group members | | UserManagementApi | [**um_groups_users_post**](docs/api/UserManagementApi.md#um_groups_users_post) | **POST** /um/groups/{groupId}/users | Add a Group Member | | UserManagementApi | [**um_resources_find_by_type**](docs/api/UserManagementApi.md#um_resources_find_by_type) | **GET** /um/resources/{resourceType} | List resources by type | | UserManagementApi | [**um_resources_find_by_type_and_id**](docs/api/UserManagementApi.md#um_resources_find_by_type_and_id) | **GET** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type | | UserManagementApi | [**um_resources_get**](docs/api/UserManagementApi.md#um_resources_get) | **GET** /um/resources | List all resources | | UserManagementApi | [**um_users_delete**](docs/api/UserManagementApi.md#um_users_delete) | **DELETE** /um/users/{userId} | Delete users | | UserManagementApi | [**um_users_find_by_id**](docs/api/UserManagementApi.md#um_users_find_by_id) | **GET** /um/users/{userId} | Retrieve users | | UserManagementApi | [**um_users_get**](docs/api/UserManagementApi.md#um_users_get) | **GET** /um/users | List all users | | UserManagementApi | [**um_users_groups_get**](docs/api/UserManagementApi.md#um_users_groups_get) | **GET** /um/users/{userId}/groups | Retrieve group resources by user ID | | UserManagementApi | [**um_users_owns_get**](docs/api/UserManagementApi.md#um_users_owns_get) | **GET** /um/users/{userId}/owns | Retrieve user resources by user ID | | UserManagementApi | [**um_users_post**](docs/api/UserManagementApi.md#um_users_post) | **POST** /um/users | Create users | | UserManagementApi | [**um_users_put**](docs/api/UserManagementApi.md#um_users_put) | **PUT** /um/users/{userId} | Modify users | | VolumesApi | [**datacenters_volumes_create_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_create_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots | | VolumesApi | [**datacenters_volumes_delete**](docs/api/VolumesApi.md#datacenters_volumes_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes | | VolumesApi | [**datacenters_volumes_find_by_id**](docs/api/VolumesApi.md#datacenters_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes | | VolumesApi | [**datacenters_volumes_get**](docs/api/VolumesApi.md#datacenters_volumes_get) | **GET** /datacenters/{datacenterId}/volumes | List volumes | | VolumesApi | [**datacenters_volumes_patch**](docs/api/VolumesApi.md#datacenters_volumes_patch) | **PATCH** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes | | VolumesApi | [**datacenters_volumes_post**](docs/api/VolumesApi.md#datacenters_volumes_post) | **POST** /datacenters/{datacenterId}/volumes | Create a Volume | | VolumesApi | [**datacenters_volumes_put**](docs/api/VolumesApi.md#datacenters_volumes_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID | | VolumesApi | [**datacenters_volumes_restore_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_restore_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots | | Api | [**api_info_get**](docs/api/Api.md#api_info_get) | **GET** / | Get API information |
## Documentation For Models All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API models list - [ApplicationLoadBalancer](docs/models/ApplicationLoadBalancer) - [ApplicationLoadBalancerEntities](docs/models/ApplicationLoadBalancerEntities) - [ApplicationLoadBalancerForwardingRule](docs/models/ApplicationLoadBalancerForwardingRule) - [ApplicationLoadBalancerForwardingRuleProperties](docs/models/ApplicationLoadBalancerForwardingRuleProperties) - [ApplicationLoadBalancerForwardingRulePut](docs/models/ApplicationLoadBalancerForwardingRulePut) - [ApplicationLoadBalancerForwardingRules](docs/models/ApplicationLoadBalancerForwardingRules) - [ApplicationLoadBalancerHttpRule](docs/models/ApplicationLoadBalancerHttpRule) - [ApplicationLoadBalancerHttpRuleCondition](docs/models/ApplicationLoadBalancerHttpRuleCondition) - [ApplicationLoadBalancerProperties](docs/models/ApplicationLoadBalancerProperties) - [ApplicationLoadBalancerPut](docs/models/ApplicationLoadBalancerPut) - [ApplicationLoadBalancers](docs/models/ApplicationLoadBalancers) - [AttachedVolumes](docs/models/AttachedVolumes) - [BackupUnit](docs/models/BackupUnit) - [BackupUnitProperties](docs/models/BackupUnitProperties) - [BackupUnitSSO](docs/models/BackupUnitSSO) - [BackupUnits](docs/models/BackupUnits) - [BalancedNics](docs/models/BalancedNics) - [Cdroms](docs/models/Cdroms) - [ConnectableDatacenter](docs/models/ConnectableDatacenter) - [Contract](docs/models/Contract) - [ContractProperties](docs/models/ContractProperties) - [Contracts](docs/models/Contracts) - [CpuArchitectureProperties](docs/models/CpuArchitectureProperties) - [CreateSnapshot](docs/models/CreateSnapshot) - [CreateSnapshotProperties](docs/models/CreateSnapshotProperties) - [DataCenterEntities](docs/models/DataCenterEntities) - [Datacenter](docs/models/Datacenter) - [DatacenterElementMetadata](docs/models/DatacenterElementMetadata) - [DatacenterPost](docs/models/DatacenterPost) - [DatacenterProperties](docs/models/DatacenterProperties) - [DatacenterPropertiesPost](docs/models/DatacenterPropertiesPost) - [DatacenterPropertiesPut](docs/models/DatacenterPropertiesPut) - [DatacenterPut](docs/models/DatacenterPut) - [Datacenters](docs/models/Datacenters) - [Error](docs/models/Error) - [ErrorMessage](docs/models/ErrorMessage) - [FirewallRule](docs/models/FirewallRule) - [FirewallRules](docs/models/FirewallRules) - [FirewallruleProperties](docs/models/FirewallruleProperties) - [FlowLog](docs/models/FlowLog) - [FlowLogProperties](docs/models/FlowLogProperties) - [FlowLogPut](docs/models/FlowLogPut) - [FlowLogs](docs/models/FlowLogs) - [Group](docs/models/Group) - [GroupEntities](docs/models/GroupEntities) - [GroupMembers](docs/models/GroupMembers) - [GroupProperties](docs/models/GroupProperties) - [GroupShare](docs/models/GroupShare) - [GroupShareProperties](docs/models/GroupShareProperties) - [GroupShares](docs/models/GroupShares) - [GroupUsers](docs/models/GroupUsers) - [Groups](docs/models/Groups) - [IPFailover](docs/models/IPFailover) - [Image](docs/models/Image) - [ImageProperties](docs/models/ImageProperties) - [Images](docs/models/Images) - [Info](docs/models/Info) - [IpBlock](docs/models/IpBlock) - [IpBlockProperties](docs/models/IpBlockProperties) - [IpBlocks](docs/models/IpBlocks) - [IpConsumer](docs/models/IpConsumer) - [KubernetesAutoScaling](docs/models/KubernetesAutoScaling) - [KubernetesCluster](docs/models/KubernetesCluster) - [KubernetesClusterEntities](docs/models/KubernetesClusterEntities) - [KubernetesClusterForPost](docs/models/KubernetesClusterForPost) - [KubernetesClusterForPut](docs/models/KubernetesClusterForPut) - [KubernetesClusterProperties](docs/models/KubernetesClusterProperties) - [KubernetesClusterPropertiesForPost](docs/models/KubernetesClusterPropertiesForPost) - [KubernetesClusterPropertiesForPut](docs/models/KubernetesClusterPropertiesForPut) - [KubernetesClusters](docs/models/KubernetesClusters) - [KubernetesMaintenanceWindow](docs/models/KubernetesMaintenanceWindow) - [KubernetesNode](docs/models/KubernetesNode) - [KubernetesNodeMetadata](docs/models/KubernetesNodeMetadata) - [KubernetesNodePool](docs/models/KubernetesNodePool) - [KubernetesNodePoolForPost](docs/models/KubernetesNodePoolForPost) - [KubernetesNodePoolForPut](docs/models/KubernetesNodePoolForPut) - [KubernetesNodePoolLan](docs/models/KubernetesNodePoolLan) - [KubernetesNodePoolLanRoutes](docs/models/KubernetesNodePoolLanRoutes) - [KubernetesNodePoolProperties](docs/models/KubernetesNodePoolProperties) - [KubernetesNodePoolPropertiesForPost](docs/models/KubernetesNodePoolPropertiesForPost) - [KubernetesNodePoolPropertiesForPut](docs/models/KubernetesNodePoolPropertiesForPut) - [KubernetesNodePoolServerType](docs/models/KubernetesNodePoolServerType) - [KubernetesNodePools](docs/models/KubernetesNodePools) - [KubernetesNodeProperties](docs/models/KubernetesNodeProperties) - [KubernetesNodes](docs/models/KubernetesNodes) - [Label](docs/models/Label) - [LabelProperties](docs/models/LabelProperties) - [LabelResource](docs/models/LabelResource) - [LabelResourceProperties](docs/models/LabelResourceProperties) - [LabelResources](docs/models/LabelResources) - [Labels](docs/models/Labels) - [Lan](docs/models/Lan) - [LanEntities](docs/models/LanEntities) - [LanNics](docs/models/LanNics) - [LanProperties](docs/models/LanProperties) - [Lans](docs/models/Lans) - [ListOfIds](docs/models/ListOfIds) - [Loadbalancer](docs/models/Loadbalancer) - [LoadbalancerEntities](docs/models/LoadbalancerEntities) - [LoadbalancerProperties](docs/models/LoadbalancerProperties) - [Loadbalancers](docs/models/Loadbalancers) - [Location](docs/models/Location) - [LocationProperties](docs/models/LocationProperties) - [Locations](docs/models/Locations) - [NatGateway](docs/models/NatGateway) - [NatGatewayEntities](docs/models/NatGatewayEntities) - [NatGatewayLanProperties](docs/models/NatGatewayLanProperties) - [NatGatewayProperties](docs/models/NatGatewayProperties) - [NatGatewayPut](docs/models/NatGatewayPut) - [NatGatewayRule](docs/models/NatGatewayRule) - [NatGatewayRuleProperties](docs/models/NatGatewayRuleProperties) - [NatGatewayRuleProtocol](docs/models/NatGatewayRuleProtocol) - [NatGatewayRulePut](docs/models/NatGatewayRulePut) - [NatGatewayRuleType](docs/models/NatGatewayRuleType) - [NatGatewayRules](docs/models/NatGatewayRules) - [NatGateways](docs/models/NatGateways) - [NetworkLoadBalancer](docs/models/NetworkLoadBalancer) - [NetworkLoadBalancerEntities](docs/models/NetworkLoadBalancerEntities) - [NetworkLoadBalancerForwardingRule](docs/models/NetworkLoadBalancerForwardingRule) - [NetworkLoadBalancerForwardingRuleHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleHealthCheck) - [NetworkLoadBalancerForwardingRuleProperties](docs/models/NetworkLoadBalancerForwardingRuleProperties) - [NetworkLoadBalancerForwardingRulePut](docs/models/NetworkLoadBalancerForwardingRulePut) - [NetworkLoadBalancerForwardingRuleTarget](docs/models/NetworkLoadBalancerForwardingRuleTarget) - [NetworkLoadBalancerForwardingRuleTargetHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck) - [NetworkLoadBalancerForwardingRules](docs/models/NetworkLoadBalancerForwardingRules) - [NetworkLoadBalancerProperties](docs/models/NetworkLoadBalancerProperties) - [NetworkLoadBalancerPut](docs/models/NetworkLoadBalancerPut) - [NetworkLoadBalancers](docs/models/NetworkLoadBalancers) - [Nic](docs/models/Nic) - [NicEntities](docs/models/NicEntities) - [NicProperties](docs/models/NicProperties) - [NicPut](docs/models/NicPut) - [Nics](docs/models/Nics) - [NoStateMetaData](docs/models/NoStateMetaData) - [PaginationLinks](docs/models/PaginationLinks) - [Peer](docs/models/Peer) - [PrivateCrossConnect](docs/models/PrivateCrossConnect) - [PrivateCrossConnectProperties](docs/models/PrivateCrossConnectProperties) - [PrivateCrossConnects](docs/models/PrivateCrossConnects) - [RemoteConsoleUrl](docs/models/RemoteConsoleUrl) - [Request](docs/models/Request) - [RequestMetadata](docs/models/RequestMetadata) - [RequestProperties](docs/models/RequestProperties) - [RequestStatus](docs/models/RequestStatus) - [RequestStatusMetadata](docs/models/RequestStatusMetadata) - [RequestTarget](docs/models/RequestTarget) - [Requests](docs/models/Requests) - [Resource](docs/models/Resource) - [ResourceEntities](docs/models/ResourceEntities) - [ResourceGroups](docs/models/ResourceGroups) - [ResourceLimits](docs/models/ResourceLimits) - [ResourceProperties](docs/models/ResourceProperties) - [ResourceReference](docs/models/ResourceReference) - [Resources](docs/models/Resources) - [ResourcesUsers](docs/models/ResourcesUsers) - [RestoreSnapshot](docs/models/RestoreSnapshot) - [RestoreSnapshotProperties](docs/models/RestoreSnapshotProperties) - [S3Bucket](docs/models/S3Bucket) - [S3Key](docs/models/S3Key) - [S3KeyMetadata](docs/models/S3KeyMetadata) - [S3KeyProperties](docs/models/S3KeyProperties) - [S3Keys](docs/models/S3Keys) - [S3ObjectStorageSSO](docs/models/S3ObjectStorageSSO) - [SecurityGroup](docs/models/SecurityGroup) - [SecurityGroupEntities](docs/models/SecurityGroupEntities) - [SecurityGroupEntitiesRequest](docs/models/SecurityGroupEntitiesRequest) - [SecurityGroupProperties](docs/models/SecurityGroupProperties) - [SecurityGroupRequest](docs/models/SecurityGroupRequest) - [SecurityGroups](docs/models/SecurityGroups) - [Server](docs/models/Server) - [ServerEntities](docs/models/ServerEntities) - [ServerProperties](docs/models/ServerProperties) - [Servers](docs/models/Servers) - [Snapshot](docs/models/Snapshot) - [SnapshotProperties](docs/models/SnapshotProperties) - [Snapshots](docs/models/Snapshots) - [TargetGroup](docs/models/TargetGroup) - [TargetGroupHealthCheck](docs/models/TargetGroupHealthCheck) - [TargetGroupHttpHealthCheck](docs/models/TargetGroupHttpHealthCheck) - [TargetGroupProperties](docs/models/TargetGroupProperties) - [TargetGroupPut](docs/models/TargetGroupPut) - [TargetGroupTarget](docs/models/TargetGroupTarget) - [TargetGroups](docs/models/TargetGroups) - [TargetPortRange](docs/models/TargetPortRange) - [Template](docs/models/Template) - [TemplateProperties](docs/models/TemplateProperties) - [Templates](docs/models/Templates) - [Token](docs/models/Token) - [Type](docs/models/Type) - [User](docs/models/User) - [UserGroupPost](docs/models/UserGroupPost) - [UserMetadata](docs/models/UserMetadata) - [UserPost](docs/models/UserPost) - [UserProperties](docs/models/UserProperties) - [UserPropertiesPost](docs/models/UserPropertiesPost) - [UserPropertiesPut](docs/models/UserPropertiesPut) - [UserPut](docs/models/UserPut) - [Users](docs/models/Users) - [UsersEntities](docs/models/UsersEntities) - [Volume](docs/models/Volume) - [VolumeProperties](docs/models/VolumeProperties) - [Volumes](docs/models/Volumes) [[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/README.md0000644000175100001660000021472615046550312014657 0ustar00runnerdocker![CI](https://github.com/ionos-cloud/sdk-resources/workflows/[%20CI%20]%20CloudApi%20V6%20/%20Python/badge.svg) [![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=alert_status)](https://sonarcloud.io/summary?id=ionos-cloud_sdk-python) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=bugs)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Release](https://img.shields.io/github/v/release/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) [![Release Date](https://img.shields.io/github/release-date/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) ![Alt text](.github/IONOS.CLOUD.BLU.svg?raw=true "Title") # Python API client for ionoscloud IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. ## Overview The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. The SDK for Python wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. ### Installation & Usage **Requirements:** - Python >= 3.5 ### pip install Since this package is hosted on [Pypi](https://pypi.org/) you can install it by using: ```bash pip install ionoscloud ``` If the python package is hosted on a repository, you can install directly using: ```bash pip install git+https://github.com/ionos-cloud/sdk-python.git ``` Note: you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ionos-cloud/sdk-python.git` Then import the package: ```python import ionoscloud ``` ### Setuptools Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```bash python setup.py install --user ``` or `sudo python setup.py install` to install the package for all users Then import the package: ```python import ionoscloud ``` > **_NOTE:_** The Python SDK does not support Python 2. It only supports Python >= 3.5. ### Authentication All available server URLs are: - *https://api.ionos.com/cloudapi/v6* - No description provided By default, *https://api.ionos.com/cloudapi/v6* is used, however this can be overriden at authentication, either by setting the `IONOS_API_URL` environment variable or by specifying the `host` parameter when initializing the sdk client. The username and password **or** the authentication token can be manually specified when initializing the SDK client: ```python configuration = ionoscloud.Configuration( username='YOUR_USERNAME', password='YOUR_PASSWORD', token='YOUR_TOKEN', host='API_URL' ) client = ionoscloud.ApiClient(configuration) ``` Environment variables can also be used. This is an example of how one would do that: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), token=os.environ.get('IONOS_TOKEN'), host=os.environ.get('IONOS_API_URL'), ) client = ionoscloud.ApiClient(configuration) ``` **Warning**: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file. ### HTTP proxies You can use http proxies by setting the following environment variables: - `IONOS_HTTP_PROXY` - proxy URL - `IONOS_HTTP_PROXY_HEADERS` - proxy headers Each line in `IONOS_HTTP_PROXY_HEADERS` represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example: ``` Connection: Keep-Alive User-Info: MyID User-Group: my long\nheader value ``` ### Depth Many of the _List_ or _Get_ operations will accept an optional _depth_ argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern. By default, the SDK sets the _depth_ argument to the maximum value. | Depth | Description | | :--- | :--- | | 0 | Only direct properties are included. Children are not included. | | 1 | Direct properties and children's references are returned. | | 2 | Direct properties and children's properties are returned. | | 3 | Direct properties, children's properties, and descendants' references are returned. | | 4 | Direct properties, children's properties, and descendants' properties are returned. | | 5 | Returns all available properties. | ### Pretty The operations will also accept an optional _pretty_ argument. Setting this to a value of `true` or `false` controls whether the response is pretty-printed \(with indentation and new lines\). By default, the SDK sets the _pretty_ argument to `true`. ### Changing the base URL Base URL for the HTTP operation can be changed in the following way: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), host=os.environ.get('IONOS_API_URL'), server_index=None, ) client = ionoscloud.ApiClient(configuration) ``` ## Certificate pinning: You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following: Set env variable IONOS_PINNED_CERT= You can get the sha256 fingerprint most easily from the browser by inspecting the certificate. ## Documentation for API Endpoints All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API Endpoints table | Class | Method | HTTP request | Description | | ------------- | ------------- | ------------- | ------------- | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_find_by_application_load_balancer_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_find_by_application_load_balancer_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID | | BackupUnitsApi | [**backupunits_delete**](docs/api/BackupUnitsApi.md#backupunits_delete) | **DELETE** /backupunits/{backupunitId} | Delete backup units | | BackupUnitsApi | [**backupunits_find_by_id**](docs/api/BackupUnitsApi.md#backupunits_find_by_id) | **GET** /backupunits/{backupunitId} | Retrieve backup units | | BackupUnitsApi | [**backupunits_get**](docs/api/BackupUnitsApi.md#backupunits_get) | **GET** /backupunits | List backup units | | BackupUnitsApi | [**backupunits_patch**](docs/api/BackupUnitsApi.md#backupunits_patch) | **PATCH** /backupunits/{backupunitId} | Partially modify backup units | | BackupUnitsApi | [**backupunits_post**](docs/api/BackupUnitsApi.md#backupunits_post) | **POST** /backupunits | Create backup units | | BackupUnitsApi | [**backupunits_put**](docs/api/BackupUnitsApi.md#backupunits_put) | **PUT** /backupunits/{backupunitId} | Modify backup units | | BackupUnitsApi | [**backupunits_ssourl_get**](docs/api/BackupUnitsApi.md#backupunits_ssourl_get) | **GET** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs | | ContractResourcesApi | [**contracts_get**](docs/api/ContractResourcesApi.md#contracts_get) | **GET** /contracts | Get Contract Information | | DataCentersApi | [**datacenters_delete**](docs/api/DataCentersApi.md#datacenters_delete) | **DELETE** /datacenters/{datacenterId} | Delete data centers | | DataCentersApi | [**datacenters_find_by_id**](docs/api/DataCentersApi.md#datacenters_find_by_id) | **GET** /datacenters/{datacenterId} | Retrieve data centers | | DataCentersApi | [**datacenters_get**](docs/api/DataCentersApi.md#datacenters_get) | **GET** /datacenters | List your data centers | | DataCentersApi | [**datacenters_patch**](docs/api/DataCentersApi.md#datacenters_patch) | **PATCH** /datacenters/{datacenterId} | Partially modify a Data Center by ID | | DataCentersApi | [**datacenters_post**](docs/api/DataCentersApi.md#datacenters_post) | **POST** /datacenters | Create a Data Center | | DataCentersApi | [**datacenters_put**](docs/api/DataCentersApi.md#datacenters_put) | **PUT** /datacenters/{datacenterId} | Modify a Data Center by ID | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_delete**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_find_by_id**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_get**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_patch**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_post**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_put**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_delete**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_find_by_id**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_get**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_patch**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_post**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_put**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs | | IPBlocksApi | [**ipblocks_delete**](docs/api/IPBlocksApi.md#ipblocks_delete) | **DELETE** /ipblocks/{ipblockId} | Delete IP blocks | | IPBlocksApi | [**ipblocks_find_by_id**](docs/api/IPBlocksApi.md#ipblocks_find_by_id) | **GET** /ipblocks/{ipblockId} | Retrieve IP blocks | | IPBlocksApi | [**ipblocks_get**](docs/api/IPBlocksApi.md#ipblocks_get) | **GET** /ipblocks | List IP blocks | | IPBlocksApi | [**ipblocks_patch**](docs/api/IPBlocksApi.md#ipblocks_patch) | **PATCH** /ipblocks/{ipblockId} | Partially modify IP blocks | | IPBlocksApi | [**ipblocks_post**](docs/api/IPBlocksApi.md#ipblocks_post) | **POST** /ipblocks | Reserve a IP Block | | IPBlocksApi | [**ipblocks_put**](docs/api/IPBlocksApi.md#ipblocks_put) | **PUT** /ipblocks/{ipblockId} | Modify a IP Block by ID | | ImagesApi | [**images_delete**](docs/api/ImagesApi.md#images_delete) | **DELETE** /images/{imageId} | Delete images | | ImagesApi | [**images_find_by_id**](docs/api/ImagesApi.md#images_find_by_id) | **GET** /images/{imageId} | Retrieve images | | ImagesApi | [**images_get**](docs/api/ImagesApi.md#images_get) | **GET** /images | List images | | ImagesApi | [**images_patch**](docs/api/ImagesApi.md#images_patch) | **PATCH** /images/{imageId} | Partially modify images | | ImagesApi | [**images_put**](docs/api/ImagesApi.md#images_put) | **PUT** /images/{imageId} | Modify an Image by ID | | KubernetesApi | [**k8s_delete**](docs/api/KubernetesApi.md#k8s_delete) | **DELETE** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_find_by_cluster_id**](docs/api/KubernetesApi.md#k8s_find_by_cluster_id) | **GET** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_get**](docs/api/KubernetesApi.md#k8s_get) | **GET** /k8s | Get Kubernetes Clusters | | KubernetesApi | [**k8s_kubeconfig_get**](docs/api/KubernetesApi.md#k8s_kubeconfig_get) | **GET** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File | | KubernetesApi | [**k8s_nodepools_delete**](docs/api/KubernetesApi.md#k8s_nodepools_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_get**](docs/api/KubernetesApi.md#k8s_nodepools_get) | **GET** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools | | KubernetesApi | [**k8s_nodepools_nodes_delete**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_get**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_get) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes | | KubernetesApi | [**k8s_nodepools_nodes_replace_post**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_replace_post) | **POST** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_post**](docs/api/KubernetesApi.md#k8s_nodepools_post) | **POST** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool | | KubernetesApi | [**k8s_nodepools_put**](docs/api/KubernetesApi.md#k8s_nodepools_put) | **PUT** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_post**](docs/api/KubernetesApi.md#k8s_post) | **POST** /k8s | Create a Kubernetes Cluster | | KubernetesApi | [**k8s_put**](docs/api/KubernetesApi.md#k8s_put) | **PUT** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_versions_default_get**](docs/api/KubernetesApi.md#k8s_versions_default_get) | **GET** /k8s/versions/default | Get Default Kubernetes Version | | KubernetesApi | [**k8s_versions_get**](docs/api/KubernetesApi.md#k8s_versions_get) | **GET** /k8s/versions | Get Kubernetes Versions | | LANsApi | [**datacenters_lans_delete**](docs/api/LANsApi.md#datacenters_lans_delete) | **DELETE** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs | | LANsApi | [**datacenters_lans_find_by_id**](docs/api/LANsApi.md#datacenters_lans_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs | | LANsApi | [**datacenters_lans_get**](docs/api/LANsApi.md#datacenters_lans_get) | **GET** /datacenters/{datacenterId}/lans | List LANs | | LANsApi | [**datacenters_lans_nics_find_by_id**](docs/api/LANsApi.md#datacenters_lans_nics_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs | | LANsApi | [**datacenters_lans_nics_get**](docs/api/LANsApi.md#datacenters_lans_nics_get) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members | | LANsApi | [**datacenters_lans_nics_post**](docs/api/LANsApi.md#datacenters_lans_nics_post) | **POST** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs | | LANsApi | [**datacenters_lans_patch**](docs/api/LANsApi.md#datacenters_lans_patch) | **PATCH** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs | | LANsApi | [**datacenters_lans_post**](docs/api/LANsApi.md#datacenters_lans_post) | **POST** /datacenters/{datacenterId}/lans | Create LANs | | LANsApi | [**datacenters_lans_put**](docs/api/LANsApi.md#datacenters_lans_put) | **PUT** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs | | LabelsApi | [**datacenters_labels_delete**](docs/api/LabelsApi.md#datacenters_labels_delete) | **DELETE** /datacenters/{datacenterId}/labels/{key} | Delete data center labels | | LabelsApi | [**datacenters_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_labels_find_by_key) | **GET** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels | | LabelsApi | [**datacenters_labels_get**](docs/api/LabelsApi.md#datacenters_labels_get) | **GET** /datacenters/{datacenterId}/labels | List data center labels | | LabelsApi | [**datacenters_labels_post**](docs/api/LabelsApi.md#datacenters_labels_post) | **POST** /datacenters/{datacenterId}/labels | Create a Data Center Label | | LabelsApi | [**datacenters_labels_put**](docs/api/LabelsApi.md#datacenters_labels_put) | **PUT** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key | | LabelsApi | [**datacenters_servers_labels_delete**](docs/api/LabelsApi.md#datacenters_servers_labels_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels | | LabelsApi | [**datacenters_servers_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_servers_labels_find_by_key) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels | | LabelsApi | [**datacenters_servers_labels_get**](docs/api/LabelsApi.md#datacenters_servers_labels_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels | | LabelsApi | [**datacenters_servers_labels_post**](docs/api/LabelsApi.md#datacenters_servers_labels_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label | | LabelsApi | [**datacenters_servers_labels_put**](docs/api/LabelsApi.md#datacenters_servers_labels_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label | | LabelsApi | [**datacenters_volumes_labels_delete**](docs/api/LabelsApi.md#datacenters_volumes_labels_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels | | LabelsApi | [**datacenters_volumes_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_volumes_labels_find_by_key) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels | | LabelsApi | [**datacenters_volumes_labels_get**](docs/api/LabelsApi.md#datacenters_volumes_labels_get) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels | | LabelsApi | [**datacenters_volumes_labels_post**](docs/api/LabelsApi.md#datacenters_volumes_labels_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label | | LabelsApi | [**datacenters_volumes_labels_put**](docs/api/LabelsApi.md#datacenters_volumes_labels_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label | | LabelsApi | [**images_labels_delete**](docs/api/LabelsApi.md#images_labels_delete) | **DELETE** /images/{imageId}/labels/{key} | Delete image label | | LabelsApi | [**images_labels_find_by_key**](docs/api/LabelsApi.md#images_labels_find_by_key) | **GET** /images/{imageId}/labels/{key} | Retrieve image labels | | LabelsApi | [**images_labels_get**](docs/api/LabelsApi.md#images_labels_get) | **GET** /images/{imageId}/labels | List image labels | | LabelsApi | [**images_labels_post**](docs/api/LabelsApi.md#images_labels_post) | **POST** /images/{imageId}/labels | Create an Image Label | | LabelsApi | [**images_labels_put**](docs/api/LabelsApi.md#images_labels_put) | **PUT** /images/{imageId}/labels/{key} | Modify an Image Label by Key | | LabelsApi | [**ipblocks_labels_delete**](docs/api/LabelsApi.md#ipblocks_labels_delete) | **DELETE** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels | | LabelsApi | [**ipblocks_labels_find_by_key**](docs/api/LabelsApi.md#ipblocks_labels_find_by_key) | **GET** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels | | LabelsApi | [**ipblocks_labels_get**](docs/api/LabelsApi.md#ipblocks_labels_get) | **GET** /ipblocks/{ipblockId}/labels | List IP block labels | | LabelsApi | [**ipblocks_labels_post**](docs/api/LabelsApi.md#ipblocks_labels_post) | **POST** /ipblocks/{ipblockId}/labels | Create IP block labels | | LabelsApi | [**ipblocks_labels_put**](docs/api/LabelsApi.md#ipblocks_labels_put) | **PUT** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID | | LabelsApi | [**labels_find_by_urn**](docs/api/LabelsApi.md#labels_find_by_urn) | **GET** /labels/{labelurn} | Retrieve labels by URN | | LabelsApi | [**labels_get**](docs/api/LabelsApi.md#labels_get) | **GET** /labels | List labels | | LabelsApi | [**snapshots_labels_delete**](docs/api/LabelsApi.md#snapshots_labels_delete) | **DELETE** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels | | LabelsApi | [**snapshots_labels_find_by_key**](docs/api/LabelsApi.md#snapshots_labels_find_by_key) | **GET** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels | | LabelsApi | [**snapshots_labels_get**](docs/api/LabelsApi.md#snapshots_labels_get) | **GET** /snapshots/{snapshotId}/labels | List snapshot labels | | LabelsApi | [**snapshots_labels_post**](docs/api/LabelsApi.md#snapshots_labels_post) | **POST** /snapshots/{snapshotId}/labels | Create a Snapshot Label | | LabelsApi | [**snapshots_labels_put**](docs/api/LabelsApi.md#snapshots_labels_put) | **PUT** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_find_by_nic_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_find_by_nic_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_get) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_post) | **POST** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_find_by_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_find_by_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_get) | **GET** /datacenters/{datacenterId}/loadbalancers | List Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_patch**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_post) | **POST** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer | | LoadBalancersApi | [**datacenters_loadbalancers_put**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_put) | **PUT** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID | | LocationsApi | [**locations_find_by_region_id**](docs/api/LocationsApi.md#locations_find_by_region_id) | **GET** /locations/{regionId} | Get Locations within a Region | | LocationsApi | [**locations_find_by_region_id_and_id**](docs/api/LocationsApi.md#locations_find_by_region_id_and_id) | **GET** /locations/{regionId}/{locationId} | Get Location by ID | | LocationsApi | [**locations_get**](docs/api/LocationsApi.md#locations_get) | **GET** /locations | Get Locations | | NATGatewaysApi | [**datacenters_natgateways_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_find_by_nat_gateway_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_find_by_nat_gateway_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_find_by_flow_log_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_get) | **GET** /datacenters/{datacenterId}/natgateways | List NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_post) | **POST** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway | | NATGatewaysApi | [**datacenters_natgateways_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_rules_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_find_by_nat_gateway_rule_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_find_by_nat_gateway_rule_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID | | NATGatewaysApi | [**datacenters_natgateways_rules_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule | | NATGatewaysApi | [**datacenters_natgateways_rules_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_find_by_network_load_balancer_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_find_by_network_load_balancer_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers | | NetworkInterfacesApi | [**datacenters_servers_nics_delete**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_find_by_id**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_get**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_patch**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_post**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC | | NetworkInterfacesApi | [**datacenters_servers_nics_put**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs | | PrivateCrossConnectsApi | [**pccs_delete**](docs/api/PrivateCrossConnectsApi.md#pccs_delete) | **DELETE** /pccs/{pccId} | Delete Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_find_by_id**](docs/api/PrivateCrossConnectsApi.md#pccs_find_by_id) | **GET** /pccs/{pccId} | Retrieve a Cross Connect | | PrivateCrossConnectsApi | [**pccs_get**](docs/api/PrivateCrossConnectsApi.md#pccs_get) | **GET** /pccs | List Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_patch**](docs/api/PrivateCrossConnectsApi.md#pccs_patch) | **PATCH** /pccs/{pccId} | Partially modify a Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_post**](docs/api/PrivateCrossConnectsApi.md#pccs_post) | **POST** /pccs | Create a Cross Connect | | RequestsApi | [**requests_find_by_id**](docs/api/RequestsApi.md#requests_find_by_id) | **GET** /requests/{requestId} | Retrieve requests | | RequestsApi | [**requests_get**](docs/api/RequestsApi.md#requests_get) | **GET** /requests | List requests | | RequestsApi | [**requests_status_get**](docs/api/RequestsApi.md#requests_status_get) | **GET** /requests/{requestId}/status | Retrieve request status | | SecurityGroupsApi | [**datacenters_securitygroups_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Delete a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Retrieve a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Remove a Firewall Rule from a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_post) | **POST** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | Create Firewall rule to a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_get) | **GET** /datacenters/{datacenterId}/securitygroups | List Security Groups | | SecurityGroupsApi | [**datacenters_securitygroups_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Partially modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_post) | **POST** /datacenters/{datacenterId}/securitygroups | Create a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_rules_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Retrieve security group rule by id | | SecurityGroupsApi | [**datacenters_securitygroups_rules_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_get) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | List Security Group rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Partially modify Security Group Rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Modify a Security Group Rule | | SecurityGroupsApi | [**datacenters_servers_nics_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_nics_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups | Attach a list of Security Groups to a NIC | | SecurityGroupsApi | [**datacenters_servers_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/securitygroups | Attach a list of Security Groups to a Server | | ServersApi | [**datacenters_servers_cdroms_delete**](docs/api/ServersApi.md#datacenters_servers_cdroms_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_find_by_id**](docs/api/ServersApi.md#datacenters_servers_cdroms_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_get**](docs/api/ServersApi.md#datacenters_servers_cdroms_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs | | ServersApi | [**datacenters_servers_cdroms_post**](docs/api/ServersApi.md#datacenters_servers_cdroms_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM | | ServersApi | [**datacenters_servers_delete**](docs/api/ServersApi.md#datacenters_servers_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId} | Delete servers | | ServersApi | [**datacenters_servers_find_by_id**](docs/api/ServersApi.md#datacenters_servers_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID | | ServersApi | [**datacenters_servers_get**](docs/api/ServersApi.md#datacenters_servers_get) | **GET** /datacenters/{datacenterId}/servers | List servers | | ServersApi | [**datacenters_servers_patch**](docs/api/ServersApi.md#datacenters_servers_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers | | ServersApi | [**datacenters_servers_post**](docs/api/ServersApi.md#datacenters_servers_post) | **POST** /datacenters/{datacenterId}/servers | Create a Server | | ServersApi | [**datacenters_servers_put**](docs/api/ServersApi.md#datacenters_servers_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID | | ServersApi | [**datacenters_servers_reboot_post**](docs/api/ServersApi.md#datacenters_servers_reboot_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers | | ServersApi | [**datacenters_servers_remote_console_get**](docs/api/ServersApi.md#datacenters_servers_remote_console_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link | | ServersApi | [**datacenters_servers_resume_post**](docs/api/ServersApi.md#datacenters_servers_resume_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID | | ServersApi | [**datacenters_servers_start_post**](docs/api/ServersApi.md#datacenters_servers_start_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID | | ServersApi | [**datacenters_servers_stop_post**](docs/api/ServersApi.md#datacenters_servers_stop_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID | | ServersApi | [**datacenters_servers_suspend_post**](docs/api/ServersApi.md#datacenters_servers_suspend_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID | | ServersApi | [**datacenters_servers_token_get**](docs/api/ServersApi.md#datacenters_servers_token_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/token | Get JSON Web Token | | ServersApi | [**datacenters_servers_upgrade_post**](docs/api/ServersApi.md#datacenters_servers_upgrade_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID | | ServersApi | [**datacenters_servers_volumes_delete**](docs/api/ServersApi.md#datacenters_servers_volumes_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID | | ServersApi | [**datacenters_servers_volumes_find_by_id**](docs/api/ServersApi.md#datacenters_servers_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID | | ServersApi | [**datacenters_servers_volumes_get**](docs/api/ServersApi.md#datacenters_servers_volumes_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes | | ServersApi | [**datacenters_servers_volumes_post**](docs/api/ServersApi.md#datacenters_servers_volumes_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server | | SnapshotsApi | [**snapshots_delete**](docs/api/SnapshotsApi.md#snapshots_delete) | **DELETE** /snapshots/{snapshotId} | Delete snapshots | | SnapshotsApi | [**snapshots_find_by_id**](docs/api/SnapshotsApi.md#snapshots_find_by_id) | **GET** /snapshots/{snapshotId} | Retrieve snapshots by ID | | SnapshotsApi | [**snapshots_get**](docs/api/SnapshotsApi.md#snapshots_get) | **GET** /snapshots | List snapshots | | SnapshotsApi | [**snapshots_patch**](docs/api/SnapshotsApi.md#snapshots_patch) | **PATCH** /snapshots/{snapshotId} | Partially modify snapshots | | SnapshotsApi | [**snapshots_put**](docs/api/SnapshotsApi.md#snapshots_put) | **PUT** /snapshots/{snapshotId} | Modify a Snapshot by ID | | TargetGroupsApi | [**target_groups_delete**](docs/api/TargetGroupsApi.md#target_groups_delete) | **DELETE** /targetgroups/{targetGroupId} | Delete a Target Group by ID | | TargetGroupsApi | [**targetgroups_find_by_target_group_id**](docs/api/TargetGroupsApi.md#targetgroups_find_by_target_group_id) | **GET** /targetgroups/{targetGroupId} | Get a Target Group by ID | | TargetGroupsApi | [**targetgroups_get**](docs/api/TargetGroupsApi.md#targetgroups_get) | **GET** /targetgroups | Get Target Groups | | TargetGroupsApi | [**targetgroups_patch**](docs/api/TargetGroupsApi.md#targetgroups_patch) | **PATCH** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID | | TargetGroupsApi | [**targetgroups_post**](docs/api/TargetGroupsApi.md#targetgroups_post) | **POST** /targetgroups | Create a Target Group | | TargetGroupsApi | [**targetgroups_put**](docs/api/TargetGroupsApi.md#targetgroups_put) | **PUT** /targetgroups/{targetGroupId} | Modify a Target Group by ID | | TemplatesApi | [**templates_find_by_id**](docs/api/TemplatesApi.md#templates_find_by_id) | **GET** /templates/{templateId} | Get Cubes Template by ID | | TemplatesApi | [**templates_get**](docs/api/TemplatesApi.md#templates_get) | **GET** /templates | Get Cubes Templates | | UserS3KeysApi | [**um_users_s3keys_delete**](docs/api/UserS3KeysApi.md#um_users_s3keys_delete) | **DELETE** /um/users/{userId}/s3keys/{keyId} | Delete Object storage keys | | UserS3KeysApi | [**um_users_s3keys_find_by_key_id**](docs/api/UserS3KeysApi.md#um_users_s3keys_find_by_key_id) | **GET** /um/users/{userId}/s3keys/{keyId} | Retrieve user Object storage keys by key ID | | UserS3KeysApi | [**um_users_s3keys_get**](docs/api/UserS3KeysApi.md#um_users_s3keys_get) | **GET** /um/users/{userId}/s3keys | List user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_post**](docs/api/UserS3KeysApi.md#um_users_s3keys_post) | **POST** /um/users/{userId}/s3keys | Create user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_put**](docs/api/UserS3KeysApi.md#um_users_s3keys_put) | **PUT** /um/users/{userId}/s3keys/{keyId} | Modify a Object storage Key by Key ID | | UserS3KeysApi | [**um_users_s3ssourl_get**](docs/api/UserS3KeysApi.md#um_users_s3ssourl_get) | **GET** /um/users/{userId}/s3ssourl | Retrieve Object storage single sign-on URLs | | UserManagementApi | [**um_groups_delete**](docs/api/UserManagementApi.md#um_groups_delete) | **DELETE** /um/groups/{groupId} | Delete groups | | UserManagementApi | [**um_groups_find_by_id**](docs/api/UserManagementApi.md#um_groups_find_by_id) | **GET** /um/groups/{groupId} | Retrieve groups | | UserManagementApi | [**um_groups_get**](docs/api/UserManagementApi.md#um_groups_get) | **GET** /um/groups | List all groups | | UserManagementApi | [**um_groups_post**](docs/api/UserManagementApi.md#um_groups_post) | **POST** /um/groups | Create groups | | UserManagementApi | [**um_groups_put**](docs/api/UserManagementApi.md#um_groups_put) | **PUT** /um/groups/{groupId} | Modify groups | | UserManagementApi | [**um_groups_resources_get**](docs/api/UserManagementApi.md#um_groups_resources_get) | **GET** /um/groups/{groupId}/resources | Retrieve group resources | | UserManagementApi | [**um_groups_shares_delete**](docs/api/UserManagementApi.md#um_groups_shares_delete) | **DELETE** /um/groups/{groupId}/shares/{resourceId} | Remove group shares | | UserManagementApi | [**um_groups_shares_find_by_resource_id**](docs/api/UserManagementApi.md#um_groups_shares_find_by_resource_id) | **GET** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares | | UserManagementApi | [**um_groups_shares_get**](docs/api/UserManagementApi.md#um_groups_shares_get) | **GET** /um/groups/{groupId}/shares | List group shares | | UserManagementApi | [**um_groups_shares_post**](docs/api/UserManagementApi.md#um_groups_shares_post) | **POST** /um/groups/{groupId}/shares/{resourceId} | Add group shares | | UserManagementApi | [**um_groups_shares_put**](docs/api/UserManagementApi.md#um_groups_shares_put) | **PUT** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges | | UserManagementApi | [**um_groups_users_delete**](docs/api/UserManagementApi.md#um_groups_users_delete) | **DELETE** /um/groups/{groupId}/users/{userId} | Remove users from groups | | UserManagementApi | [**um_groups_users_get**](docs/api/UserManagementApi.md#um_groups_users_get) | **GET** /um/groups/{groupId}/users | List group members | | UserManagementApi | [**um_groups_users_post**](docs/api/UserManagementApi.md#um_groups_users_post) | **POST** /um/groups/{groupId}/users | Add a Group Member | | UserManagementApi | [**um_resources_find_by_type**](docs/api/UserManagementApi.md#um_resources_find_by_type) | **GET** /um/resources/{resourceType} | List resources by type | | UserManagementApi | [**um_resources_find_by_type_and_id**](docs/api/UserManagementApi.md#um_resources_find_by_type_and_id) | **GET** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type | | UserManagementApi | [**um_resources_get**](docs/api/UserManagementApi.md#um_resources_get) | **GET** /um/resources | List all resources | | UserManagementApi | [**um_users_delete**](docs/api/UserManagementApi.md#um_users_delete) | **DELETE** /um/users/{userId} | Delete users | | UserManagementApi | [**um_users_find_by_id**](docs/api/UserManagementApi.md#um_users_find_by_id) | **GET** /um/users/{userId} | Retrieve users | | UserManagementApi | [**um_users_get**](docs/api/UserManagementApi.md#um_users_get) | **GET** /um/users | List all users | | UserManagementApi | [**um_users_groups_get**](docs/api/UserManagementApi.md#um_users_groups_get) | **GET** /um/users/{userId}/groups | Retrieve group resources by user ID | | UserManagementApi | [**um_users_owns_get**](docs/api/UserManagementApi.md#um_users_owns_get) | **GET** /um/users/{userId}/owns | Retrieve user resources by user ID | | UserManagementApi | [**um_users_post**](docs/api/UserManagementApi.md#um_users_post) | **POST** /um/users | Create users | | UserManagementApi | [**um_users_put**](docs/api/UserManagementApi.md#um_users_put) | **PUT** /um/users/{userId} | Modify users | | VolumesApi | [**datacenters_volumes_create_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_create_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots | | VolumesApi | [**datacenters_volumes_delete**](docs/api/VolumesApi.md#datacenters_volumes_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes | | VolumesApi | [**datacenters_volumes_find_by_id**](docs/api/VolumesApi.md#datacenters_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes | | VolumesApi | [**datacenters_volumes_get**](docs/api/VolumesApi.md#datacenters_volumes_get) | **GET** /datacenters/{datacenterId}/volumes | List volumes | | VolumesApi | [**datacenters_volumes_patch**](docs/api/VolumesApi.md#datacenters_volumes_patch) | **PATCH** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes | | VolumesApi | [**datacenters_volumes_post**](docs/api/VolumesApi.md#datacenters_volumes_post) | **POST** /datacenters/{datacenterId}/volumes | Create a Volume | | VolumesApi | [**datacenters_volumes_put**](docs/api/VolumesApi.md#datacenters_volumes_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID | | VolumesApi | [**datacenters_volumes_restore_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_restore_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots | | Api | [**api_info_get**](docs/api/Api.md#api_info_get) | **GET** / | Get API information |
## Documentation For Models All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API models list - [ApplicationLoadBalancer](docs/models/ApplicationLoadBalancer) - [ApplicationLoadBalancerEntities](docs/models/ApplicationLoadBalancerEntities) - [ApplicationLoadBalancerForwardingRule](docs/models/ApplicationLoadBalancerForwardingRule) - [ApplicationLoadBalancerForwardingRuleProperties](docs/models/ApplicationLoadBalancerForwardingRuleProperties) - [ApplicationLoadBalancerForwardingRulePut](docs/models/ApplicationLoadBalancerForwardingRulePut) - [ApplicationLoadBalancerForwardingRules](docs/models/ApplicationLoadBalancerForwardingRules) - [ApplicationLoadBalancerHttpRule](docs/models/ApplicationLoadBalancerHttpRule) - [ApplicationLoadBalancerHttpRuleCondition](docs/models/ApplicationLoadBalancerHttpRuleCondition) - [ApplicationLoadBalancerProperties](docs/models/ApplicationLoadBalancerProperties) - [ApplicationLoadBalancerPut](docs/models/ApplicationLoadBalancerPut) - [ApplicationLoadBalancers](docs/models/ApplicationLoadBalancers) - [AttachedVolumes](docs/models/AttachedVolumes) - [BackupUnit](docs/models/BackupUnit) - [BackupUnitProperties](docs/models/BackupUnitProperties) - [BackupUnitSSO](docs/models/BackupUnitSSO) - [BackupUnits](docs/models/BackupUnits) - [BalancedNics](docs/models/BalancedNics) - [Cdroms](docs/models/Cdroms) - [ConnectableDatacenter](docs/models/ConnectableDatacenter) - [Contract](docs/models/Contract) - [ContractProperties](docs/models/ContractProperties) - [Contracts](docs/models/Contracts) - [CpuArchitectureProperties](docs/models/CpuArchitectureProperties) - [CreateSnapshot](docs/models/CreateSnapshot) - [CreateSnapshotProperties](docs/models/CreateSnapshotProperties) - [DataCenterEntities](docs/models/DataCenterEntities) - [Datacenter](docs/models/Datacenter) - [DatacenterElementMetadata](docs/models/DatacenterElementMetadata) - [DatacenterPost](docs/models/DatacenterPost) - [DatacenterProperties](docs/models/DatacenterProperties) - [DatacenterPropertiesPost](docs/models/DatacenterPropertiesPost) - [DatacenterPropertiesPut](docs/models/DatacenterPropertiesPut) - [DatacenterPut](docs/models/DatacenterPut) - [Datacenters](docs/models/Datacenters) - [Error](docs/models/Error) - [ErrorMessage](docs/models/ErrorMessage) - [FirewallRule](docs/models/FirewallRule) - [FirewallRules](docs/models/FirewallRules) - [FirewallruleProperties](docs/models/FirewallruleProperties) - [FlowLog](docs/models/FlowLog) - [FlowLogProperties](docs/models/FlowLogProperties) - [FlowLogPut](docs/models/FlowLogPut) - [FlowLogs](docs/models/FlowLogs) - [Group](docs/models/Group) - [GroupEntities](docs/models/GroupEntities) - [GroupMembers](docs/models/GroupMembers) - [GroupProperties](docs/models/GroupProperties) - [GroupShare](docs/models/GroupShare) - [GroupShareProperties](docs/models/GroupShareProperties) - [GroupShares](docs/models/GroupShares) - [GroupUsers](docs/models/GroupUsers) - [Groups](docs/models/Groups) - [IPFailover](docs/models/IPFailover) - [Image](docs/models/Image) - [ImageProperties](docs/models/ImageProperties) - [Images](docs/models/Images) - [Info](docs/models/Info) - [IpBlock](docs/models/IpBlock) - [IpBlockProperties](docs/models/IpBlockProperties) - [IpBlocks](docs/models/IpBlocks) - [IpConsumer](docs/models/IpConsumer) - [KubernetesAutoScaling](docs/models/KubernetesAutoScaling) - [KubernetesCluster](docs/models/KubernetesCluster) - [KubernetesClusterEntities](docs/models/KubernetesClusterEntities) - [KubernetesClusterForPost](docs/models/KubernetesClusterForPost) - [KubernetesClusterForPut](docs/models/KubernetesClusterForPut) - [KubernetesClusterProperties](docs/models/KubernetesClusterProperties) - [KubernetesClusterPropertiesForPost](docs/models/KubernetesClusterPropertiesForPost) - [KubernetesClusterPropertiesForPut](docs/models/KubernetesClusterPropertiesForPut) - [KubernetesClusters](docs/models/KubernetesClusters) - [KubernetesMaintenanceWindow](docs/models/KubernetesMaintenanceWindow) - [KubernetesNode](docs/models/KubernetesNode) - [KubernetesNodeMetadata](docs/models/KubernetesNodeMetadata) - [KubernetesNodePool](docs/models/KubernetesNodePool) - [KubernetesNodePoolForPost](docs/models/KubernetesNodePoolForPost) - [KubernetesNodePoolForPut](docs/models/KubernetesNodePoolForPut) - [KubernetesNodePoolLan](docs/models/KubernetesNodePoolLan) - [KubernetesNodePoolLanRoutes](docs/models/KubernetesNodePoolLanRoutes) - [KubernetesNodePoolProperties](docs/models/KubernetesNodePoolProperties) - [KubernetesNodePoolPropertiesForPost](docs/models/KubernetesNodePoolPropertiesForPost) - [KubernetesNodePoolPropertiesForPut](docs/models/KubernetesNodePoolPropertiesForPut) - [KubernetesNodePoolServerType](docs/models/KubernetesNodePoolServerType) - [KubernetesNodePools](docs/models/KubernetesNodePools) - [KubernetesNodeProperties](docs/models/KubernetesNodeProperties) - [KubernetesNodes](docs/models/KubernetesNodes) - [Label](docs/models/Label) - [LabelProperties](docs/models/LabelProperties) - [LabelResource](docs/models/LabelResource) - [LabelResourceProperties](docs/models/LabelResourceProperties) - [LabelResources](docs/models/LabelResources) - [Labels](docs/models/Labels) - [Lan](docs/models/Lan) - [LanEntities](docs/models/LanEntities) - [LanNics](docs/models/LanNics) - [LanProperties](docs/models/LanProperties) - [Lans](docs/models/Lans) - [ListOfIds](docs/models/ListOfIds) - [Loadbalancer](docs/models/Loadbalancer) - [LoadbalancerEntities](docs/models/LoadbalancerEntities) - [LoadbalancerProperties](docs/models/LoadbalancerProperties) - [Loadbalancers](docs/models/Loadbalancers) - [Location](docs/models/Location) - [LocationProperties](docs/models/LocationProperties) - [Locations](docs/models/Locations) - [NatGateway](docs/models/NatGateway) - [NatGatewayEntities](docs/models/NatGatewayEntities) - [NatGatewayLanProperties](docs/models/NatGatewayLanProperties) - [NatGatewayProperties](docs/models/NatGatewayProperties) - [NatGatewayPut](docs/models/NatGatewayPut) - [NatGatewayRule](docs/models/NatGatewayRule) - [NatGatewayRuleProperties](docs/models/NatGatewayRuleProperties) - [NatGatewayRuleProtocol](docs/models/NatGatewayRuleProtocol) - [NatGatewayRulePut](docs/models/NatGatewayRulePut) - [NatGatewayRuleType](docs/models/NatGatewayRuleType) - [NatGatewayRules](docs/models/NatGatewayRules) - [NatGateways](docs/models/NatGateways) - [NetworkLoadBalancer](docs/models/NetworkLoadBalancer) - [NetworkLoadBalancerEntities](docs/models/NetworkLoadBalancerEntities) - [NetworkLoadBalancerForwardingRule](docs/models/NetworkLoadBalancerForwardingRule) - [NetworkLoadBalancerForwardingRuleHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleHealthCheck) - [NetworkLoadBalancerForwardingRuleProperties](docs/models/NetworkLoadBalancerForwardingRuleProperties) - [NetworkLoadBalancerForwardingRulePut](docs/models/NetworkLoadBalancerForwardingRulePut) - [NetworkLoadBalancerForwardingRuleTarget](docs/models/NetworkLoadBalancerForwardingRuleTarget) - [NetworkLoadBalancerForwardingRuleTargetHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck) - [NetworkLoadBalancerForwardingRules](docs/models/NetworkLoadBalancerForwardingRules) - [NetworkLoadBalancerProperties](docs/models/NetworkLoadBalancerProperties) - [NetworkLoadBalancerPut](docs/models/NetworkLoadBalancerPut) - [NetworkLoadBalancers](docs/models/NetworkLoadBalancers) - [Nic](docs/models/Nic) - [NicEntities](docs/models/NicEntities) - [NicProperties](docs/models/NicProperties) - [NicPut](docs/models/NicPut) - [Nics](docs/models/Nics) - [NoStateMetaData](docs/models/NoStateMetaData) - [PaginationLinks](docs/models/PaginationLinks) - [Peer](docs/models/Peer) - [PrivateCrossConnect](docs/models/PrivateCrossConnect) - [PrivateCrossConnectProperties](docs/models/PrivateCrossConnectProperties) - [PrivateCrossConnects](docs/models/PrivateCrossConnects) - [RemoteConsoleUrl](docs/models/RemoteConsoleUrl) - [Request](docs/models/Request) - [RequestMetadata](docs/models/RequestMetadata) - [RequestProperties](docs/models/RequestProperties) - [RequestStatus](docs/models/RequestStatus) - [RequestStatusMetadata](docs/models/RequestStatusMetadata) - [RequestTarget](docs/models/RequestTarget) - [Requests](docs/models/Requests) - [Resource](docs/models/Resource) - [ResourceEntities](docs/models/ResourceEntities) - [ResourceGroups](docs/models/ResourceGroups) - [ResourceLimits](docs/models/ResourceLimits) - [ResourceProperties](docs/models/ResourceProperties) - [ResourceReference](docs/models/ResourceReference) - [Resources](docs/models/Resources) - [ResourcesUsers](docs/models/ResourcesUsers) - [RestoreSnapshot](docs/models/RestoreSnapshot) - [RestoreSnapshotProperties](docs/models/RestoreSnapshotProperties) - [S3Bucket](docs/models/S3Bucket) - [S3Key](docs/models/S3Key) - [S3KeyMetadata](docs/models/S3KeyMetadata) - [S3KeyProperties](docs/models/S3KeyProperties) - [S3Keys](docs/models/S3Keys) - [S3ObjectStorageSSO](docs/models/S3ObjectStorageSSO) - [SecurityGroup](docs/models/SecurityGroup) - [SecurityGroupEntities](docs/models/SecurityGroupEntities) - [SecurityGroupEntitiesRequest](docs/models/SecurityGroupEntitiesRequest) - [SecurityGroupProperties](docs/models/SecurityGroupProperties) - [SecurityGroupRequest](docs/models/SecurityGroupRequest) - [SecurityGroups](docs/models/SecurityGroups) - [Server](docs/models/Server) - [ServerEntities](docs/models/ServerEntities) - [ServerProperties](docs/models/ServerProperties) - [Servers](docs/models/Servers) - [Snapshot](docs/models/Snapshot) - [SnapshotProperties](docs/models/SnapshotProperties) - [Snapshots](docs/models/Snapshots) - [TargetGroup](docs/models/TargetGroup) - [TargetGroupHealthCheck](docs/models/TargetGroupHealthCheck) - [TargetGroupHttpHealthCheck](docs/models/TargetGroupHttpHealthCheck) - [TargetGroupProperties](docs/models/TargetGroupProperties) - [TargetGroupPut](docs/models/TargetGroupPut) - [TargetGroupTarget](docs/models/TargetGroupTarget) - [TargetGroups](docs/models/TargetGroups) - [TargetPortRange](docs/models/TargetPortRange) - [Template](docs/models/Template) - [TemplateProperties](docs/models/TemplateProperties) - [Templates](docs/models/Templates) - [Token](docs/models/Token) - [Type](docs/models/Type) - [User](docs/models/User) - [UserGroupPost](docs/models/UserGroupPost) - [UserMetadata](docs/models/UserMetadata) - [UserPost](docs/models/UserPost) - [UserProperties](docs/models/UserProperties) - [UserPropertiesPost](docs/models/UserPropertiesPost) - [UserPropertiesPut](docs/models/UserPropertiesPut) - [UserPut](docs/models/UserPut) - [Users](docs/models/Users) - [UsersEntities](docs/models/UsersEntities) - [Volume](docs/models/Volume) - [VolumeProperties](docs/models/VolumeProperties) - [Volumes](docs/models/Volumes) [[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2002735 ionoscloud-6.1.13/ionoscloud/0000755000175100001660000000000015046550321015542 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/__init__.py0000644000175100001660000003773015046550312017665 0ustar00runnerdocker# coding: utf-8 # flake8: noqa """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import __version__ = "6.1.13" # import apis into sdk package from ionoscloud.api.application_load_balancers_api import ApplicationLoadBalancersApi from ionoscloud.api.backup_units_api import BackupUnitsApi from ionoscloud.api.contract_resources_api import ContractResourcesApi from ionoscloud.api.data_centers_api import DataCentersApi from ionoscloud.api.firewall_rules_api import FirewallRulesApi from ionoscloud.api.flow_logs_api import FlowLogsApi from ionoscloud.api.ip_blocks_api import IPBlocksApi from ionoscloud.api.images_api import ImagesApi from ionoscloud.api.kubernetes_api import KubernetesApi from ionoscloud.api.lans_api import LANsApi from ionoscloud.api.labels_api import LabelsApi from ionoscloud.api.load_balancers_api import LoadBalancersApi from ionoscloud.api.locations_api import LocationsApi from ionoscloud.api.nat_gateways_api import NATGatewaysApi from ionoscloud.api.network_load_balancers_api import NetworkLoadBalancersApi from ionoscloud.api.network_interfaces_api import NetworkInterfacesApi from ionoscloud.api.private_cross_connects_api import PrivateCrossConnectsApi from ionoscloud.api.requests_api import RequestsApi from ionoscloud.api.security_groups_api import SecurityGroupsApi from ionoscloud.api.servers_api import ServersApi from ionoscloud.api.snapshots_api import SnapshotsApi from ionoscloud.api.target_groups_api import TargetGroupsApi from ionoscloud.api.templates_api import TemplatesApi from ionoscloud.api.user_s3_keys_api import UserS3KeysApi from ionoscloud.api.user_management_api import UserManagementApi from ionoscloud.api.volumes_api import VolumesApi from ionoscloud.api.__api import Api # import ApiClient from ionoscloud.api_client import ApiClient from ionoscloud.configuration import Configuration from ionoscloud.exceptions import OpenApiException from ionoscloud.exceptions import ApiTypeError from ionoscloud.exceptions import ApiValueError from ionoscloud.exceptions import ApiKeyError from ionoscloud.exceptions import ApiAttributeError from ionoscloud.exceptions import ApiException # import models into sdk package from ionoscloud.models.application_load_balancer import ApplicationLoadBalancer from ionoscloud.models.application_load_balancer_entities import ApplicationLoadBalancerEntities from ionoscloud.models.application_load_balancer_forwarding_rule import ApplicationLoadBalancerForwardingRule from ionoscloud.models.application_load_balancer_forwarding_rule_properties import ApplicationLoadBalancerForwardingRuleProperties from ionoscloud.models.application_load_balancer_forwarding_rule_put import ApplicationLoadBalancerForwardingRulePut from ionoscloud.models.application_load_balancer_forwarding_rules import ApplicationLoadBalancerForwardingRules from ionoscloud.models.application_load_balancer_http_rule import ApplicationLoadBalancerHttpRule from ionoscloud.models.application_load_balancer_http_rule_condition import ApplicationLoadBalancerHttpRuleCondition from ionoscloud.models.application_load_balancer_properties import ApplicationLoadBalancerProperties from ionoscloud.models.application_load_balancer_put import ApplicationLoadBalancerPut from ionoscloud.models.application_load_balancers import ApplicationLoadBalancers from ionoscloud.models.attached_volumes import AttachedVolumes from ionoscloud.models.backup_unit import BackupUnit from ionoscloud.models.backup_unit_properties import BackupUnitProperties from ionoscloud.models.backup_unit_sso import BackupUnitSSO from ionoscloud.models.backup_units import BackupUnits from ionoscloud.models.balanced_nics import BalancedNics from ionoscloud.models.cdroms import Cdroms from ionoscloud.models.connectable_datacenter import ConnectableDatacenter from ionoscloud.models.contract import Contract from ionoscloud.models.contract_properties import ContractProperties from ionoscloud.models.contracts import Contracts from ionoscloud.models.cpu_architecture_properties import CpuArchitectureProperties from ionoscloud.models.create_snapshot import CreateSnapshot from ionoscloud.models.create_snapshot_properties import CreateSnapshotProperties from ionoscloud.models.data_center_entities import DataCenterEntities from ionoscloud.models.datacenter import Datacenter from ionoscloud.models.datacenter_element_metadata import DatacenterElementMetadata from ionoscloud.models.datacenter_post import DatacenterPost from ionoscloud.models.datacenter_properties import DatacenterProperties from ionoscloud.models.datacenter_properties_post import DatacenterPropertiesPost from ionoscloud.models.datacenter_properties_put import DatacenterPropertiesPut from ionoscloud.models.datacenter_put import DatacenterPut from ionoscloud.models.datacenters import Datacenters from ionoscloud.models.error import Error from ionoscloud.models.error_message import ErrorMessage from ionoscloud.models.firewall_rule import FirewallRule from ionoscloud.models.firewall_rules import FirewallRules from ionoscloud.models.firewallrule_properties import FirewallruleProperties from ionoscloud.models.flow_log import FlowLog from ionoscloud.models.flow_log_properties import FlowLogProperties from ionoscloud.models.flow_log_put import FlowLogPut from ionoscloud.models.flow_logs import FlowLogs from ionoscloud.models.group import Group from ionoscloud.models.group_entities import GroupEntities from ionoscloud.models.group_members import GroupMembers from ionoscloud.models.group_properties import GroupProperties from ionoscloud.models.group_share import GroupShare from ionoscloud.models.group_share_properties import GroupShareProperties from ionoscloud.models.group_shares import GroupShares from ionoscloud.models.group_users import GroupUsers from ionoscloud.models.groups import Groups from ionoscloud.models.ip_failover import IPFailover from ionoscloud.models.image import Image from ionoscloud.models.image_properties import ImageProperties from ionoscloud.models.images import Images from ionoscloud.models.info import Info from ionoscloud.models.ip_block import IpBlock from ionoscloud.models.ip_block_properties import IpBlockProperties from ionoscloud.models.ip_blocks import IpBlocks from ionoscloud.models.ip_consumer import IpConsumer from ionoscloud.models.kubernetes_auto_scaling import KubernetesAutoScaling from ionoscloud.models.kubernetes_cluster import KubernetesCluster from ionoscloud.models.kubernetes_cluster_entities import KubernetesClusterEntities from ionoscloud.models.kubernetes_cluster_for_post import KubernetesClusterForPost from ionoscloud.models.kubernetes_cluster_for_put import KubernetesClusterForPut from ionoscloud.models.kubernetes_cluster_properties import KubernetesClusterProperties from ionoscloud.models.kubernetes_cluster_properties_for_post import KubernetesClusterPropertiesForPost from ionoscloud.models.kubernetes_cluster_properties_for_put import KubernetesClusterPropertiesForPut from ionoscloud.models.kubernetes_clusters import KubernetesClusters from ionoscloud.models.kubernetes_maintenance_window import KubernetesMaintenanceWindow from ionoscloud.models.kubernetes_node import KubernetesNode from ionoscloud.models.kubernetes_node_metadata import KubernetesNodeMetadata from ionoscloud.models.kubernetes_node_pool import KubernetesNodePool from ionoscloud.models.kubernetes_node_pool_for_post import KubernetesNodePoolForPost from ionoscloud.models.kubernetes_node_pool_for_put import KubernetesNodePoolForPut from ionoscloud.models.kubernetes_node_pool_lan import KubernetesNodePoolLan from ionoscloud.models.kubernetes_node_pool_lan_routes import KubernetesNodePoolLanRoutes from ionoscloud.models.kubernetes_node_pool_properties import KubernetesNodePoolProperties from ionoscloud.models.kubernetes_node_pool_properties_for_post import KubernetesNodePoolPropertiesForPost from ionoscloud.models.kubernetes_node_pool_properties_for_put import KubernetesNodePoolPropertiesForPut from ionoscloud.models.kubernetes_node_pool_server_type import KubernetesNodePoolServerType from ionoscloud.models.kubernetes_node_pools import KubernetesNodePools from ionoscloud.models.kubernetes_node_properties import KubernetesNodeProperties from ionoscloud.models.kubernetes_nodes import KubernetesNodes from ionoscloud.models.label import Label from ionoscloud.models.label_properties import LabelProperties from ionoscloud.models.label_resource import LabelResource from ionoscloud.models.label_resource_properties import LabelResourceProperties from ionoscloud.models.label_resources import LabelResources from ionoscloud.models.labels import Labels from ionoscloud.models.lan import Lan from ionoscloud.models.lan_entities import LanEntities from ionoscloud.models.lan_nics import LanNics from ionoscloud.models.lan_properties import LanProperties from ionoscloud.models.lans import Lans from ionoscloud.models.list_of_ids import ListOfIds from ionoscloud.models.loadbalancer import Loadbalancer from ionoscloud.models.loadbalancer_entities import LoadbalancerEntities from ionoscloud.models.loadbalancer_properties import LoadbalancerProperties from ionoscloud.models.loadbalancers import Loadbalancers from ionoscloud.models.location import Location from ionoscloud.models.location_properties import LocationProperties from ionoscloud.models.locations import Locations from ionoscloud.models.nat_gateway import NatGateway from ionoscloud.models.nat_gateway_entities import NatGatewayEntities from ionoscloud.models.nat_gateway_lan_properties import NatGatewayLanProperties from ionoscloud.models.nat_gateway_properties import NatGatewayProperties from ionoscloud.models.nat_gateway_put import NatGatewayPut from ionoscloud.models.nat_gateway_rule import NatGatewayRule from ionoscloud.models.nat_gateway_rule_properties import NatGatewayRuleProperties from ionoscloud.models.nat_gateway_rule_protocol import NatGatewayRuleProtocol from ionoscloud.models.nat_gateway_rule_put import NatGatewayRulePut from ionoscloud.models.nat_gateway_rule_type import NatGatewayRuleType from ionoscloud.models.nat_gateway_rules import NatGatewayRules from ionoscloud.models.nat_gateways import NatGateways from ionoscloud.models.network_load_balancer import NetworkLoadBalancer from ionoscloud.models.network_load_balancer_entities import NetworkLoadBalancerEntities from ionoscloud.models.network_load_balancer_forwarding_rule import NetworkLoadBalancerForwardingRule from ionoscloud.models.network_load_balancer_forwarding_rule_health_check import NetworkLoadBalancerForwardingRuleHealthCheck from ionoscloud.models.network_load_balancer_forwarding_rule_properties import NetworkLoadBalancerForwardingRuleProperties from ionoscloud.models.network_load_balancer_forwarding_rule_put import NetworkLoadBalancerForwardingRulePut from ionoscloud.models.network_load_balancer_forwarding_rule_target import NetworkLoadBalancerForwardingRuleTarget from ionoscloud.models.network_load_balancer_forwarding_rule_target_health_check import NetworkLoadBalancerForwardingRuleTargetHealthCheck from ionoscloud.models.network_load_balancer_forwarding_rules import NetworkLoadBalancerForwardingRules from ionoscloud.models.network_load_balancer_properties import NetworkLoadBalancerProperties from ionoscloud.models.network_load_balancer_put import NetworkLoadBalancerPut from ionoscloud.models.network_load_balancers import NetworkLoadBalancers from ionoscloud.models.nic import Nic from ionoscloud.models.nic_entities import NicEntities from ionoscloud.models.nic_properties import NicProperties from ionoscloud.models.nic_put import NicPut from ionoscloud.models.nics import Nics from ionoscloud.models.no_state_meta_data import NoStateMetaData from ionoscloud.models.pagination_links import PaginationLinks from ionoscloud.models.peer import Peer from ionoscloud.models.private_cross_connect import PrivateCrossConnect from ionoscloud.models.private_cross_connect_properties import PrivateCrossConnectProperties from ionoscloud.models.private_cross_connects import PrivateCrossConnects from ionoscloud.models.remote_console_url import RemoteConsoleUrl from ionoscloud.models.request import Request from ionoscloud.models.request_metadata import RequestMetadata from ionoscloud.models.request_properties import RequestProperties from ionoscloud.models.request_status import RequestStatus from ionoscloud.models.request_status_metadata import RequestStatusMetadata from ionoscloud.models.request_target import RequestTarget from ionoscloud.models.requests import Requests from ionoscloud.models.resource import Resource from ionoscloud.models.resource_entities import ResourceEntities from ionoscloud.models.resource_groups import ResourceGroups from ionoscloud.models.resource_limits import ResourceLimits from ionoscloud.models.resource_properties import ResourceProperties from ionoscloud.models.resource_reference import ResourceReference from ionoscloud.models.resources import Resources from ionoscloud.models.resources_users import ResourcesUsers from ionoscloud.models.restore_snapshot import RestoreSnapshot from ionoscloud.models.restore_snapshot_properties import RestoreSnapshotProperties from ionoscloud.models.s3_bucket import S3Bucket from ionoscloud.models.s3_key import S3Key from ionoscloud.models.s3_key_metadata import S3KeyMetadata from ionoscloud.models.s3_key_properties import S3KeyProperties from ionoscloud.models.s3_keys import S3Keys from ionoscloud.models.s3_object_storage_sso import S3ObjectStorageSSO from ionoscloud.models.security_group import SecurityGroup from ionoscloud.models.security_group_entities import SecurityGroupEntities from ionoscloud.models.security_group_entities_request import SecurityGroupEntitiesRequest from ionoscloud.models.security_group_properties import SecurityGroupProperties from ionoscloud.models.security_group_request import SecurityGroupRequest from ionoscloud.models.security_groups import SecurityGroups from ionoscloud.models.server import Server from ionoscloud.models.server_entities import ServerEntities from ionoscloud.models.server_properties import ServerProperties from ionoscloud.models.servers import Servers from ionoscloud.models.snapshot import Snapshot from ionoscloud.models.snapshot_properties import SnapshotProperties from ionoscloud.models.snapshots import Snapshots from ionoscloud.models.target_group import TargetGroup from ionoscloud.models.target_group_health_check import TargetGroupHealthCheck from ionoscloud.models.target_group_http_health_check import TargetGroupHttpHealthCheck from ionoscloud.models.target_group_properties import TargetGroupProperties from ionoscloud.models.target_group_put import TargetGroupPut from ionoscloud.models.target_group_target import TargetGroupTarget from ionoscloud.models.target_groups import TargetGroups from ionoscloud.models.target_port_range import TargetPortRange from ionoscloud.models.template import Template from ionoscloud.models.template_properties import TemplateProperties from ionoscloud.models.templates import Templates from ionoscloud.models.token import Token from ionoscloud.models.type import Type from ionoscloud.models.user import User from ionoscloud.models.user_group_post import UserGroupPost from ionoscloud.models.user_metadata import UserMetadata from ionoscloud.models.user_post import UserPost from ionoscloud.models.user_properties import UserProperties from ionoscloud.models.user_properties_post import UserPropertiesPost from ionoscloud.models.user_properties_put import UserPropertiesPut from ionoscloud.models.user_put import UserPut from ionoscloud.models.users import Users from ionoscloud.models.users_entities import UsersEntities from ionoscloud.models.volume import Volume from ionoscloud.models.volume_properties import VolumeProperties from ionoscloud.models.volumes import Volumes ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2082736 ionoscloud-6.1.13/ionoscloud/api/0000755000175100001660000000000015046550321016313 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/__api.py0000644000175100001660000002040415046550312017734 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class Api(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def api_info_get(self, **kwargs): # noqa: E501 """Get API information # noqa: E501 Retrieves the API information such as API version. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api_info_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Info """ kwargs['_return_http_data_only'] = True return self.api_info_get_with_http_info(**kwargs) # noqa: E501 def api_info_get_with_http_info(self, **kwargs): # noqa: E501 """Get API information # noqa: E501 Retrieves the API information such as API version. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api_info_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Info, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method api_info_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `api_info_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `api_info_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 response_type = 'Info' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/__init__.py0000644000175100001660000000321415046550312020424 0ustar00runnerdockerfrom __future__ import absolute_import # flake8: noqa # import apis into api package from ionoscloud.api.application_load_balancers_api import ApplicationLoadBalancersApi from ionoscloud.api.backup_units_api import BackupUnitsApi from ionoscloud.api.contract_resources_api import ContractResourcesApi from ionoscloud.api.data_centers_api import DataCentersApi from ionoscloud.api.firewall_rules_api import FirewallRulesApi from ionoscloud.api.flow_logs_api import FlowLogsApi from ionoscloud.api.ip_blocks_api import IPBlocksApi from ionoscloud.api.images_api import ImagesApi from ionoscloud.api.kubernetes_api import KubernetesApi from ionoscloud.api.lans_api import LANsApi from ionoscloud.api.labels_api import LabelsApi from ionoscloud.api.load_balancers_api import LoadBalancersApi from ionoscloud.api.locations_api import LocationsApi from ionoscloud.api.nat_gateways_api import NATGatewaysApi from ionoscloud.api.network_load_balancers_api import NetworkLoadBalancersApi from ionoscloud.api.network_interfaces_api import NetworkInterfacesApi from ionoscloud.api.private_cross_connects_api import PrivateCrossConnectsApi from ionoscloud.api.requests_api import RequestsApi from ionoscloud.api.security_groups_api import SecurityGroupsApi from ionoscloud.api.servers_api import ServersApi from ionoscloud.api.snapshots_api import SnapshotsApi from ionoscloud.api.target_groups_api import TargetGroupsApi from ionoscloud.api.templates_api import TemplatesApi from ionoscloud.api.user_s3_keys_api import UserS3KeysApi from ionoscloud.api.user_management_api import UserManagementApi from ionoscloud.api.volumes_api import VolumesApi from ionoscloud.api.__api import Api ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/application_load_balancers_api.py0000644000175100001660000064246415046550312025052 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class ApplicationLoadBalancersApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_applicationloadbalancers_delete(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Delete an Application Load Balancer by ID # noqa: E501 Removes the specified Application Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_delete(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_delete_with_http_info(datacenter_id, application_load_balancer_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_delete_with_http_info(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Delete an Application Load Balancer by ID # noqa: E501 Removes the specified Application Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_delete_with_http_info(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_delete`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_find_by_application_load_balancer_id(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get an Application Load Balancer by ID # noqa: E501 Retrieves the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_find_by_application_load_balancer_id(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_find_by_application_load_balancer_id_with_http_info(datacenter_id, application_load_balancer_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_find_by_application_load_balancer_id_with_http_info(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get an Application Load Balancer by ID # noqa: E501 Retrieves the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_find_by_application_load_balancer_id_with_http_info(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_find_by_application_load_balancer_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_find_by_application_load_balancer_id`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_find_by_application_load_balancer_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_find_by_application_load_balancer_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_find_by_application_load_balancer_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_delete(self, datacenter_id, application_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Delete an ALB Flow Log by ID # noqa: E501 Deletes the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_delete(datacenter_id, application_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_delete_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_delete_with_http_info(self, datacenter_id, application_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Delete an ALB Flow Log by ID # noqa: E501 Deletes the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_delete_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'flow_log_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_delete`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_delete`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_applicationloadbalancers_flowlogs_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id(self, datacenter_id, application_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Get an ALB Flow Log by ID # noqa: E501 Retrieves the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, application_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(self, datacenter_id, application_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Get an ALB Flow Log by ID # noqa: E501 Retrieves the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'flow_log_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_get(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get ALB Flow Logs # noqa: E501 Retrieves the flow logs for the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_get(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLogs """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_get_with_http_info(datacenter_id, application_load_balancer_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_get_with_http_info(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get ALB Flow Logs # noqa: E501 Retrieves the flow logs for the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_get_with_http_info(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLogs, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_get`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLogs' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_patch(self, datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, **kwargs): # noqa: E501 """Partially Modify an ALB Flow Log by ID # noqa: E501 Updates the properties of the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_patch(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param application_load_balancer_flow_log_properties: The properties of the ALB flow log to be updated. (required) :type application_load_balancer_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_patch_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_patch_with_http_info(self, datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, **kwargs): # noqa: E501 """Partially Modify an ALB Flow Log by ID # noqa: E501 Updates the properties of the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_patch_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param application_load_balancer_flow_log_properties: The properties of the ALB flow log to be updated. (required) :type application_load_balancer_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'flow_log_id', 'application_load_balancer_flow_log_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_applicationloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_flow_log_properties' is set if self.api_client.client_side_validation and ('application_load_balancer_flow_log_properties' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_flow_log_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_flow_log_properties` when calling `datacenters_applicationloadbalancers_flowlogs_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_flow_log_properties' in local_var_params: body_params = local_var_params['application_load_balancer_flow_log_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_post(self, datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, **kwargs): # noqa: E501 """Create an ALB Flow Log # noqa: E501 Creates a flow log for the Application Load Balancer specified by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_post(datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_flow_log: The flow log to create. (required) :type application_load_balancer_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_post_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_post_with_http_info(self, datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, **kwargs): # noqa: E501 """Create an ALB Flow Log # noqa: E501 Creates a flow log for the Application Load Balancer specified by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_post_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_flow_log: The flow log to create. (required) :type application_load_balancer_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'application_load_balancer_flow_log', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_post`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_post`") # noqa: E501 # verify the required parameter 'application_load_balancer_flow_log' is set if self.api_client.client_side_validation and ('application_load_balancer_flow_log' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_flow_log` when calling `datacenters_applicationloadbalancers_flowlogs_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_flow_log' in local_var_params: body_params = local_var_params['application_load_balancer_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_flowlogs_put(self, datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, **kwargs): # noqa: E501 """Modify an ALB Flow Log by ID # noqa: E501 Modifies the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_put(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param application_load_balancer_flow_log: The modified ALB flow log. (required) :type application_load_balancer_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_flowlogs_put_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_flowlogs_put_with_http_info(self, datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, **kwargs): # noqa: E501 """Modify an ALB Flow Log by ID # noqa: E501 Modifies the Application Load Balancer flow log specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_flowlogs_put_with_http_info(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param flow_log_id: The unique ID of the flow log. (required) :type flow_log_id: str :param application_load_balancer_flow_log: The modified ALB flow log. (required) :type application_load_balancer_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'flow_log_id', 'application_load_balancer_flow_log', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_flowlogs_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_applicationloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'application_load_balancer_flow_log' is set if self.api_client.client_side_validation and ('application_load_balancer_flow_log' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_flow_log` when calling `datacenters_applicationloadbalancers_flowlogs_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_flowlogs_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_flow_log' in local_var_params: body_params = local_var_params['application_load_balancer_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_delete(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Delete an ALB Forwarding Rule by ID # noqa: E501 Deletes the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_delete(datacenter_id, application_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_delete_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_delete_with_http_info(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Delete an ALB Forwarding Rule by ID # noqa: E501 Deletes the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_delete_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'forwarding_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_delete`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_delete`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_applicationloadbalancers_forwardingrules_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Get an ALB Forwarding Rule by ID # noqa: E501 Retrieves the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, application_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Get an ALB Forwarding Rule by ID # noqa: E501 Retrieves the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'forwarding_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_get(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get ALB Forwarding Rules # noqa: E501 Lists the forwarding rules of the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_get(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancerForwardingRules """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_get_with_http_info(datacenter_id, application_load_balancer_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_get_with_http_info(self, datacenter_id, application_load_balancer_id, **kwargs): # noqa: E501 """Get ALB Forwarding Rules # noqa: E501 Lists the forwarding rules of the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_get_with_http_info(datacenter_id, application_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancerForwardingRules, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_get`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancerForwardingRules' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_patch(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, **kwargs): # noqa: E501 """Partially modify an ALB Forwarding Rule by ID # noqa: E501 Updates the properties of the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_patch(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param application_load_balancer_forwarding_rule_properties: The properties of the forwarding rule to be updated. (required) :type application_load_balancer_forwarding_rule_properties: ApplicationLoadBalancerForwardingRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_patch_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_patch_with_http_info(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, **kwargs): # noqa: E501 """Partially modify an ALB Forwarding Rule by ID # noqa: E501 Updates the properties of the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_patch_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param application_load_balancer_forwarding_rule_properties: The properties of the forwarding rule to be updated. (required) :type application_load_balancer_forwarding_rule_properties: ApplicationLoadBalancerForwardingRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'forwarding_rule_id', 'application_load_balancer_forwarding_rule_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_forwarding_rule_properties' is set if self.api_client.client_side_validation and ('application_load_balancer_forwarding_rule_properties' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_forwarding_rule_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_forwarding_rule_properties` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_forwarding_rule_properties' in local_var_params: body_params = local_var_params['application_load_balancer_forwarding_rule_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_post(self, datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Create an ALB Forwarding Rule # noqa: E501 Creates a forwarding rule for the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_post(datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_forwarding_rule: The forwarding rule to create. (required) :type application_load_balancer_forwarding_rule: ApplicationLoadBalancerForwardingRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_post_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_post_with_http_info(self, datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Create an ALB Forwarding Rule # noqa: E501 Creates a forwarding rule for the specified Application Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_post_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_forwarding_rule: The forwarding rule to create. (required) :type application_load_balancer_forwarding_rule: ApplicationLoadBalancerForwardingRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'application_load_balancer_forwarding_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_post`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_post`") # noqa: E501 # verify the required parameter 'application_load_balancer_forwarding_rule' is set if self.api_client.client_side_validation and ('application_load_balancer_forwarding_rule' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_forwarding_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_forwarding_rule` when calling `datacenters_applicationloadbalancers_forwardingrules_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_forwarding_rule' in local_var_params: body_params = local_var_params['application_load_balancer_forwarding_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_forwardingrules_put(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Modify an ALB Forwarding Rule by ID # noqa: E501 Modifies the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_put(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param application_load_balancer_forwarding_rule: The modified ALB forwarding rule. (required) :type application_load_balancer_forwarding_rule: ApplicationLoadBalancerForwardingRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_forwardingrules_put_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_forwardingrules_put_with_http_info(self, datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Modify an ALB Forwarding Rule by ID # noqa: E501 Modifies the Application Load Balancer forwarding rule specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_forwardingrules_put_with_http_info(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param application_load_balancer_forwarding_rule: The modified ALB forwarding rule. (required) :type application_load_balancer_forwarding_rule: ApplicationLoadBalancerForwardingRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'forwarding_rule_id', 'application_load_balancer_forwarding_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_forwardingrules_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_applicationloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'application_load_balancer_forwarding_rule' is set if self.api_client.client_side_validation and ('application_load_balancer_forwarding_rule' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_forwarding_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_forwarding_rule` when calling `datacenters_applicationloadbalancers_forwardingrules_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_forwardingrules_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_forwarding_rule' in local_var_params: body_params = local_var_params['application_load_balancer_forwarding_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_get(self, datacenter_id, **kwargs): # noqa: E501 """Get Application Load Balancers # noqa: E501 Lists all Application Load Balancers within a data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancers """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """Get Application Load Balancers # noqa: E501 Lists all Application Load Balancers within a data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_applicationloadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_applicationloadbalancers_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_applicationloadbalancers_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_patch(self, datacenter_id, application_load_balancer_id, application_load_balancer_properties, **kwargs): # noqa: E501 """Partially Modify an Application Load Balancer by ID # noqa: E501 Updates the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_patch(datacenter_id, application_load_balancer_id, application_load_balancer_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_properties: The Application Load Balancer properties to be updated. (required) :type application_load_balancer_properties: ApplicationLoadBalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_patch_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_properties, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_patch_with_http_info(self, datacenter_id, application_load_balancer_id, application_load_balancer_properties, **kwargs): # noqa: E501 """Partially Modify an Application Load Balancer by ID # noqa: E501 Updates the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_patch_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer_properties: The Application Load Balancer properties to be updated. (required) :type application_load_balancer_properties: ApplicationLoadBalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'application_load_balancer_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_patch`") # noqa: E501 # verify the required parameter 'application_load_balancer_properties' is set if self.api_client.client_side_validation and ('application_load_balancer_properties' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_properties` when calling `datacenters_applicationloadbalancers_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer_properties' in local_var_params: body_params = local_var_params['application_load_balancer_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_post(self, datacenter_id, application_load_balancer, **kwargs): # noqa: E501 """Create an Application Load Balancer # noqa: E501 Creates an Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_post(datacenter_id, application_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer: The Application Load Balancer to create. (required) :type application_load_balancer: ApplicationLoadBalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_post_with_http_info(datacenter_id, application_load_balancer, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_post_with_http_info(self, datacenter_id, application_load_balancer, **kwargs): # noqa: E501 """Create an Application Load Balancer # noqa: E501 Creates an Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_post_with_http_info(datacenter_id, application_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer: The Application Load Balancer to create. (required) :type application_load_balancer: ApplicationLoadBalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_post`") # noqa: E501 # verify the required parameter 'application_load_balancer' is set if self.api_client.client_side_validation and ('application_load_balancer' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer` when calling `datacenters_applicationloadbalancers_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer' in local_var_params: body_params = local_var_params['application_load_balancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_applicationloadbalancers_put(self, datacenter_id, application_load_balancer_id, application_load_balancer, **kwargs): # noqa: E501 """Modify an Application Load Balancer by ID # noqa: E501 Modifies the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_put(datacenter_id, application_load_balancer_id, application_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer: The modified Application Load Balancer. (required) :type application_load_balancer: ApplicationLoadBalancerPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ApplicationLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_applicationloadbalancers_put_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer, **kwargs) # noqa: E501 def datacenters_applicationloadbalancers_put_with_http_info(self, datacenter_id, application_load_balancer_id, application_load_balancer, **kwargs): # noqa: E501 """Modify an Application Load Balancer by ID # noqa: E501 Modifies the properties of the specified Application Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_applicationloadbalancers_put_with_http_info(datacenter_id, application_load_balancer_id, application_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param application_load_balancer_id: The unique ID of the Application Load Balancer. (required) :type application_load_balancer_id: str :param application_load_balancer: The modified Application Load Balancer. (required) :type application_load_balancer: ApplicationLoadBalancerPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApplicationLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'application_load_balancer_id', 'application_load_balancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_applicationloadbalancers_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_applicationloadbalancers_put`") # noqa: E501 # verify the required parameter 'application_load_balancer_id' is set if self.api_client.client_side_validation and ('application_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer_id` when calling `datacenters_applicationloadbalancers_put`") # noqa: E501 # verify the required parameter 'application_load_balancer' is set if self.api_client.client_side_validation and ('application_load_balancer' not in local_var_params or # noqa: E501 local_var_params['application_load_balancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `application_load_balancer` when calling `datacenters_applicationloadbalancers_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_applicationloadbalancers_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'application_load_balancer_id' in local_var_params: path_params['applicationLoadBalancerId'] = local_var_params['application_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'application_load_balancer' in local_var_params: body_params = local_var_params['application_load_balancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ApplicationLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/backup_units_api.py0000644000175100001660000017476615046550312022232 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class BackupUnitsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def backupunits_delete(self, backupunit_id, **kwargs): # noqa: E501 """Delete backup units # noqa: E501 Remove the specified backup unit. This process will delete: 1) The backup plans inside the backup unit 2) All backups, associated with this backup unit 3) The backup user 4) The backup unit itself # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_delete(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.backupunits_delete_with_http_info(backupunit_id, **kwargs) # noqa: E501 def backupunits_delete_with_http_info(self, backupunit_id, **kwargs): # noqa: E501 """Delete backup units # noqa: E501 Remove the specified backup unit. This process will delete: 1) The backup plans inside the backup unit 2) All backups, associated with this backup unit 3) The backup user 4) The backup unit itself # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_delete_with_http_info(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'backupunit_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backupunit_id' is set if self.api_client.client_side_validation and ('backupunit_id' not in local_var_params or # noqa: E501 local_var_params['backupunit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backupunit_id` when calling `backupunits_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'backupunit_id' in local_var_params: path_params['backupunitId'] = local_var_params['backupunit_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits/{backupunitId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_find_by_id(self, backupunit_id, **kwargs): # noqa: E501 """Retrieve backup units # noqa: E501 Retrieve the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_find_by_id(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnit """ kwargs['_return_http_data_only'] = True return self.backupunits_find_by_id_with_http_info(backupunit_id, **kwargs) # noqa: E501 def backupunits_find_by_id_with_http_info(self, backupunit_id, **kwargs): # noqa: E501 """Retrieve backup units # noqa: E501 Retrieve the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_find_by_id_with_http_info(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnit, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'backupunit_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backupunit_id' is set if self.api_client.client_side_validation and ('backupunit_id' not in local_var_params or # noqa: E501 local_var_params['backupunit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backupunit_id` when calling `backupunits_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'backupunit_id' in local_var_params: path_params['backupunitId'] = local_var_params['backupunit_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnit' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits/{backupunitId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_get(self, **kwargs): # noqa: E501 """List backup units # noqa: E501 List all available backup units. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnits """ kwargs['_return_http_data_only'] = True return self.backupunits_get_with_http_info(**kwargs) # noqa: E501 def backupunits_get_with_http_info(self, **kwargs): # noqa: E501 """List backup units # noqa: E501 List all available backup units. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnits, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnits' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_patch(self, backupunit_id, backup_unit, **kwargs): # noqa: E501 """Partially modify backup units # noqa: E501 Update the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_patch(backupunit_id, backup_unit, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param backup_unit: The properties of the backup unit to be updated. (required) :type backup_unit: BackupUnitProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnit """ kwargs['_return_http_data_only'] = True return self.backupunits_patch_with_http_info(backupunit_id, backup_unit, **kwargs) # noqa: E501 def backupunits_patch_with_http_info(self, backupunit_id, backup_unit, **kwargs): # noqa: E501 """Partially modify backup units # noqa: E501 Update the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_patch_with_http_info(backupunit_id, backup_unit, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param backup_unit: The properties of the backup unit to be updated. (required) :type backup_unit: BackupUnitProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnit, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'backupunit_id', 'backup_unit', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backupunit_id' is set if self.api_client.client_side_validation and ('backupunit_id' not in local_var_params or # noqa: E501 local_var_params['backupunit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backupunit_id` when calling `backupunits_patch`") # noqa: E501 # verify the required parameter 'backup_unit' is set if self.api_client.client_side_validation and ('backup_unit' not in local_var_params or # noqa: E501 local_var_params['backup_unit'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backup_unit` when calling `backupunits_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'backupunit_id' in local_var_params: path_params['backupunitId'] = local_var_params['backupunit_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'backup_unit' in local_var_params: body_params = local_var_params['backup_unit'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnit' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits/{backupunitId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_post(self, backup_unit, **kwargs): # noqa: E501 """Create backup units # noqa: E501 Create a backup unit. Backup units are resources, same as storage volumes or snapshots; they can be shared through groups in User management. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_post(backup_unit, async_req=True) >>> result = thread.get() :param backup_unit: The backup unit to create. (required) :type backup_unit: BackupUnit :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnit """ kwargs['_return_http_data_only'] = True return self.backupunits_post_with_http_info(backup_unit, **kwargs) # noqa: E501 def backupunits_post_with_http_info(self, backup_unit, **kwargs): # noqa: E501 """Create backup units # noqa: E501 Create a backup unit. Backup units are resources, same as storage volumes or snapshots; they can be shared through groups in User management. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_post_with_http_info(backup_unit, async_req=True) >>> result = thread.get() :param backup_unit: The backup unit to create. (required) :type backup_unit: BackupUnit :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnit, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'backup_unit', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backup_unit' is set if self.api_client.client_side_validation and ('backup_unit' not in local_var_params or # noqa: E501 local_var_params['backup_unit'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backup_unit` when calling `backupunits_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'backup_unit' in local_var_params: body_params = local_var_params['backup_unit'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnit' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_put(self, backupunit_id, backup_unit, **kwargs): # noqa: E501 """Modify backup units # noqa: E501 Modify the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_put(backupunit_id, backup_unit, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param backup_unit: The modified backup unit. (required) :type backup_unit: BackupUnit :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnit """ kwargs['_return_http_data_only'] = True return self.backupunits_put_with_http_info(backupunit_id, backup_unit, **kwargs) # noqa: E501 def backupunits_put_with_http_info(self, backupunit_id, backup_unit, **kwargs): # noqa: E501 """Modify backup units # noqa: E501 Modify the properties of the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_put_with_http_info(backupunit_id, backup_unit, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param backup_unit: The modified backup unit. (required) :type backup_unit: BackupUnit :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnit, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'backupunit_id', 'backup_unit', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backupunit_id' is set if self.api_client.client_side_validation and ('backupunit_id' not in local_var_params or # noqa: E501 local_var_params['backupunit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backupunit_id` when calling `backupunits_put`") # noqa: E501 # verify the required parameter 'backup_unit' is set if self.api_client.client_side_validation and ('backup_unit' not in local_var_params or # noqa: E501 local_var_params['backup_unit'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backup_unit` when calling `backupunits_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `backupunits_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'backupunit_id' in local_var_params: path_params['backupunitId'] = local_var_params['backupunit_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'backup_unit' in local_var_params: body_params = local_var_params['backup_unit'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnit' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits/{backupunitId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def backupunits_ssourl_get(self, backupunit_id, **kwargs): # noqa: E501 """Retrieve BU single sign-on URLs # noqa: E501 Retrieve a single sign-on URL for the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_ssourl_get(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BackupUnitSSO """ kwargs['_return_http_data_only'] = True return self.backupunits_ssourl_get_with_http_info(backupunit_id, **kwargs) # noqa: E501 def backupunits_ssourl_get_with_http_info(self, backupunit_id, **kwargs): # noqa: E501 """Retrieve BU single sign-on URLs # noqa: E501 Retrieve a single sign-on URL for the specified backup unit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.backupunits_ssourl_get_with_http_info(backupunit_id, async_req=True) >>> result = thread.get() :param backupunit_id: The unique ID of the backup unit. (required) :type backupunit_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BackupUnitSSO, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'backupunit_id', 'pretty', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method backupunits_ssourl_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'backupunit_id' is set if self.api_client.client_side_validation and ('backupunit_id' not in local_var_params or # noqa: E501 local_var_params['backupunit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `backupunit_id` when calling `backupunits_ssourl_get`") # noqa: E501 collection_formats = {} path_params = {} if 'backupunit_id' in local_var_params: path_params['backupunitId'] = local_var_params['backupunit_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BackupUnitSSO' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/backupunits/{backupunitId}/ssourl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/contract_resources_api.py0000644000175100001660000002104315046550312023425 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class ContractResourcesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def contracts_get(self, **kwargs): # noqa: E501 """Get Contract Information # noqa: E501 Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.contracts_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Contracts """ kwargs['_return_http_data_only'] = True return self.contracts_get_with_http_info(**kwargs) # noqa: E501 def contracts_get_with_http_info(self, **kwargs): # noqa: E501 """Get Contract Information # noqa: E501 Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.contracts_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Contracts, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method contracts_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `contracts_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `contracts_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Contracts' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/contracts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/data_centers_api.py0000644000175100001660000016417115046550312022164 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class DataCentersApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_delete(self, datacenter_id, **kwargs): # noqa: E501 """Delete data centers # noqa: E501 Delete the specified data center and all the elements it contains. This method is destructive and should be used carefully. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_delete(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_delete_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_delete_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """Delete data centers # noqa: E501 Delete the specified data center and all the elements it contains. This method is destructive and should be used carefully. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_delete_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_find_by_id(self, datacenter_id, **kwargs): # noqa: E501 """Retrieve data centers # noqa: E501 Retrieve data centers by resource ID. This value is in the response body when the data center is created, and in the list of the data centers, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_find_by_id(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Datacenter """ kwargs['_return_http_data_only'] = True return self.datacenters_find_by_id_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_find_by_id_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """Retrieve data centers # noqa: E501 Retrieve data centers by resource ID. This value is in the response body when the data center is created, and in the list of the data centers, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_find_by_id_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Datacenter, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Datacenter' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_get(self, **kwargs): # noqa: E501 """List your data centers # noqa: E501 List the data centers for your account. Default limit is the first 100 items; use pagination query parameters for listing more items. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Datacenters """ kwargs['_return_http_data_only'] = True return self.datacenters_get_with_http_info(**kwargs) # noqa: E501 def datacenters_get_with_http_info(self, **kwargs): # noqa: E501 """List your data centers # noqa: E501 List the data centers for your account. Default limit is the first 100 items; use pagination query parameters for listing more items. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Datacenters, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Datacenters' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_patch(self, datacenter_id, datacenter, **kwargs): # noqa: E501 """Partially modify a Data Center by ID # noqa: E501 Updates the properties of the specified data center, rename it, or change the description. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_patch(datacenter_id, datacenter, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param datacenter: The properties of the data center to be updated. (required) :type datacenter: DatacenterPropertiesPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Datacenter """ kwargs['_return_http_data_only'] = True return self.datacenters_patch_with_http_info(datacenter_id, datacenter, **kwargs) # noqa: E501 def datacenters_patch_with_http_info(self, datacenter_id, datacenter, **kwargs): # noqa: E501 """Partially modify a Data Center by ID # noqa: E501 Updates the properties of the specified data center, rename it, or change the description. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_patch_with_http_info(datacenter_id, datacenter, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param datacenter: The properties of the data center to be updated. (required) :type datacenter: DatacenterPropertiesPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Datacenter, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'datacenter', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_patch`") # noqa: E501 # verify the required parameter 'datacenter' is set if self.api_client.client_side_validation and ('datacenter' not in local_var_params or # noqa: E501 local_var_params['datacenter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter` when calling `datacenters_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'datacenter' in local_var_params: body_params = local_var_params['datacenter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Datacenter' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_post(self, datacenter, **kwargs): # noqa: E501 """Create a Data Center # noqa: E501 Creates new data centers, and data centers that already contain elements, such as servers and storage volumes. Virtual data centers are the foundation of the platform; they act as logical containers for all other objects you create, such as servers and storage volumes. You can provision as many data centers as needed. Data centers have their own private networks and are logically segmented from each other to create isolation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_post(datacenter, async_req=True) >>> result = thread.get() :param datacenter: The data center to create. (required) :type datacenter: DatacenterPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Datacenter """ kwargs['_return_http_data_only'] = True return self.datacenters_post_with_http_info(datacenter, **kwargs) # noqa: E501 def datacenters_post_with_http_info(self, datacenter, **kwargs): # noqa: E501 """Create a Data Center # noqa: E501 Creates new data centers, and data centers that already contain elements, such as servers and storage volumes. Virtual data centers are the foundation of the platform; they act as logical containers for all other objects you create, such as servers and storage volumes. You can provision as many data centers as needed. Data centers have their own private networks and are logically segmented from each other to create isolation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_post_with_http_info(datacenter, async_req=True) >>> result = thread.get() :param datacenter: The data center to create. (required) :type datacenter: DatacenterPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Datacenter, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter' is set if self.api_client.client_side_validation and ('datacenter' not in local_var_params or # noqa: E501 local_var_params['datacenter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter` when calling `datacenters_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'datacenter' in local_var_params: body_params = local_var_params['datacenter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Datacenter' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_put(self, datacenter_id, datacenter, **kwargs): # noqa: E501 """Modify a Data Center by ID # noqa: E501 Modifies the properties of the specified data center, rename it, or change the description. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_put(datacenter_id, datacenter, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param datacenter: The modified data center. (required) :type datacenter: DatacenterPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Datacenter """ kwargs['_return_http_data_only'] = True return self.datacenters_put_with_http_info(datacenter_id, datacenter, **kwargs) # noqa: E501 def datacenters_put_with_http_info(self, datacenter_id, datacenter, **kwargs): # noqa: E501 """Modify a Data Center by ID # noqa: E501 Modifies the properties of the specified data center, rename it, or change the description. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_put_with_http_info(datacenter_id, datacenter, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param datacenter: The modified data center. (required) :type datacenter: DatacenterPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Datacenter, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'datacenter', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_put`") # noqa: E501 # verify the required parameter 'datacenter' is set if self.api_client.client_side_validation and ('datacenter' not in local_var_params or # noqa: E501 local_var_params['datacenter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter` when calling `datacenters_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'datacenter' in local_var_params: body_params = local_var_params['datacenter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Datacenter' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/firewall_rules_api.py0000644000175100001660000022274015046550312022544 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class FirewallRulesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_servers_nics_firewallrules_delete(self, datacenter_id, server_id, nic_id, firewallrule_id, **kwargs): # noqa: E501 """Delete firewall rules # noqa: E501 Delete the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_delete_with_http_info(self, datacenter_id, server_id, nic_id, firewallrule_id, **kwargs): # noqa: E501 """Delete firewall rules # noqa: E501 Delete the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'firewallrule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_delete`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_delete`") # noqa: E501 # verify the required parameter 'firewallrule_id' is set if self.api_client.client_side_validation and ('firewallrule_id' not in local_var_params or # noqa: E501 local_var_params['firewallrule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule_id` when calling `datacenters_servers_nics_firewallrules_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'firewallrule_id' in local_var_params: path_params['firewallruleId'] = local_var_params['firewallrule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_firewallrules_find_by_id(self, datacenter_id, server_id, nic_id, firewallrule_id, **kwargs): # noqa: E501 """Retrieve firewall rules # noqa: E501 Retrieve the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_find_by_id_with_http_info(self, datacenter_id, server_id, nic_id, firewallrule_id, **kwargs): # noqa: E501 """Retrieve firewall rules # noqa: E501 Retrieve the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'firewallrule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_find_by_id`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_find_by_id`") # noqa: E501 # verify the required parameter 'firewallrule_id' is set if self.api_client.client_side_validation and ('firewallrule_id' not in local_var_params or # noqa: E501 local_var_params['firewallrule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule_id` when calling `datacenters_servers_nics_firewallrules_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'firewallrule_id' in local_var_params: path_params['firewallruleId'] = local_var_params['firewallrule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_firewallrules_get(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """List firewall rules # noqa: E501 List all firewall rules for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRules """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_get_with_http_info(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """List firewall rules # noqa: E501 List all firewall rules for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRules, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_get`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_nics_firewallrules_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_firewallrules_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_firewallrules_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRules' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_firewallrules_patch(self, datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs): # noqa: E501 """Partially modify firewall rules # noqa: E501 Update the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param firewallrule: The properties of the firewall rule to be updated. (required) :type firewallrule: FirewallruleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_patch_with_http_info(self, datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs): # noqa: E501 """Partially modify firewall rules # noqa: E501 Update the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param firewallrule: The properties of the firewall rule to be updated. (required) :type firewallrule: FirewallruleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'firewallrule_id', 'firewallrule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_patch`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_patch`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_patch`") # noqa: E501 # verify the required parameter 'firewallrule_id' is set if self.api_client.client_side_validation and ('firewallrule_id' not in local_var_params or # noqa: E501 local_var_params['firewallrule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule_id` when calling `datacenters_servers_nics_firewallrules_patch`") # noqa: E501 # verify the required parameter 'firewallrule' is set if self.api_client.client_side_validation and ('firewallrule' not in local_var_params or # noqa: E501 local_var_params['firewallrule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule` when calling `datacenters_servers_nics_firewallrules_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'firewallrule_id' in local_var_params: path_params['firewallruleId'] = local_var_params['firewallrule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'firewallrule' in local_var_params: body_params = local_var_params['firewallrule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_firewallrules_post(self, datacenter_id, server_id, nic_id, firewallrule, **kwargs): # noqa: E501 """Create a Firewall Rule # noqa: E501 Creates a firewall rule for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule: The firewall rule to create. (required) :type firewallrule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_post_with_http_info(self, datacenter_id, server_id, nic_id, firewallrule, **kwargs): # noqa: E501 """Create a Firewall Rule # noqa: E501 Creates a firewall rule for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule: The firewall rule to create. (required) :type firewallrule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'firewallrule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_post`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_post`") # noqa: E501 # verify the required parameter 'firewallrule' is set if self.api_client.client_side_validation and ('firewallrule' not in local_var_params or # noqa: E501 local_var_params['firewallrule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule` when calling `datacenters_servers_nics_firewallrules_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'firewallrule' in local_var_params: body_params = local_var_params['firewallrule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_firewallrules_put(self, datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs): # noqa: E501 """Modify a Firewall Rule # noqa: E501 Modifies the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param firewallrule: The modified firewall rule. (required) :type firewallrule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs) # noqa: E501 def datacenters_servers_nics_firewallrules_put_with_http_info(self, datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, **kwargs): # noqa: E501 """Modify a Firewall Rule # noqa: E501 Modifies the properties of the specified firewall rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param firewallrule_id: The unique ID of the firewall rule. (required) :type firewallrule_id: str :param firewallrule: The modified firewall rule. (required) :type firewallrule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'firewallrule_id', 'firewallrule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_firewallrules_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_firewallrules_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_firewallrules_put`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_firewallrules_put`") # noqa: E501 # verify the required parameter 'firewallrule_id' is set if self.api_client.client_side_validation and ('firewallrule_id' not in local_var_params or # noqa: E501 local_var_params['firewallrule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule_id` when calling `datacenters_servers_nics_firewallrules_put`") # noqa: E501 # verify the required parameter 'firewallrule' is set if self.api_client.client_side_validation and ('firewallrule' not in local_var_params or # noqa: E501 local_var_params['firewallrule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewallrule` when calling `datacenters_servers_nics_firewallrules_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_firewallrules_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'firewallrule_id' in local_var_params: path_params['firewallruleId'] = local_var_params['firewallrule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'firewallrule' in local_var_params: body_params = local_var_params['firewallrule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/flow_logs_api.py0000644000175100001660000021164615046550312021523 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class FlowLogsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_servers_nics_flowlogs_delete(self, datacenter_id, server_id, nic_id, flowlog_id, **kwargs): # noqa: E501 """Delete Flow Logs # noqa: E501 Delete the specified Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_delete(datacenter_id, server_id, nic_id, flowlog_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_delete_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_delete_with_http_info(self, datacenter_id, server_id, nic_id, flowlog_id, **kwargs): # noqa: E501 """Delete Flow Logs # noqa: E501 Delete the specified Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_delete_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'flowlog_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_delete`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_delete`") # noqa: E501 # verify the required parameter 'flowlog_id' is set if self.api_client.client_side_validation and ('flowlog_id' not in local_var_params or # noqa: E501 local_var_params['flowlog_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog_id` when calling `datacenters_servers_nics_flowlogs_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'flowlog_id' in local_var_params: path_params['flowlogId'] = local_var_params['flowlog_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_flowlogs_find_by_id(self, datacenter_id, server_id, nic_id, flowlog_id, **kwargs): # noqa: E501 """Retrieve Flow Logs # noqa: E501 Retrieve the properties of the specified Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_find_by_id(datacenter_id, server_id, nic_id, flowlog_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_find_by_id_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_find_by_id_with_http_info(self, datacenter_id, server_id, nic_id, flowlog_id, **kwargs): # noqa: E501 """Retrieve Flow Logs # noqa: E501 Retrieve the properties of the specified Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_find_by_id_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'flowlog_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_find_by_id`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_find_by_id`") # noqa: E501 # verify the required parameter 'flowlog_id' is set if self.api_client.client_side_validation and ('flowlog_id' not in local_var_params or # noqa: E501 local_var_params['flowlog_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog_id` when calling `datacenters_servers_nics_flowlogs_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'flowlog_id' in local_var_params: path_params['flowlogId'] = local_var_params['flowlog_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_flowlogs_get(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """List Flow Logs # noqa: E501 List all the Flow Logs for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_get(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLogs """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_get_with_http_info(datacenter_id, server_id, nic_id, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_get_with_http_info(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """List Flow Logs # noqa: E501 List all the Flow Logs for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_get_with_http_info(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLogs, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'pretty', 'depth', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_get`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_nics_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_flowlogs_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_flowlogs_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLogs' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_flowlogs_patch(self, datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs): # noqa: E501 """Partially modify Flow Logs # noqa: E501 Update the specified Flow Log record. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_patch(datacenter_id, server_id, nic_id, flowlog_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param flowlog: The Flow Log record to be updated. (required) :type flowlog: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_patch_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_patch_with_http_info(self, datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs): # noqa: E501 """Partially modify Flow Logs # noqa: E501 Update the specified Flow Log record. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_patch_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param flowlog: The Flow Log record to be updated. (required) :type flowlog: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'flowlog_id', 'flowlog', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_patch`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_patch`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_patch`") # noqa: E501 # verify the required parameter 'flowlog_id' is set if self.api_client.client_side_validation and ('flowlog_id' not in local_var_params or # noqa: E501 local_var_params['flowlog_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog_id` when calling `datacenters_servers_nics_flowlogs_patch`") # noqa: E501 # verify the required parameter 'flowlog' is set if self.api_client.client_side_validation and ('flowlog' not in local_var_params or # noqa: E501 local_var_params['flowlog'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog` when calling `datacenters_servers_nics_flowlogs_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'flowlog_id' in local_var_params: path_params['flowlogId'] = local_var_params['flowlog_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'flowlog' in local_var_params: body_params = local_var_params['flowlog'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_flowlogs_post(self, datacenter_id, server_id, nic_id, flowlog, **kwargs): # noqa: E501 """Create a Flow Log # noqa: E501 Adds a new Flow Log for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_post(datacenter_id, server_id, nic_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog: The Flow Log to create. (required) :type flowlog: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_post_with_http_info(datacenter_id, server_id, nic_id, flowlog, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_post_with_http_info(self, datacenter_id, server_id, nic_id, flowlog, **kwargs): # noqa: E501 """Create a Flow Log # noqa: E501 Adds a new Flow Log for the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_post_with_http_info(datacenter_id, server_id, nic_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog: The Flow Log to create. (required) :type flowlog: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'flowlog', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_post`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_post`") # noqa: E501 # verify the required parameter 'flowlog' is set if self.api_client.client_side_validation and ('flowlog' not in local_var_params or # noqa: E501 local_var_params['flowlog'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog` when calling `datacenters_servers_nics_flowlogs_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'flowlog' in local_var_params: body_params = local_var_params['flowlog'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_flowlogs_put(self, datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs): # noqa: E501 """Modify Flow Logs # noqa: E501 Modify the specified Flow Log record. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_put(datacenter_id, server_id, nic_id, flowlog_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param flowlog: The modified Flow Log. (required) :type flowlog: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_flowlogs_put_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs) # noqa: E501 def datacenters_servers_nics_flowlogs_put_with_http_info(self, datacenter_id, server_id, nic_id, flowlog_id, flowlog, **kwargs): # noqa: E501 """Modify Flow Logs # noqa: E501 Modify the specified Flow Log record. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_flowlogs_put_with_http_info(datacenter_id, server_id, nic_id, flowlog_id, flowlog, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param flowlog_id: The unique ID of the Flow Log. (required) :type flowlog_id: str :param flowlog: The modified Flow Log. (required) :type flowlog: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'flowlog_id', 'flowlog', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_flowlogs_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_flowlogs_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_flowlogs_put`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_flowlogs_put`") # noqa: E501 # verify the required parameter 'flowlog_id' is set if self.api_client.client_side_validation and ('flowlog_id' not in local_var_params or # noqa: E501 local_var_params['flowlog_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog_id` when calling `datacenters_servers_nics_flowlogs_put`") # noqa: E501 # verify the required parameter 'flowlog' is set if self.api_client.client_side_validation and ('flowlog' not in local_var_params or # noqa: E501 local_var_params['flowlog'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flowlog` when calling `datacenters_servers_nics_flowlogs_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_flowlogs_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 if 'flowlog_id' in local_var_params: path_params['flowlogId'] = local_var_params['flowlog_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'flowlog' in local_var_params: body_params = local_var_params['flowlog'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/images_api.py0000644000175100001660000013155415046550312020774 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class ImagesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def images_delete(self, image_id, **kwargs): # noqa: E501 """Delete images # noqa: E501 Delete the specified image; this operation is only supported for private images. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_delete(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.images_delete_with_http_info(image_id, **kwargs) # noqa: E501 def images_delete_with_http_info(self, image_id, **kwargs): # noqa: E501 """Delete images # noqa: E501 Delete the specified image; this operation is only supported for private images. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_delete_with_http_info(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'image_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_find_by_id(self, image_id, **kwargs): # noqa: E501 """Retrieve images # noqa: E501 Retrieve the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_find_by_id(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Image """ kwargs['_return_http_data_only'] = True return self.images_find_by_id_with_http_info(image_id, **kwargs) # noqa: E501 def images_find_by_id_with_http_info(self, image_id, **kwargs): # noqa: E501 """Retrieve images # noqa: E501 Retrieve the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_find_by_id_with_http_info(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Image' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_get(self, **kwargs): # noqa: E501 """List images # noqa: E501 List all the images in the current contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Images """ kwargs['_return_http_data_only'] = True return self.images_get_with_http_info(**kwargs) # noqa: E501 def images_get_with_http_info(self, **kwargs): # noqa: E501 """List images # noqa: E501 List all the images in the current contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Images, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Images' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_patch(self, image_id, image, **kwargs): # noqa: E501 """Partially modify images # noqa: E501 Update the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_patch(image_id, image, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param image: The image properties to be updated. (required) :type image: ImageProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Image """ kwargs['_return_http_data_only'] = True return self.images_patch_with_http_info(image_id, image, **kwargs) # noqa: E501 def images_patch_with_http_info(self, image_id, image, **kwargs): # noqa: E501 """Partially modify images # noqa: E501 Update the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_patch_with_http_info(image_id, image, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param image: The image properties to be updated. (required) :type image: ImageProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'image', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_patch`") # noqa: E501 # verify the required parameter 'image' is set if self.api_client.client_side_validation and ('image' not in local_var_params or # noqa: E501 local_var_params['image'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image` when calling `images_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'image' in local_var_params: body_params = local_var_params['image'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Image' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_put(self, image_id, image, **kwargs): # noqa: E501 """Modify an Image by ID # noqa: E501 Modifies the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_put(image_id, image, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param image: The modified image (required) :type image: Image :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Image """ kwargs['_return_http_data_only'] = True return self.images_put_with_http_info(image_id, image, **kwargs) # noqa: E501 def images_put_with_http_info(self, image_id, image, **kwargs): # noqa: E501 """Modify an Image by ID # noqa: E501 Modifies the properties of the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_put_with_http_info(image_id, image, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param image: The modified image (required) :type image: Image :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'image', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_put`") # noqa: E501 # verify the required parameter 'image' is set if self.api_client.client_side_validation and ('image' not in local_var_params or # noqa: E501 local_var_params['image'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image` when calling `images_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'image' in local_var_params: body_params = local_var_params['image'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Image' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/ip_blocks_api.py0000644000175100001660000015755115046550312021501 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class IPBlocksApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def ipblocks_delete(self, ipblock_id, **kwargs): # noqa: E501 """Delete IP blocks # noqa: E501 Remove the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_delete(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.ipblocks_delete_with_http_info(ipblock_id, **kwargs) # noqa: E501 def ipblocks_delete_with_http_info(self, ipblock_id, **kwargs): # noqa: E501 """Delete IP blocks # noqa: E501 Remove the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_delete_with_http_info(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'ipblock_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_find_by_id(self, ipblock_id, **kwargs): # noqa: E501 """Retrieve IP blocks # noqa: E501 Retrieve the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_find_by_id(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: IpBlock """ kwargs['_return_http_data_only'] = True return self.ipblocks_find_by_id_with_http_info(ipblock_id, **kwargs) # noqa: E501 def ipblocks_find_by_id_with_http_info(self, ipblock_id, **kwargs): # noqa: E501 """Retrieve IP blocks # noqa: E501 Retrieve the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_find_by_id_with_http_info(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(IpBlock, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'IpBlock' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_get(self, **kwargs): # noqa: E501 """List IP blocks # noqa: E501 List all reserved IP blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: IpBlocks """ kwargs['_return_http_data_only'] = True return self.ipblocks_get_with_http_info(**kwargs) # noqa: E501 def ipblocks_get_with_http_info(self, **kwargs): # noqa: E501 """List IP blocks # noqa: E501 List all reserved IP blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(IpBlocks, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `ipblocks_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `ipblocks_get`, must be a value less than or equal to `1000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `ipblocks_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'IpBlocks' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_patch(self, ipblock_id, ipblock, **kwargs): # noqa: E501 """Partially modify IP blocks # noqa: E501 Update the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_patch(ipblock_id, ipblock, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param ipblock: The properties of the IP block to be updated. (required) :type ipblock: IpBlockProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: IpBlock """ kwargs['_return_http_data_only'] = True return self.ipblocks_patch_with_http_info(ipblock_id, ipblock, **kwargs) # noqa: E501 def ipblocks_patch_with_http_info(self, ipblock_id, ipblock, **kwargs): # noqa: E501 """Partially modify IP blocks # noqa: E501 Update the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_patch_with_http_info(ipblock_id, ipblock, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param ipblock: The properties of the IP block to be updated. (required) :type ipblock: IpBlockProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(IpBlock, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'ipblock', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_patch`") # noqa: E501 # verify the required parameter 'ipblock' is set if self.api_client.client_side_validation and ('ipblock' not in local_var_params or # noqa: E501 local_var_params['ipblock'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock` when calling `ipblocks_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'ipblock' in local_var_params: body_params = local_var_params['ipblock'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'IpBlock' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_post(self, ipblock, **kwargs): # noqa: E501 """Reserve a IP Block # noqa: E501 Reserves a new IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_post(ipblock, async_req=True) >>> result = thread.get() :param ipblock: The IP block to be reserved. (required) :type ipblock: IpBlock :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: IpBlock """ kwargs['_return_http_data_only'] = True return self.ipblocks_post_with_http_info(ipblock, **kwargs) # noqa: E501 def ipblocks_post_with_http_info(self, ipblock, **kwargs): # noqa: E501 """Reserve a IP Block # noqa: E501 Reserves a new IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_post_with_http_info(ipblock, async_req=True) >>> result = thread.get() :param ipblock: The IP block to be reserved. (required) :type ipblock: IpBlock :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(IpBlock, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock' is set if self.api_client.client_side_validation and ('ipblock' not in local_var_params or # noqa: E501 local_var_params['ipblock'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock` when calling `ipblocks_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'ipblock' in local_var_params: body_params = local_var_params['ipblock'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'IpBlock' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_put(self, ipblock_id, ipblock, **kwargs): # noqa: E501 """Modify a IP Block by ID # noqa: E501 Modifies the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_put(ipblock_id, ipblock, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param ipblock: The modified IP block. (required) :type ipblock: IpBlock :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: IpBlock """ kwargs['_return_http_data_only'] = True return self.ipblocks_put_with_http_info(ipblock_id, ipblock, **kwargs) # noqa: E501 def ipblocks_put_with_http_info(self, ipblock_id, ipblock, **kwargs): # noqa: E501 """Modify a IP Block by ID # noqa: E501 Modifies the properties of the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_put_with_http_info(ipblock_id, ipblock, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param ipblock: The modified IP block. (required) :type ipblock: IpBlock :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(IpBlock, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'ipblock', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_put`") # noqa: E501 # verify the required parameter 'ipblock' is set if self.api_client.client_side_validation and ('ipblock' not in local_var_params or # noqa: E501 local_var_params['ipblock'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock` when calling `ipblocks_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'ipblock' in local_var_params: body_params = local_var_params['ipblock'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'IpBlock' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/kubernetes_api.py0000644000175100001660000047204415046550312021700 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class KubernetesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def k8s_delete(self, k8s_cluster_id, **kwargs): # noqa: E501 """Delete a Kubernetes Cluster by ID # noqa: E501 Deletes the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_delete(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.k8s_delete_with_http_info(k8s_cluster_id, **kwargs) # noqa: E501 def k8s_delete_with_http_info(self, k8s_cluster_id, **kwargs): # noqa: E501 """Delete a Kubernetes Cluster by ID # noqa: E501 Deletes the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_delete_with_http_info(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_find_by_cluster_id(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get a Kubernetes Cluster by ID # noqa: E501 Retrieves the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_find_by_cluster_id(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the K8s cluster to be retrieved. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesCluster """ kwargs['_return_http_data_only'] = True return self.k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, **kwargs) # noqa: E501 def k8s_find_by_cluster_id_with_http_info(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get a Kubernetes Cluster by ID # noqa: E501 Retrieves the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the K8s cluster to be retrieved. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesCluster, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_find_by_cluster_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_find_by_cluster_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_find_by_cluster_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_find_by_cluster_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesCluster' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_get(self, **kwargs): # noqa: E501 """Get Kubernetes Clusters # noqa: E501 Retrieves a list of all K8s clusters provisioned under your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesClusters """ kwargs['_return_http_data_only'] = True return self.k8s_get_with_http_info(**kwargs) # noqa: E501 def k8s_get_with_http_info(self, **kwargs): # noqa: E501 """Get Kubernetes Clusters # noqa: E501 Retrieves a list of all K8s clusters provisioned under your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesClusters, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesClusters' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_kubeconfig_get(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get Kubernetes Configuration File # noqa: E501 Retrieves the configuration file for the specified K8s cluster. You can define the format (YAML or JSON) of the returned file in the Accept header. By default, 'application/yaml' is specified. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_kubeconfig_get(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: str """ kwargs['_return_http_data_only'] = True return self.k8s_kubeconfig_get_with_http_info(k8s_cluster_id, **kwargs) # noqa: E501 def k8s_kubeconfig_get_with_http_info(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get Kubernetes Configuration File # noqa: E501 Retrieves the configuration file for the specified K8s cluster. You can define the format (YAML or JSON) of the returned file in the Accept header. By default, 'application/yaml' is specified. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_kubeconfig_get_with_http_info(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_kubeconfig_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_kubeconfig_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_kubeconfig_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_kubeconfig_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/yaml', 'application/x-yaml', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'str' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/kubeconfig', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_delete(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Delete a Kubernetes Node Pool by ID # noqa: E501 Deletes the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_delete(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, **kwargs) # noqa: E501 def k8s_nodepools_delete_with_http_info(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Delete a Kubernetes Node Pool by ID # noqa: E501 Deletes the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_delete`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_find_by_id(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Get a Kubernetes Node Pool by ID # noqa: E501 Retrieves the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNodePool """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, **kwargs) # noqa: E501 def k8s_nodepools_find_by_id_with_http_info(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Get a Kubernetes Node Pool by ID # noqa: E501 Retrieves the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNodePool, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_find_by_id`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNodePool' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_get(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get Kubernetes Node Pools # noqa: E501 Retrieves a list of K8s node pools of a cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_get(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNodePools """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_get_with_http_info(k8s_cluster_id, **kwargs) # noqa: E501 def k8s_nodepools_get_with_http_info(self, k8s_cluster_id, **kwargs): # noqa: E501 """Get Kubernetes Node Pools # noqa: E501 Retrieves a list of K8s node pools of a cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_get_with_http_info(k8s_cluster_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNodePools, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNodePools' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_nodes_delete(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Delete a Kubernetes Node by ID # noqa: E501 Deletes the K8s node specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, **kwargs) # noqa: E501 def k8s_nodepools_nodes_delete_with_http_info(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Delete a Kubernetes Node by ID # noqa: E501 Deletes the K8s node specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'node_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_nodes_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_nodes_delete`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_nodes_delete`") # noqa: E501 # verify the required parameter 'node_id' is set if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 local_var_params['node_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `node_id` when calling `k8s_nodepools_nodes_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 if 'node_id' in local_var_params: path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_nodes_find_by_id(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Get Kubernetes Node by ID # noqa: E501 Retrieves the K8s node specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNode """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, **kwargs) # noqa: E501 def k8s_nodepools_nodes_find_by_id_with_http_info(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Get Kubernetes Node by ID # noqa: E501 Retrieves the K8s node specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'node_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_nodes_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_nodes_find_by_id`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_nodes_find_by_id`") # noqa: E501 # verify the required parameter 'node_id' is set if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 local_var_params['node_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `node_id` when calling `k8s_nodepools_nodes_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 if 'node_id' in local_var_params: path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNode' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_nodes_get(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Get Kubernetes Nodes # noqa: E501 Retrieves the list of all K8s nodes of the specified node pool. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNodes """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, **kwargs) # noqa: E501 def k8s_nodepools_nodes_get_with_http_info(self, k8s_cluster_id, nodepool_id, **kwargs): # noqa: E501 """Get Kubernetes Nodes # noqa: E501 Retrieves the list of all K8s nodes of the specified node pool. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNodes, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_nodes_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_nodes_get`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_nodes_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNodes' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_nodes_replace_post(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Recreate a Kubernetes Node by ID # noqa: E501 Recreates the K8s node specified by its ID. If a node becomes unusable, Managed Kubernetes allows you to recreate it with a configuration based on the node pool template. Once the status is 'Active,' all the pods from the failed node will be migrated to the new node. The node pool has an additional billable 'active' node during this process. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, **kwargs) # noqa: E501 def k8s_nodepools_nodes_replace_post_with_http_info(self, k8s_cluster_id, nodepool_id, node_id, **kwargs): # noqa: E501 """Recreate a Kubernetes Node by ID # noqa: E501 Recreates the K8s node specified by its ID. If a node becomes unusable, Managed Kubernetes allows you to recreate it with a configuration based on the node pool template. Once the status is 'Active,' all the pods from the failed node will be migrated to the new node. The node pool has an additional billable 'active' node during this process. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param node_id: The unique ID of the Kubernetes node. (required) :type node_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'node_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_nodes_replace_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_nodes_replace_post`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_nodes_replace_post`") # noqa: E501 # verify the required parameter 'node_id' is set if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 local_var_params['node_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `node_id` when calling `k8s_nodepools_nodes_replace_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_replace_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_nodes_replace_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 if 'node_id' in local_var_params: path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_post(self, k8s_cluster_id, kubernetes_node_pool, **kwargs): # noqa: E501 """Create a Kubernetes Node Pool # noqa: E501 Creates a node pool inside the specified K8s cluster. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param kubernetes_node_pool: The Kubernetes node pool to create. (required) :type kubernetes_node_pool: KubernetesNodePoolForPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNodePool """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, **kwargs) # noqa: E501 def k8s_nodepools_post_with_http_info(self, k8s_cluster_id, kubernetes_node_pool, **kwargs): # noqa: E501 """Create a Kubernetes Node Pool # noqa: E501 Creates a node pool inside the specified K8s cluster. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param kubernetes_node_pool: The Kubernetes node pool to create. (required) :type kubernetes_node_pool: KubernetesNodePoolForPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNodePool, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'kubernetes_node_pool', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_post`") # noqa: E501 # verify the required parameter 'kubernetes_node_pool' is set if self.api_client.client_side_validation and ('kubernetes_node_pool' not in local_var_params or # noqa: E501 local_var_params['kubernetes_node_pool'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `kubernetes_node_pool` when calling `k8s_nodepools_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'kubernetes_node_pool' in local_var_params: body_params = local_var_params['kubernetes_node_pool'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNodePool' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_nodepools_put(self, k8s_cluster_id, nodepool_id, kubernetes_node_pool, **kwargs): # noqa: E501 """Modify a Kubernetes Node Pool by ID # noqa: E501 Modifies the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param kubernetes_node_pool: Details of the Kubernetes Node Pool (required) :type kubernetes_node_pool: KubernetesNodePoolForPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesNodePool """ kwargs['_return_http_data_only'] = True return self.k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, **kwargs) # noqa: E501 def k8s_nodepools_put_with_http_info(self, k8s_cluster_id, nodepool_id, kubernetes_node_pool, **kwargs): # noqa: E501 """Modify a Kubernetes Node Pool by ID # noqa: E501 Modifies the K8s node pool specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param nodepool_id: The unique ID of the Kubernetes node pool. (required) :type nodepool_id: str :param kubernetes_node_pool: Details of the Kubernetes Node Pool (required) :type kubernetes_node_pool: KubernetesNodePoolForPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesNodePool, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'nodepool_id', 'kubernetes_node_pool', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_nodepools_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_nodepools_put`") # noqa: E501 # verify the required parameter 'nodepool_id' is set if self.api_client.client_side_validation and ('nodepool_id' not in local_var_params or # noqa: E501 local_var_params['nodepool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nodepool_id` when calling `k8s_nodepools_put`") # noqa: E501 # verify the required parameter 'kubernetes_node_pool' is set if self.api_client.client_side_validation and ('kubernetes_node_pool' not in local_var_params or # noqa: E501 local_var_params['kubernetes_node_pool'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `kubernetes_node_pool` when calling `k8s_nodepools_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_nodepools_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 if 'nodepool_id' in local_var_params: path_params['nodepoolId'] = local_var_params['nodepool_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'kubernetes_node_pool' in local_var_params: body_params = local_var_params['kubernetes_node_pool'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesNodePool' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}/nodepools/{nodepoolId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_post(self, kubernetes_cluster, **kwargs): # noqa: E501 """Create a Kubernetes Cluster # noqa: E501 Creates a K8s cluster provisioned under your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_post(kubernetes_cluster, async_req=True) >>> result = thread.get() :param kubernetes_cluster: The Kubernetes cluster to create. (required) :type kubernetes_cluster: KubernetesClusterForPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesCluster """ kwargs['_return_http_data_only'] = True return self.k8s_post_with_http_info(kubernetes_cluster, **kwargs) # noqa: E501 def k8s_post_with_http_info(self, kubernetes_cluster, **kwargs): # noqa: E501 """Create a Kubernetes Cluster # noqa: E501 Creates a K8s cluster provisioned under your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_post_with_http_info(kubernetes_cluster, async_req=True) >>> result = thread.get() :param kubernetes_cluster: The Kubernetes cluster to create. (required) :type kubernetes_cluster: KubernetesClusterForPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesCluster, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'kubernetes_cluster', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'kubernetes_cluster' is set if self.api_client.client_side_validation and ('kubernetes_cluster' not in local_var_params or # noqa: E501 local_var_params['kubernetes_cluster'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `kubernetes_cluster` when calling `k8s_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'kubernetes_cluster' in local_var_params: body_params = local_var_params['kubernetes_cluster'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesCluster' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_put(self, k8s_cluster_id, kubernetes_cluster, **kwargs): # noqa: E501 """Modify a Kubernetes Cluster by ID # noqa: E501 Modifies the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_put(k8s_cluster_id, kubernetes_cluster, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param kubernetes_cluster: The modified Kubernetes cluster. (required) :type kubernetes_cluster: KubernetesClusterForPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: KubernetesCluster """ kwargs['_return_http_data_only'] = True return self.k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, **kwargs) # noqa: E501 def k8s_put_with_http_info(self, k8s_cluster_id, kubernetes_cluster, **kwargs): # noqa: E501 """Modify a Kubernetes Cluster by ID # noqa: E501 Modifies the K8s cluster specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, async_req=True) >>> result = thread.get() :param k8s_cluster_id: The unique ID of the Kubernetes cluster. (required) :type k8s_cluster_id: str :param kubernetes_cluster: The modified Kubernetes cluster. (required) :type kubernetes_cluster: KubernetesClusterForPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(KubernetesCluster, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'k8s_cluster_id', 'kubernetes_cluster', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'k8s_cluster_id' is set if self.api_client.client_side_validation and ('k8s_cluster_id' not in local_var_params or # noqa: E501 local_var_params['k8s_cluster_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `k8s_cluster_id` when calling `k8s_put`") # noqa: E501 # verify the required parameter 'kubernetes_cluster' is set if self.api_client.client_side_validation and ('kubernetes_cluster' not in local_var_params or # noqa: E501 local_var_params['kubernetes_cluster'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `kubernetes_cluster` when calling `k8s_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `k8s_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'k8s_cluster_id' in local_var_params: path_params['k8sClusterId'] = local_var_params['k8s_cluster_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'kubernetes_cluster' in local_var_params: body_params = local_var_params['kubernetes_cluster'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'KubernetesCluster' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/{k8sClusterId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_versions_default_get(self, **kwargs): # noqa: E501 """Get Default Kubernetes Version # noqa: E501 Retrieves the current default K8s version to be used by the clusters and node pools. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_versions_default_get(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: str """ kwargs['_return_http_data_only'] = True return self.k8s_versions_default_get_with_http_info(**kwargs) # noqa: E501 def k8s_versions_default_get_with_http_info(self, **kwargs): # noqa: E501 """Get Default Kubernetes Version # noqa: E501 Retrieves the current default K8s version to be used by the clusters and node pools. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_versions_default_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_versions_default_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'str' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/versions/default', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def k8s_versions_get(self, **kwargs): # noqa: E501 """Get Kubernetes Versions # noqa: E501 Lists available K8s versions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_versions_get(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: list[str] """ kwargs['_return_http_data_only'] = True return self.k8s_versions_get_with_http_info(**kwargs) # noqa: E501 def k8s_versions_get_with_http_info(self, **kwargs): # noqa: E501 """Get Kubernetes Versions # noqa: E501 Lists available K8s versions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.k8s_versions_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method k8s_versions_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'list[str]' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/k8s/versions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/labels_api.py0000644000175100001660000116617515046550312021001 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class LabelsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_labels_delete(self, datacenter_id, key, **kwargs): # noqa: E501 """Delete data center labels # noqa: E501 Delete the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_delete(datacenter_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_labels_delete_with_http_info(datacenter_id, key, **kwargs) # noqa: E501 def datacenters_labels_delete_with_http_info(self, datacenter_id, key, **kwargs): # noqa: E501 """Delete data center labels # noqa: E501 Delete the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_delete_with_http_info(datacenter_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_labels_find_by_key(self, datacenter_id, key, **kwargs): # noqa: E501 """Retrieve data center labels # noqa: E501 Retrieve the properties of the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_find_by_key(datacenter_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_labels_find_by_key_with_http_info(datacenter_id, key, **kwargs) # noqa: E501 def datacenters_labels_find_by_key_with_http_info(self, datacenter_id, key, **kwargs): # noqa: E501 """Retrieve data center labels # noqa: E501 Retrieve the properties of the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_find_by_key_with_http_info(datacenter_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_labels_get(self, datacenter_id, **kwargs): # noqa: E501 """List data center labels # noqa: E501 List all the the labels for the specified data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.datacenters_labels_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_labels_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List data center labels # noqa: E501 List all the the labels for the specified data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_labels_post(self, datacenter_id, label, **kwargs): # noqa: E501 """Create a Data Center Label # noqa: E501 Adds a new label to the specified data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_post(datacenter_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_labels_post_with_http_info(datacenter_id, label, **kwargs) # noqa: E501 def datacenters_labels_post_with_http_info(self, datacenter_id, label, **kwargs): # noqa: E501 """Create a Data Center Label # noqa: E501 Adds a new label to the specified data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_post_with_http_info(datacenter_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_labels_put(self, datacenter_id, key, label, **kwargs): # noqa: E501 """Modify a Data Center Label by Key # noqa: E501 Modifies the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_put(datacenter_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_labels_put_with_http_info(datacenter_id, key, label, **kwargs) # noqa: E501 def datacenters_labels_put_with_http_info(self, datacenter_id, key, label, **kwargs): # noqa: E501 """Modify a Data Center Label by Key # noqa: E501 Modifies the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_labels_put_with_http_info(datacenter_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_labels_delete(self, datacenter_id, server_id, key, **kwargs): # noqa: E501 """Delete server labels # noqa: E501 Delete the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_delete(datacenter_id, server_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, **kwargs) # noqa: E501 def datacenters_servers_labels_delete_with_http_info(self, datacenter_id, server_id, key, **kwargs): # noqa: E501 """Delete server labels # noqa: E501 Delete the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_labels_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_servers_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_labels_find_by_key(self, datacenter_id, server_id, key, **kwargs): # noqa: E501 """Retrieve server labels # noqa: E501 Retrieve the properties of the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, **kwargs) # noqa: E501 def datacenters_servers_labels_find_by_key_with_http_info(self, datacenter_id, server_id, key, **kwargs): # noqa: E501 """Retrieve server labels # noqa: E501 Retrieve the properties of the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_labels_find_by_key`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_servers_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_labels_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """List server labels # noqa: E501 List all the the labels for the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_labels_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """List server labels # noqa: E501 List all the the labels for the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_labels_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_labels_post(self, datacenter_id, server_id, label, **kwargs): # noqa: E501 """Create a Server Label # noqa: E501 Adds a new label to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_post(datacenter_id, server_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, **kwargs) # noqa: E501 def datacenters_servers_labels_post_with_http_info(self, datacenter_id, server_id, label, **kwargs): # noqa: E501 """Create a Server Label # noqa: E501 Adds a new label to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_labels_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_servers_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_labels_put(self, datacenter_id, server_id, key, label, **kwargs): # noqa: E501 """Modify a Server Label # noqa: E501 Modifies the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_put(datacenter_id, server_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, **kwargs) # noqa: E501 def datacenters_servers_labels_put_with_http_info(self, datacenter_id, server_id, key, label, **kwargs): # noqa: E501 """Modify a Server Label # noqa: E501 Modifies the specified server label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_labels_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_servers_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_servers_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_labels_delete(self, datacenter_id, volume_id, key, **kwargs): # noqa: E501 """Delete volume labels # noqa: E501 Delete the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_delete(datacenter_id, volume_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, **kwargs) # noqa: E501 def datacenters_volumes_labels_delete_with_http_info(self, datacenter_id, volume_id, key, **kwargs): # noqa: E501 """Delete volume labels # noqa: E501 Delete the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_labels_delete`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_volumes_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_labels_find_by_key(self, datacenter_id, volume_id, key, **kwargs): # noqa: E501 """Retrieve volume labels # noqa: E501 Retrieve the properties of the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, **kwargs) # noqa: E501 def datacenters_volumes_labels_find_by_key_with_http_info(self, datacenter_id, volume_id, key, **kwargs): # noqa: E501 """Retrieve volume labels # noqa: E501 Retrieve the properties of the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_labels_find_by_key`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_volumes_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_labels_get(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """List volume labels # noqa: E501 List all the the labels for the specified volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_get(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, **kwargs) # noqa: E501 def datacenters_volumes_labels_get_with_http_info(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """List volume labels # noqa: E501 List all the the labels for the specified volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_labels_get`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_labels_post(self, datacenter_id, volume_id, label, **kwargs): # noqa: E501 """Create a Volume Label # noqa: E501 Adds a new label to the specified volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_post(datacenter_id, volume_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, **kwargs) # noqa: E501 def datacenters_volumes_labels_post_with_http_info(self, datacenter_id, volume_id, label, **kwargs): # noqa: E501 """Create a Volume Label # noqa: E501 Adds a new label to the specified volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_labels_post`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_volumes_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_labels_put(self, datacenter_id, volume_id, key, label, **kwargs): # noqa: E501 """Modify a Volume Label # noqa: E501 Modifies the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, **kwargs) # noqa: E501 def datacenters_volumes_labels_put_with_http_info(self, datacenter_id, volume_id, key, label, **kwargs): # noqa: E501 """Modify a Volume Label # noqa: E501 Modifies the specified volume label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_labels_put`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `datacenters_volumes_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `datacenters_volumes_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_labels_delete(self, image_id, key, **kwargs): # noqa: E501 """Delete image label # noqa: E501 Delete the specified image label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_delete(image_id, key, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.images_labels_delete_with_http_info(image_id, key, **kwargs) # noqa: E501 def images_labels_delete_with_http_info(self, image_id, key, **kwargs): # noqa: E501 """Delete image label # noqa: E501 Delete the specified image label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_delete_with_http_info(image_id, key, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'image_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `images_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_labels_find_by_key(self, image_id, key, **kwargs): # noqa: E501 """Retrieve image labels # noqa: E501 Retrieve the properties of the specified image label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_find_by_key(image_id, key, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.images_labels_find_by_key_with_http_info(image_id, key, **kwargs) # noqa: E501 def images_labels_find_by_key_with_http_info(self, image_id, key, **kwargs): # noqa: E501 """Retrieve image labels # noqa: E501 Retrieve the properties of the specified image label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_find_by_key_with_http_info(image_id, key, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `images_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_labels_get(self, image_id, **kwargs): # noqa: E501 """List image labels # noqa: E501 List all the the labels for the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_get(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.images_labels_get_with_http_info(image_id, **kwargs) # noqa: E501 def images_labels_get_with_http_info(self, image_id, **kwargs): # noqa: E501 """List image labels # noqa: E501 List all the the labels for the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_get_with_http_info(image_id, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_labels_post(self, image_id, label, **kwargs): # noqa: E501 """Create an Image Label # noqa: E501 Adds a new label to the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_post(image_id, label, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image (required) :type image_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.images_labels_post_with_http_info(image_id, label, **kwargs) # noqa: E501 def images_labels_post_with_http_info(self, image_id, label, **kwargs): # noqa: E501 """Create an Image Label # noqa: E501 Adds a new label to the specified image. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_post_with_http_info(image_id, label, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image (required) :type image_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `images_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def images_labels_put(self, image_id, key, label, **kwargs): # noqa: E501 """Modify an Image Label by Key # noqa: E501 Modifies the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_put(image_id, key, label, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.images_labels_put_with_http_info(image_id, key, label, **kwargs) # noqa: E501 def images_labels_put_with_http_info(self, image_id, key, label, **kwargs): # noqa: E501 """Modify an Image Label by Key # noqa: E501 Modifies the specified data center label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.images_labels_put_with_http_info(image_id, key, label, async_req=True) >>> result = thread.get() :param image_id: The unique ID of the image. (required) :type image_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'image_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method images_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'image_id' is set if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 local_var_params['image_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `image_id` when calling `images_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `images_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `images_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `images_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'image_id' in local_var_params: path_params['imageId'] = local_var_params['image_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/images/{imageId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_labels_delete(self, ipblock_id, key, **kwargs): # noqa: E501 """Delete IP block labels # noqa: E501 Delete the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_delete(ipblock_id, key, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.ipblocks_labels_delete_with_http_info(ipblock_id, key, **kwargs) # noqa: E501 def ipblocks_labels_delete_with_http_info(self, ipblock_id, key, **kwargs): # noqa: E501 """Delete IP block labels # noqa: E501 Delete the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_delete_with_http_info(ipblock_id, key, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'ipblock_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `ipblocks_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_labels_find_by_key(self, ipblock_id, key, **kwargs): # noqa: E501 """Retrieve IP block labels # noqa: E501 Retrieve the properties of the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_find_by_key(ipblock_id, key, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, **kwargs) # noqa: E501 def ipblocks_labels_find_by_key_with_http_info(self, ipblock_id, key, **kwargs): # noqa: E501 """Retrieve IP block labels # noqa: E501 Retrieve the properties of the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `ipblocks_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_labels_get(self, ipblock_id, **kwargs): # noqa: E501 """List IP block labels # noqa: E501 List all the the labels for the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_get(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.ipblocks_labels_get_with_http_info(ipblock_id, **kwargs) # noqa: E501 def ipblocks_labels_get_with_http_info(self, ipblock_id, **kwargs): # noqa: E501 """List IP block labels # noqa: E501 List all the the labels for the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_get_with_http_info(ipblock_id, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_labels_post(self, ipblock_id, label, **kwargs): # noqa: E501 """Create IP block labels # noqa: E501 Add a new label to the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_post(ipblock_id, label, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.ipblocks_labels_post_with_http_info(ipblock_id, label, **kwargs) # noqa: E501 def ipblocks_labels_post_with_http_info(self, ipblock_id, label, **kwargs): # noqa: E501 """Create IP block labels # noqa: E501 Add a new label to the specified IP block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_post_with_http_info(ipblock_id, label, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `ipblocks_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def ipblocks_labels_put(self, ipblock_id, key, label, **kwargs): # noqa: E501 """Modify a IP Block Label by ID # noqa: E501 Modifies the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_put(ipblock_id, key, label, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.ipblocks_labels_put_with_http_info(ipblock_id, key, label, **kwargs) # noqa: E501 def ipblocks_labels_put_with_http_info(self, ipblock_id, key, label, **kwargs): # noqa: E501 """Modify a IP Block Label by ID # noqa: E501 Modifies the specified IP block label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ipblocks_labels_put_with_http_info(ipblock_id, key, label, async_req=True) >>> result = thread.get() :param ipblock_id: The unique ID of the IP block. (required) :type ipblock_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'ipblock_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ipblocks_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'ipblock_id' is set if self.api_client.client_side_validation and ('ipblock_id' not in local_var_params or # noqa: E501 local_var_params['ipblock_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ipblock_id` when calling `ipblocks_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `ipblocks_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `ipblocks_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `ipblocks_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'ipblock_id' in local_var_params: path_params['ipblockId'] = local_var_params['ipblock_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/ipblocks/{ipblockId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def labels_find_by_urn(self, labelurn, **kwargs): # noqa: E501 """Retrieve labels by URN # noqa: E501 Retrieve a label by label URN. The URN is unique for each label, and consists of: urn:label::: # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.labels_find_by_urn(labelurn, async_req=True) >>> result = thread.get() :param labelurn: The label URN; URN is unique for each label, and consists of: urn:label::: (required) :type labelurn: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Label """ kwargs['_return_http_data_only'] = True return self.labels_find_by_urn_with_http_info(labelurn, **kwargs) # noqa: E501 def labels_find_by_urn_with_http_info(self, labelurn, **kwargs): # noqa: E501 """Retrieve labels by URN # noqa: E501 Retrieve a label by label URN. The URN is unique for each label, and consists of: urn:label::: # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.labels_find_by_urn_with_http_info(labelurn, async_req=True) >>> result = thread.get() :param labelurn: The label URN; URN is unique for each label, and consists of: urn:label::: (required) :type labelurn: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Label, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'labelurn', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method labels_find_by_urn" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'labelurn' is set if self.api_client.client_side_validation and ('labelurn' not in local_var_params or # noqa: E501 local_var_params['labelurn'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `labelurn` when calling `labels_find_by_urn`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `labels_find_by_urn`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `labels_find_by_urn`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'labelurn' in local_var_params: path_params['labelurn'] = local_var_params['labelurn'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Label' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/labels/{labelurn}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def labels_get(self, **kwargs): # noqa: E501 """List labels # noqa: E501 List all available labels. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.labels_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Labels """ kwargs['_return_http_data_only'] = True return self.labels_get_with_http_info(**kwargs) # noqa: E501 def labels_get_with_http_info(self, **kwargs): # noqa: E501 """List labels # noqa: E501 List all available labels. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.labels_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Labels, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Labels' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_labels_delete(self, snapshot_id, key, **kwargs): # noqa: E501 """Delete snapshot labels # noqa: E501 Delete the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_delete(snapshot_id, key, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.snapshots_labels_delete_with_http_info(snapshot_id, key, **kwargs) # noqa: E501 def snapshots_labels_delete_with_http_info(self, snapshot_id, key, **kwargs): # noqa: E501 """Delete snapshot labels # noqa: E501 Delete the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_delete_with_http_info(snapshot_id, key, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'snapshot_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_labels_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_labels_delete`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `snapshots_labels_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}/labels/{key}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_labels_find_by_key(self, snapshot_id, key, **kwargs): # noqa: E501 """Retrieve snapshot labels # noqa: E501 Retrieve the properties of the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_find_by_key(snapshot_id, key, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.snapshots_labels_find_by_key_with_http_info(snapshot_id, key, **kwargs) # noqa: E501 def snapshots_labels_find_by_key_with_http_info(self, snapshot_id, key, **kwargs): # noqa: E501 """Retrieve snapshot labels # noqa: E501 Retrieve the properties of the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_find_by_key_with_http_info(snapshot_id, key, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_labels_find_by_key" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_labels_find_by_key`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `snapshots_labels_find_by_key`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_find_by_key`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_find_by_key`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}/labels/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_labels_get(self, snapshot_id, **kwargs): # noqa: E501 """List snapshot labels # noqa: E501 List all the the labels for the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_get(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResources """ kwargs['_return_http_data_only'] = True return self.snapshots_labels_get_with_http_info(snapshot_id, **kwargs) # noqa: E501 def snapshots_labels_get_with_http_info(self, snapshot_id, **kwargs): # noqa: E501 """List snapshot labels # noqa: E501 List all the the labels for the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_get_with_http_info(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_labels_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_labels_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_labels_post(self, snapshot_id, label, **kwargs): # noqa: E501 """Create a Snapshot Label # noqa: E501 Adds a new label to the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_post(snapshot_id, label, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.snapshots_labels_post_with_http_info(snapshot_id, label, **kwargs) # noqa: E501 def snapshots_labels_post_with_http_info(self, snapshot_id, label, **kwargs): # noqa: E501 """Create a Snapshot Label # noqa: E501 Adds a new label to the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_post_with_http_info(snapshot_id, label, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param label: The label to create. (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_labels_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_labels_post`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `snapshots_labels_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_labels_put(self, snapshot_id, key, label, **kwargs): # noqa: E501 """Modify a Snapshot Label by ID # noqa: E501 Modifies the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_put(snapshot_id, key, label, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LabelResource """ kwargs['_return_http_data_only'] = True return self.snapshots_labels_put_with_http_info(snapshot_id, key, label, **kwargs) # noqa: E501 def snapshots_labels_put_with_http_info(self, snapshot_id, key, label, **kwargs): # noqa: E501 """Modify a Snapshot Label by ID # noqa: E501 Modifies the specified snapshot label. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_labels_put_with_http_info(snapshot_id, key, label, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param key: The label key (required) :type key: str :param label: The modified label (required) :type label: LabelResource :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LabelResource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'key', 'label', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_labels_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_labels_put`") # noqa: E501 # verify the required parameter 'key' is set if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 local_var_params['key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key` when calling `snapshots_labels_put`") # noqa: E501 # verify the required parameter 'label' is set if self.api_client.client_side_validation and ('label' not in local_var_params or # noqa: E501 local_var_params['label'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `label` when calling `snapshots_labels_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_labels_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'label' in local_var_params: body_params = local_var_params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LabelResource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}/labels/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/lans_api.py0000644000175100001660000027325015046550312020464 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class LANsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_lans_delete(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """Delete LANs # noqa: E501 Delete the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_delete(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_delete_with_http_info(datacenter_id, lan_id, **kwargs) # noqa: E501 def datacenters_lans_delete_with_http_info(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """Delete LANs # noqa: E501 Delete the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_delete_with_http_info(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_delete`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_find_by_id(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """Retrieve LANs # noqa: E501 Retrieve the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_find_by_id(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Lan """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_find_by_id_with_http_info(datacenter_id, lan_id, **kwargs) # noqa: E501 def datacenters_lans_find_by_id_with_http_info(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """Retrieve LANs # noqa: E501 Retrieve the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_find_by_id_with_http_info(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Lan, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_find_by_id`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Lan' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_get(self, datacenter_id, **kwargs): # noqa: E501 """List LANs # noqa: E501 List all LANs within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Lans """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_lans_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List LANs # noqa: E501 List all LANs within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Lans, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_lans_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_lans_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_lans_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Lans' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_nics_find_by_id(self, datacenter_id, lan_id, nic_id, **kwargs): # noqa: E501 """Retrieve attached NICs # noqa: E501 Retrieve the properties of the NIC, attached to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_find_by_id(datacenter_id, lan_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_nics_find_by_id_with_http_info(datacenter_id, lan_id, nic_id, **kwargs) # noqa: E501 def datacenters_lans_nics_find_by_id_with_http_info(self, datacenter_id, lan_id, nic_id, **kwargs): # noqa: E501 """Retrieve attached NICs # noqa: E501 Retrieve the properties of the NIC, attached to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_find_by_id_with_http_info(datacenter_id, lan_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'nic_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_nics_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_nics_find_by_id`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_nics_find_by_id`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_lans_nics_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_nics_get(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """List LAN members # noqa: E501 List all NICs, attached to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_get(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: LanNics """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_nics_get_with_http_info(datacenter_id, lan_id, **kwargs) # noqa: E501 def datacenters_lans_nics_get_with_http_info(self, datacenter_id, lan_id, **kwargs): # noqa: E501 """List LAN members # noqa: E501 List all NICs, attached to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_get_with_http_info(datacenter_id, lan_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(LanNics, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_nics_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_nics_get`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_nics_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_lans_nics_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_lans_nics_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_lans_nics_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'LanNics' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}/nics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_nics_post(self, datacenter_id, lan_id, nic, **kwargs): # noqa: E501 """Attach NICs # noqa: E501 Attach an existing NIC to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_post(datacenter_id, lan_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param nic: The NIC to be attached. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_nics_post_with_http_info(datacenter_id, lan_id, nic, **kwargs) # noqa: E501 def datacenters_lans_nics_post_with_http_info(self, datacenter_id, lan_id, nic, **kwargs): # noqa: E501 """Attach NICs # noqa: E501 Attach an existing NIC to the specified LAN. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_nics_post_with_http_info(datacenter_id, lan_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param nic: The NIC to be attached. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'nic', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_nics_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_nics_post`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_nics_post`") # noqa: E501 # verify the required parameter 'nic' is set if self.api_client.client_side_validation and ('nic' not in local_var_params or # noqa: E501 local_var_params['nic'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic` when calling `datacenters_lans_nics_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_nics_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nic' in local_var_params: body_params = local_var_params['nic'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}/nics', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_patch(self, datacenter_id, lan_id, lan, **kwargs): # noqa: E501 """Partially modify LANs # noqa: E501 Update the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_patch(datacenter_id, lan_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param lan: The properties of the LAN to be updated. (required) :type lan: LanProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Lan """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_patch_with_http_info(datacenter_id, lan_id, lan, **kwargs) # noqa: E501 def datacenters_lans_patch_with_http_info(self, datacenter_id, lan_id, lan, **kwargs): # noqa: E501 """Partially modify LANs # noqa: E501 Update the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_patch_with_http_info(datacenter_id, lan_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param lan: The properties of the LAN to be updated. (required) :type lan: LanProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Lan, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'lan', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_patch`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_patch`") # noqa: E501 # verify the required parameter 'lan' is set if self.api_client.client_side_validation and ('lan' not in local_var_params or # noqa: E501 local_var_params['lan'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan` when calling `datacenters_lans_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'lan' in local_var_params: body_params = local_var_params['lan'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Lan' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_post(self, datacenter_id, lan, **kwargs): # noqa: E501 """Create LANs # noqa: E501 Creates a LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_post(datacenter_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan: The LAN to create. (required) :type lan: Lan :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Lan """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_post_with_http_info(datacenter_id, lan, **kwargs) # noqa: E501 def datacenters_lans_post_with_http_info(self, datacenter_id, lan, **kwargs): # noqa: E501 """Create LANs # noqa: E501 Creates a LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_post_with_http_info(datacenter_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan: The LAN to create. (required) :type lan: Lan :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Lan, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_post`") # noqa: E501 # verify the required parameter 'lan' is set if self.api_client.client_side_validation and ('lan' not in local_var_params or # noqa: E501 local_var_params['lan'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan` when calling `datacenters_lans_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'lan' in local_var_params: body_params = local_var_params['lan'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Lan' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_lans_put(self, datacenter_id, lan_id, lan, **kwargs): # noqa: E501 """Modify LANs # noqa: E501 Modify the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_put(datacenter_id, lan_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param lan: The modified LAN (required) :type lan: Lan :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Lan """ kwargs['_return_http_data_only'] = True return self.datacenters_lans_put_with_http_info(datacenter_id, lan_id, lan, **kwargs) # noqa: E501 def datacenters_lans_put_with_http_info(self, datacenter_id, lan_id, lan, **kwargs): # noqa: E501 """Modify LANs # noqa: E501 Modify the properties of the specified LAN within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_lans_put_with_http_info(datacenter_id, lan_id, lan, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param lan_id: The unique ID of the LAN. (required) :type lan_id: str :param lan: The modified LAN (required) :type lan: Lan :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Lan, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'lan_id', 'lan', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_lans_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_lans_put`") # noqa: E501 # verify the required parameter 'lan_id' is set if self.api_client.client_side_validation and ('lan_id' not in local_var_params or # noqa: E501 local_var_params['lan_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan_id` when calling `datacenters_lans_put`") # noqa: E501 # verify the required parameter 'lan' is set if self.api_client.client_side_validation and ('lan' not in local_var_params or # noqa: E501 local_var_params['lan'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lan` when calling `datacenters_lans_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_lans_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'lan_id' in local_var_params: path_params['lanId'] = local_var_params['lan_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'lan' in local_var_params: body_params = local_var_params['lan'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Lan' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/lans/{lanId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/load_balancers_api.py0000644000175100001660000032402615046550312022456 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class LoadBalancersApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_loadbalancers_balancednics_delete(self, datacenter_id, loadbalancer_id, nic_id, **kwargs): # noqa: E501 """Detach balanced NICs # noqa: E501 Detach the specified NIC from the Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_delete(datacenter_id, loadbalancer_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_balancednics_delete_with_http_info(datacenter_id, loadbalancer_id, nic_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_balancednics_delete_with_http_info(self, datacenter_id, loadbalancer_id, nic_id, **kwargs): # noqa: E501 """Detach balanced NICs # noqa: E501 Detach the specified NIC from the Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_delete_with_http_info(datacenter_id, loadbalancer_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'nic_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_balancednics_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_balancednics_delete`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_balancednics_delete`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_loadbalancers_balancednics_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_balancednics_find_by_nic_id(self, datacenter_id, loadbalancer_id, nic_id, **kwargs): # noqa: E501 """Retrieve balanced NICs # noqa: E501 Retrieve the properties of the specified NIC, attached to the Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_find_by_nic_id(datacenter_id, loadbalancer_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_balancednics_find_by_nic_id_with_http_info(datacenter_id, loadbalancer_id, nic_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_balancednics_find_by_nic_id_with_http_info(self, datacenter_id, loadbalancer_id, nic_id, **kwargs): # noqa: E501 """Retrieve balanced NICs # noqa: E501 Retrieve the properties of the specified NIC, attached to the Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_find_by_nic_id_with_http_info(datacenter_id, loadbalancer_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'nic_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_balancednics_find_by_nic_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_balancednics_find_by_nic_id`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_balancednics_find_by_nic_id`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_loadbalancers_balancednics_find_by_nic_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_find_by_nic_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_find_by_nic_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_balancednics_get(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """List balanced NICs # noqa: E501 List all NICs, attached to the specified Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_get(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: BalancedNics """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_balancednics_get_with_http_info(datacenter_id, loadbalancer_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_balancednics_get_with_http_info(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """List balanced NICs # noqa: E501 List all NICs, attached to the specified Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_get_with_http_info(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(BalancedNics, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_balancednics_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_balancednics_get`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_balancednics_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'BalancedNics' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_balancednics_post(self, datacenter_id, loadbalancer_id, nic, **kwargs): # noqa: E501 """Attach balanced NICs # noqa: E501 Attachs an existing NIC to the specified Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_post(datacenter_id, loadbalancer_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic: The NIC to be attached. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_balancednics_post_with_http_info(datacenter_id, loadbalancer_id, nic, **kwargs) # noqa: E501 def datacenters_loadbalancers_balancednics_post_with_http_info(self, datacenter_id, loadbalancer_id, nic, **kwargs): # noqa: E501 """Attach balanced NICs # noqa: E501 Attachs an existing NIC to the specified Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_balancednics_post_with_http_info(datacenter_id, loadbalancer_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param nic: The NIC to be attached. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'nic', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_balancednics_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_balancednics_post`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_balancednics_post`") # noqa: E501 # verify the required parameter 'nic' is set if self.api_client.client_side_validation and ('nic' not in local_var_params or # noqa: E501 local_var_params['nic'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic` when calling `datacenters_loadbalancers_balancednics_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_balancednics_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nic' in local_var_params: body_params = local_var_params['nic'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_delete(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """Delete Load Balancers # noqa: E501 Remove the specified Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_delete(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_delete_with_http_info(datacenter_id, loadbalancer_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_delete_with_http_info(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """Delete Load Balancers # noqa: E501 Remove the specified Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_delete_with_http_info(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_delete`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_find_by_id(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """Retrieve Load Balancers # noqa: E501 Retrieve the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_find_by_id(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Loadbalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_find_by_id_with_http_info(datacenter_id, loadbalancer_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_find_by_id_with_http_info(self, datacenter_id, loadbalancer_id, **kwargs): # noqa: E501 """Retrieve Load Balancers # noqa: E501 Retrieve the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_find_by_id_with_http_info(datacenter_id, loadbalancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Loadbalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_find_by_id`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Loadbalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_get(self, datacenter_id, **kwargs): # noqa: E501 """List Load Balancers # noqa: E501 List all the Load Balancers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Loadbalancers """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_loadbalancers_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List Load Balancers # noqa: E501 List all the Load Balancers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Loadbalancers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_loadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_loadbalancers_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_loadbalancers_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Loadbalancers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_patch(self, datacenter_id, loadbalancer_id, loadbalancer, **kwargs): # noqa: E501 """Partially modify Load Balancers # noqa: E501 Update the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_patch(datacenter_id, loadbalancer_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param loadbalancer: The properties of the Load Balancer to be updated. (required) :type loadbalancer: LoadbalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Loadbalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_patch_with_http_info(datacenter_id, loadbalancer_id, loadbalancer, **kwargs) # noqa: E501 def datacenters_loadbalancers_patch_with_http_info(self, datacenter_id, loadbalancer_id, loadbalancer, **kwargs): # noqa: E501 """Partially modify Load Balancers # noqa: E501 Update the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_patch_with_http_info(datacenter_id, loadbalancer_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param loadbalancer: The properties of the Load Balancer to be updated. (required) :type loadbalancer: LoadbalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Loadbalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'loadbalancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_patch`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_patch`") # noqa: E501 # verify the required parameter 'loadbalancer' is set if self.api_client.client_side_validation and ('loadbalancer' not in local_var_params or # noqa: E501 local_var_params['loadbalancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer` when calling `datacenters_loadbalancers_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'loadbalancer' in local_var_params: body_params = local_var_params['loadbalancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Loadbalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_post(self, datacenter_id, loadbalancer, **kwargs): # noqa: E501 """Create a Load Balancer # noqa: E501 Creates a Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_post(datacenter_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer: The Load Balancer to create. (required) :type loadbalancer: Loadbalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Loadbalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_post_with_http_info(datacenter_id, loadbalancer, **kwargs) # noqa: E501 def datacenters_loadbalancers_post_with_http_info(self, datacenter_id, loadbalancer, **kwargs): # noqa: E501 """Create a Load Balancer # noqa: E501 Creates a Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_post_with_http_info(datacenter_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer: The Load Balancer to create. (required) :type loadbalancer: Loadbalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Loadbalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_post`") # noqa: E501 # verify the required parameter 'loadbalancer' is set if self.api_client.client_side_validation and ('loadbalancer' not in local_var_params or # noqa: E501 local_var_params['loadbalancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer` when calling `datacenters_loadbalancers_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'loadbalancer' in local_var_params: body_params = local_var_params['loadbalancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Loadbalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_loadbalancers_put(self, datacenter_id, loadbalancer_id, loadbalancer, **kwargs): # noqa: E501 """Modify a Load Balancer by ID # noqa: E501 Modifies the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_put(datacenter_id, loadbalancer_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param loadbalancer: The modified Load Balancer. (required) :type loadbalancer: Loadbalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Loadbalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_loadbalancers_put_with_http_info(datacenter_id, loadbalancer_id, loadbalancer, **kwargs) # noqa: E501 def datacenters_loadbalancers_put_with_http_info(self, datacenter_id, loadbalancer_id, loadbalancer, **kwargs): # noqa: E501 """Modify a Load Balancer by ID # noqa: E501 Modifies the properties of the specified Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_loadbalancers_put_with_http_info(datacenter_id, loadbalancer_id, loadbalancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param loadbalancer_id: The unique ID of the Load Balancer. (required) :type loadbalancer_id: str :param loadbalancer: The modified Load Balancer. (required) :type loadbalancer: Loadbalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Loadbalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'loadbalancer_id', 'loadbalancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_loadbalancers_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_loadbalancers_put`") # noqa: E501 # verify the required parameter 'loadbalancer_id' is set if self.api_client.client_side_validation and ('loadbalancer_id' not in local_var_params or # noqa: E501 local_var_params['loadbalancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer_id` when calling `datacenters_loadbalancers_put`") # noqa: E501 # verify the required parameter 'loadbalancer' is set if self.api_client.client_side_validation and ('loadbalancer' not in local_var_params or # noqa: E501 local_var_params['loadbalancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `loadbalancer` when calling `datacenters_loadbalancers_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_loadbalancers_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'loadbalancer_id' in local_var_params: path_params['loadbalancerId'] = local_var_params['loadbalancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'loadbalancer' in local_var_params: body_params = local_var_params['loadbalancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Loadbalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/locations_api.py0000644000175100001660000007034115046550312021516 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class LocationsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def locations_find_by_region_id(self, region_id, **kwargs): # noqa: E501 """Get Locations within a Region # noqa: E501 Retrieves the available locations in a region specified by its ID. The 'regionId' consists of the two character identifier of the region (country), e.g., 'de'. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_find_by_region_id(region_id, async_req=True) >>> result = thread.get() :param region_id: The unique ID of the region. (required) :type region_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Locations """ kwargs['_return_http_data_only'] = True return self.locations_find_by_region_id_with_http_info(region_id, **kwargs) # noqa: E501 def locations_find_by_region_id_with_http_info(self, region_id, **kwargs): # noqa: E501 """Get Locations within a Region # noqa: E501 Retrieves the available locations in a region specified by its ID. The 'regionId' consists of the two character identifier of the region (country), e.g., 'de'. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_find_by_region_id_with_http_info(region_id, async_req=True) >>> result = thread.get() :param region_id: The unique ID of the region. (required) :type region_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Locations, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'region_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method locations_find_by_region_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'region_id' is set if self.api_client.client_side_validation and ('region_id' not in local_var_params or # noqa: E501 local_var_params['region_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `region_id` when calling `locations_find_by_region_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_find_by_region_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_find_by_region_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'region_id' in local_var_params: path_params['regionId'] = local_var_params['region_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Locations' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/locations/{regionId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def locations_find_by_region_id_and_id(self, region_id, location_id, **kwargs): # noqa: E501 """Get Location by ID # noqa: E501 Retrieves the information about the location specified by its ID. The 'locationId' consists of the three-digit identifier of the city according to the IATA code. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_find_by_region_id_and_id(region_id, location_id, async_req=True) >>> result = thread.get() :param region_id: The unique ID of the region. (required) :type region_id: str :param location_id: The unique ID of the location. (required) :type location_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Location """ kwargs['_return_http_data_only'] = True return self.locations_find_by_region_id_and_id_with_http_info(region_id, location_id, **kwargs) # noqa: E501 def locations_find_by_region_id_and_id_with_http_info(self, region_id, location_id, **kwargs): # noqa: E501 """Get Location by ID # noqa: E501 Retrieves the information about the location specified by its ID. The 'locationId' consists of the three-digit identifier of the city according to the IATA code. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_find_by_region_id_and_id_with_http_info(region_id, location_id, async_req=True) >>> result = thread.get() :param region_id: The unique ID of the region. (required) :type region_id: str :param location_id: The unique ID of the location. (required) :type location_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Location, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'region_id', 'location_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method locations_find_by_region_id_and_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'region_id' is set if self.api_client.client_side_validation and ('region_id' not in local_var_params or # noqa: E501 local_var_params['region_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `region_id` when calling `locations_find_by_region_id_and_id`") # noqa: E501 # verify the required parameter 'location_id' is set if self.api_client.client_side_validation and ('location_id' not in local_var_params or # noqa: E501 local_var_params['location_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `location_id` when calling `locations_find_by_region_id_and_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_find_by_region_id_and_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_find_by_region_id_and_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'region_id' in local_var_params: path_params['regionId'] = local_var_params['region_id'] # noqa: E501 if 'location_id' in local_var_params: path_params['locationId'] = local_var_params['location_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Location' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/locations/{regionId}/{locationId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def locations_get(self, **kwargs): # noqa: E501 """Get Locations # noqa: E501 Retrieves the available physical locations where you can deploy cloud resources in a VDC. A location is identified by a combination of the following characters: * a two-character **regionId**, which represents a country (example: 'de') * a three-character **locationId**, which represents a city. The 'locationId' is typically based on the IATA code of the city's airport (example: 'txl'). >Note that 'locations' are read-only and cannot be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Locations """ kwargs['_return_http_data_only'] = True return self.locations_get_with_http_info(**kwargs) # noqa: E501 def locations_get_with_http_info(self, **kwargs): # noqa: E501 """Get Locations # noqa: E501 Retrieves the available physical locations where you can deploy cloud resources in a VDC. A location is identified by a combination of the following characters: * a two-character **regionId**, which represents a country (example: 'de') * a three-character **locationId**, which represents a city. The 'locationId' is typically based on the IATA code of the city's airport (example: 'txl'). >Note that 'locations' are read-only and cannot be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.locations_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Locations, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method locations_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `locations_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Locations' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/locations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/nat_gateways_api.py0000644000175100001660000060421715046550312022216 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class NATGatewaysApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_natgateways_delete(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """Delete NAT Gateways # noqa: E501 Remove the specified NAT Gateway from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_delete(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_delete_with_http_info(datacenter_id, nat_gateway_id, **kwargs) # noqa: E501 def datacenters_natgateways_delete_with_http_info(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """Delete NAT Gateways # noqa: E501 Remove the specified NAT Gateway from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_delete_with_http_info(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_delete`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_find_by_nat_gateway_id(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """Retrieve NAT Gateways # noqa: E501 Retrieve the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_find_by_nat_gateway_id(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGateway """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_find_by_nat_gateway_id_with_http_info(datacenter_id, nat_gateway_id, **kwargs) # noqa: E501 def datacenters_natgateways_find_by_nat_gateway_id_with_http_info(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """Retrieve NAT Gateways # noqa: E501 Retrieve the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_find_by_nat_gateway_id_with_http_info(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGateway, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_find_by_nat_gateway_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_find_by_nat_gateway_id`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_find_by_nat_gateway_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_find_by_nat_gateway_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_find_by_nat_gateway_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGateway' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_delete(self, datacenter_id, nat_gateway_id, flow_log_id, **kwargs): # noqa: E501 """Delete NAT Gateway Flow Logs # noqa: E501 Delete the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_delete(datacenter_id, nat_gateway_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_delete_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_delete_with_http_info(self, datacenter_id, nat_gateway_id, flow_log_id, **kwargs): # noqa: E501 """Delete NAT Gateway Flow Logs # noqa: E501 Delete the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_delete_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'flow_log_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_delete`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_delete`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_natgateways_flowlogs_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_find_by_flow_log_id(self, datacenter_id, nat_gateway_id, flow_log_id, **kwargs): # noqa: E501 """Retrieve NAT Gateway Flow Logs # noqa: E501 Retrieve the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_find_by_flow_log_id(datacenter_id, nat_gateway_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_find_by_flow_log_id_with_http_info(self, datacenter_id, nat_gateway_id, flow_log_id, **kwargs): # noqa: E501 """Retrieve NAT Gateway Flow Logs # noqa: E501 Retrieve the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'flow_log_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_find_by_flow_log_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_natgateways_flowlogs_find_by_flow_log_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_find_by_flow_log_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_find_by_flow_log_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_get(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """List NAT Gateway Flow Logs # noqa: E501 List all the Flow Logs for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_get(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLogs """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_get_with_http_info(datacenter_id, nat_gateway_id, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_get_with_http_info(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """List NAT Gateway Flow Logs # noqa: E501 List all the Flow Logs for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_get_with_http_info(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLogs, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'pretty', 'depth', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_get`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_natgateways_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_natgateways_flowlogs_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_natgateways_flowlogs_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLogs' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_patch(self, datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, **kwargs): # noqa: E501 """Partially modify NAT Gateway Flow Logs # noqa: E501 Update the properties of the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_patch(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param nat_gateway_flow_log_properties: The properties of the Flow Log to be updated. (required) :type nat_gateway_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_patch_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_patch_with_http_info(self, datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, **kwargs): # noqa: E501 """Partially modify NAT Gateway Flow Logs # noqa: E501 Update the properties of the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_patch_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param nat_gateway_flow_log_properties: The properties of the Flow Log to be updated. (required) :type nat_gateway_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'flow_log_id', 'nat_gateway_flow_log_properties', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_patch`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_natgateways_flowlogs_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_flow_log_properties' is set if self.api_client.client_side_validation and ('nat_gateway_flow_log_properties' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_flow_log_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_flow_log_properties` when calling `datacenters_natgateways_flowlogs_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'nat_gateway_flow_log_properties' in local_var_params: body_params = local_var_params['nat_gateway_flow_log_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_post(self, datacenter_id, nat_gateway_id, nat_gateway_flow_log, **kwargs): # noqa: E501 """Create a NAT Gateway Flow Log # noqa: E501 Adds a new Flow Log to the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_post(datacenter_id, nat_gateway_id, nat_gateway_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_flow_log: The Flow Log to create. (required) :type nat_gateway_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_post_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_flow_log, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_post_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_flow_log, **kwargs): # noqa: E501 """Create a NAT Gateway Flow Log # noqa: E501 Adds a new Flow Log to the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_post_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_flow_log: The Flow Log to create. (required) :type nat_gateway_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_flow_log', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_post`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_post`") # noqa: E501 # verify the required parameter 'nat_gateway_flow_log' is set if self.api_client.client_side_validation and ('nat_gateway_flow_log' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_flow_log` when calling `datacenters_natgateways_flowlogs_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'nat_gateway_flow_log' in local_var_params: body_params = local_var_params['nat_gateway_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_flowlogs_put(self, datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, **kwargs): # noqa: E501 """Modify NAT Gateway Flow Logs # noqa: E501 Modify the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_put(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param nat_gateway_flow_log: The modified NAT Gateway Flow Log. (required) :type nat_gateway_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_flowlogs_put_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, **kwargs) # noqa: E501 def datacenters_natgateways_flowlogs_put_with_http_info(self, datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, **kwargs): # noqa: E501 """Modify NAT Gateway Flow Logs # noqa: E501 Modify the specified NAT Gateway Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_flowlogs_put_with_http_info(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param nat_gateway_flow_log: The modified NAT Gateway Flow Log. (required) :type nat_gateway_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'flow_log_id', 'nat_gateway_flow_log', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_flowlogs_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_flowlogs_put`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_flowlogs_put`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_natgateways_flowlogs_put`") # noqa: E501 # verify the required parameter 'nat_gateway_flow_log' is set if self.api_client.client_side_validation and ('nat_gateway_flow_log' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_flow_log` when calling `datacenters_natgateways_flowlogs_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_flowlogs_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'nat_gateway_flow_log' in local_var_params: body_params = local_var_params['nat_gateway_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_get(self, datacenter_id, **kwargs): # noqa: E501 """List NAT Gateways # noqa: E501 List all NAT Gateways within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGateways """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_natgateways_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List NAT Gateways # noqa: E501 List all NAT Gateways within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGateways, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGateways' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_patch(self, datacenter_id, nat_gateway_id, nat_gateway_properties, **kwargs): # noqa: E501 """Partially modify NAT Gateways # noqa: E501 Update the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_patch(datacenter_id, nat_gateway_id, nat_gateway_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_properties: The properties of the NAT Gateway to be updated. (required) :type nat_gateway_properties: NatGatewayProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGateway """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_patch_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_properties, **kwargs) # noqa: E501 def datacenters_natgateways_patch_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_properties, **kwargs): # noqa: E501 """Partially modify NAT Gateways # noqa: E501 Update the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_patch_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_properties: The properties of the NAT Gateway to be updated. (required) :type nat_gateway_properties: NatGatewayProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGateway, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_properties' is set if self.api_client.client_side_validation and ('nat_gateway_properties' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_properties` when calling `datacenters_natgateways_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway_properties' in local_var_params: body_params = local_var_params['nat_gateway_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGateway' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_post(self, datacenter_id, nat_gateway, **kwargs): # noqa: E501 """Create a NAT Gateway # noqa: E501 Creates a NAT Gateway within the data center. This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_post(datacenter_id, nat_gateway, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway: The NAT Gateway to create. (required) :type nat_gateway: NatGateway :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGateway """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_post_with_http_info(datacenter_id, nat_gateway, **kwargs) # noqa: E501 def datacenters_natgateways_post_with_http_info(self, datacenter_id, nat_gateway, **kwargs): # noqa: E501 """Create a NAT Gateway # noqa: E501 Creates a NAT Gateway within the data center. This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_post_with_http_info(datacenter_id, nat_gateway, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway: The NAT Gateway to create. (required) :type nat_gateway: NatGateway :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGateway, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_post`") # noqa: E501 # verify the required parameter 'nat_gateway' is set if self.api_client.client_side_validation and ('nat_gateway' not in local_var_params or # noqa: E501 local_var_params['nat_gateway'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway` when calling `datacenters_natgateways_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway' in local_var_params: body_params = local_var_params['nat_gateway'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGateway' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_put(self, datacenter_id, nat_gateway_id, nat_gateway, **kwargs): # noqa: E501 """Modify NAT Gateways # noqa: E501 Modify the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_put(datacenter_id, nat_gateway_id, nat_gateway, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway: The modified NAT Gateway. (required) :type nat_gateway: NatGatewayPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGateway """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_put_with_http_info(datacenter_id, nat_gateway_id, nat_gateway, **kwargs) # noqa: E501 def datacenters_natgateways_put_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway, **kwargs): # noqa: E501 """Modify NAT Gateways # noqa: E501 Modify the properties of the specified NAT Gateway within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_put_with_http_info(datacenter_id, nat_gateway_id, nat_gateway, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway: The modified NAT Gateway. (required) :type nat_gateway: NatGatewayPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGateway, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_put`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_put`") # noqa: E501 # verify the required parameter 'nat_gateway' is set if self.api_client.client_side_validation and ('nat_gateway' not in local_var_params or # noqa: E501 local_var_params['nat_gateway'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway` when calling `datacenters_natgateways_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway' in local_var_params: body_params = local_var_params['nat_gateway'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGateway' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_delete(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs): # noqa: E501 """Delete NAT Gateway rules # noqa: E501 Delete the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_delete(datacenter_id, nat_gateway_id, nat_gateway_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_delete_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs) # noqa: E501 def datacenters_natgateways_rules_delete_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs): # noqa: E501 """Delete NAT Gateway rules # noqa: E501 Delete the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_delete_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_delete`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_delete`") # noqa: E501 # verify the required parameter 'nat_gateway_rule_id' is set if self.api_client.client_side_validation and ('nat_gateway_rule_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule_id` when calling `datacenters_natgateways_rules_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'nat_gateway_rule_id' in local_var_params: path_params['natGatewayRuleId'] = local_var_params['nat_gateway_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_find_by_nat_gateway_rule_id(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs): # noqa: E501 """Retrieve NAT Gateway rules # noqa: E501 Retrieve the properties of the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_find_by_nat_gateway_rule_id(datacenter_id, nat_gateway_id, nat_gateway_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGatewayRule """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_find_by_nat_gateway_rule_id_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs) # noqa: E501 def datacenters_natgateways_rules_find_by_nat_gateway_rule_id_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, **kwargs): # noqa: E501 """Retrieve NAT Gateway rules # noqa: E501 Retrieve the properties of the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_find_by_nat_gateway_rule_id_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGatewayRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_find_by_nat_gateway_rule_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_find_by_nat_gateway_rule_id`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_find_by_nat_gateway_rule_id`") # noqa: E501 # verify the required parameter 'nat_gateway_rule_id' is set if self.api_client.client_side_validation and ('nat_gateway_rule_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule_id` when calling `datacenters_natgateways_rules_find_by_nat_gateway_rule_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_find_by_nat_gateway_rule_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_find_by_nat_gateway_rule_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'nat_gateway_rule_id' in local_var_params: path_params['natGatewayRuleId'] = local_var_params['nat_gateway_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGatewayRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_get(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """List NAT Gateway rules # noqa: E501 List all rules for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_get(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGatewayRules """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_get_with_http_info(datacenter_id, nat_gateway_id, **kwargs) # noqa: E501 def datacenters_natgateways_rules_get_with_http_info(self, datacenter_id, nat_gateway_id, **kwargs): # noqa: E501 """List NAT Gateway rules # noqa: E501 List all rules for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_get_with_http_info(datacenter_id, nat_gateway_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGatewayRules, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_get`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGatewayRules' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_patch(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, **kwargs): # noqa: E501 """Partially Modify a NAT Gateway Rule by ID # noqa: E501 Updates the properties of the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_patch(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param nat_gateway_rule_properties: The properties of the NAT Gateway rule to be updated. (required) :type nat_gateway_rule_properties: NatGatewayRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGatewayRule """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_patch_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, **kwargs) # noqa: E501 def datacenters_natgateways_rules_patch_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, **kwargs): # noqa: E501 """Partially Modify a NAT Gateway Rule by ID # noqa: E501 Updates the properties of the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_patch_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param nat_gateway_rule_properties: The properties of the NAT Gateway rule to be updated. (required) :type nat_gateway_rule_properties: NatGatewayRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGatewayRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_rule_id', 'nat_gateway_rule_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_rule_id' is set if self.api_client.client_side_validation and ('nat_gateway_rule_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule_id` when calling `datacenters_natgateways_rules_patch`") # noqa: E501 # verify the required parameter 'nat_gateway_rule_properties' is set if self.api_client.client_side_validation and ('nat_gateway_rule_properties' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule_properties` when calling `datacenters_natgateways_rules_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'nat_gateway_rule_id' in local_var_params: path_params['natGatewayRuleId'] = local_var_params['nat_gateway_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway_rule_properties' in local_var_params: body_params = local_var_params['nat_gateway_rule_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGatewayRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_post(self, datacenter_id, nat_gateway_id, nat_gateway_rule, **kwargs): # noqa: E501 """Create a NAT Gateway Rule # noqa: E501 Creates a rule for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_post(datacenter_id, nat_gateway_id, nat_gateway_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule: The NAT Gateway rule to create. (required) :type nat_gateway_rule: NatGatewayRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGatewayRule """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_post_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule, **kwargs) # noqa: E501 def datacenters_natgateways_rules_post_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_rule, **kwargs): # noqa: E501 """Create a NAT Gateway Rule # noqa: E501 Creates a rule for the specified NAT Gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_post_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule: The NAT Gateway rule to create. (required) :type nat_gateway_rule: NatGatewayRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGatewayRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_post`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_post`") # noqa: E501 # verify the required parameter 'nat_gateway_rule' is set if self.api_client.client_side_validation and ('nat_gateway_rule' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule` when calling `datacenters_natgateways_rules_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway_rule' in local_var_params: body_params = local_var_params['nat_gateway_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGatewayRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_natgateways_rules_put(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, **kwargs): # noqa: E501 """Modify a NAT Gateway Rule by ID # noqa: E501 Modify the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_put(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param nat_gateway_rule: The modified NAT Gateway rule. (required) :type nat_gateway_rule: NatGatewayRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NatGatewayRule """ kwargs['_return_http_data_only'] = True return self.datacenters_natgateways_rules_put_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, **kwargs) # noqa: E501 def datacenters_natgateways_rules_put_with_http_info(self, datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, **kwargs): # noqa: E501 """Modify a NAT Gateway Rule by ID # noqa: E501 Modify the specified NAT Gateway rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_natgateways_rules_put_with_http_info(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param nat_gateway_id: The unique ID of the NAT Gateway. (required) :type nat_gateway_id: str :param nat_gateway_rule_id: The unique ID of the NAT Gateway rule. (required) :type nat_gateway_rule_id: str :param nat_gateway_rule: The modified NAT Gateway rule. (required) :type nat_gateway_rule: NatGatewayRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NatGatewayRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'nat_gateway_id', 'nat_gateway_rule_id', 'nat_gateway_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_natgateways_rules_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_natgateways_rules_put`") # noqa: E501 # verify the required parameter 'nat_gateway_id' is set if self.api_client.client_side_validation and ('nat_gateway_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_id` when calling `datacenters_natgateways_rules_put`") # noqa: E501 # verify the required parameter 'nat_gateway_rule_id' is set if self.api_client.client_side_validation and ('nat_gateway_rule_id' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule_id` when calling `datacenters_natgateways_rules_put`") # noqa: E501 # verify the required parameter 'nat_gateway_rule' is set if self.api_client.client_side_validation and ('nat_gateway_rule' not in local_var_params or # noqa: E501 local_var_params['nat_gateway_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nat_gateway_rule` when calling `datacenters_natgateways_rules_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_natgateways_rules_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'nat_gateway_id' in local_var_params: path_params['natGatewayId'] = local_var_params['nat_gateway_id'] # noqa: E501 if 'nat_gateway_rule_id' in local_var_params: path_params['natGatewayRuleId'] = local_var_params['nat_gateway_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nat_gateway_rule' in local_var_params: body_params = local_var_params['nat_gateway_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NatGatewayRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/network_interfaces_api.py0000644000175100001660000020471015046550312023416 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class NetworkInterfacesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_servers_nics_delete(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """Delete NICs # noqa: E501 Remove the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, **kwargs) # noqa: E501 def datacenters_servers_nics_delete_with_http_info(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """Delete NICs # noqa: E501 Remove the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_delete`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_find_by_id(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """Retrieve NICs # noqa: E501 Retrieve the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, **kwargs) # noqa: E501 def datacenters_servers_nics_find_by_id_with_http_info(self, datacenter_id, server_id, nic_id, **kwargs): # noqa: E501 """Retrieve NICs # noqa: E501 Retrieve the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_find_by_id`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """List NICs # noqa: E501 List all NICs, attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nics """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_nics_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """List NICs # noqa: E501 List all NICs, attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nics, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_nics_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_nics_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nics' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_patch(self, datacenter_id, server_id, nic_id, nic, **kwargs): # noqa: E501 """Partially modify NICs # noqa: E501 Update the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param nic: The properties of the NIC to be updated. (required) :type nic: NicProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, **kwargs) # noqa: E501 def datacenters_servers_nics_patch_with_http_info(self, datacenter_id, server_id, nic_id, nic, **kwargs): # noqa: E501 """Partially modify NICs # noqa: E501 Update the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param nic: The properties of the NIC to be updated. (required) :type nic: NicProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'nic', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_patch`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_patch`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_patch`") # noqa: E501 # verify the required parameter 'nic' is set if self.api_client.client_side_validation and ('nic' not in local_var_params or # noqa: E501 local_var_params['nic'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic` when calling `datacenters_servers_nics_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nic' in local_var_params: body_params = local_var_params['nic'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_post(self, datacenter_id, server_id, nic, **kwargs): # noqa: E501 """Create a NIC # noqa: E501 Adds a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_post(datacenter_id, server_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic: The NIC to create. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, **kwargs) # noqa: E501 def datacenters_servers_nics_post_with_http_info(self, datacenter_id, server_id, nic, **kwargs): # noqa: E501 """Create a NIC # noqa: E501 Adds a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic: The NIC to create. (required) :type nic: Nic :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_post`") # noqa: E501 # verify the required parameter 'nic' is set if self.api_client.client_side_validation and ('nic' not in local_var_params or # noqa: E501 local_var_params['nic'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic` when calling `datacenters_servers_nics_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nic' in local_var_params: body_params = local_var_params['nic'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_put(self, datacenter_id, server_id, nic_id, nic, **kwargs): # noqa: E501 """Modify NICs # noqa: E501 Modify the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param nic: The modified NIC (required) :type nic: NicPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Nic """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, **kwargs) # noqa: E501 def datacenters_servers_nics_put_with_http_info(self, datacenter_id, server_id, nic_id, nic, **kwargs): # noqa: E501 """Modify NICs # noqa: E501 Modify the properties of the specified NIC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the NIC. (required) :type nic_id: str :param nic: The modified NIC (required) :type nic: NicPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Nic, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'nic', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_put`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_put`") # noqa: E501 # verify the required parameter 'nic' is set if self.api_client.client_side_validation and ('nic' not in local_var_params or # noqa: E501 local_var_params['nic'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic` when calling `datacenters_servers_nics_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'nic' in local_var_params: body_params = local_var_params['nic'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Nic' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/network_load_balancers_api.py0000644000175100001660000063356415046550312024241 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class NetworkLoadBalancersApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_networkloadbalancers_delete(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """Delete Network Load Balancers # noqa: E501 Remove the specified Network Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_delete(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_delete_with_http_info(datacenter_id, network_load_balancer_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_delete_with_http_info(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """Delete Network Load Balancers # noqa: E501 Remove the specified Network Load Balancer from the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_delete_with_http_info(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_delete`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_find_by_network_load_balancer_id(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """Retrieve Network Load Balancers # noqa: E501 Retrieve the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_find_by_network_load_balancer_id(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_find_by_network_load_balancer_id_with_http_info(datacenter_id, network_load_balancer_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_find_by_network_load_balancer_id_with_http_info(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """Retrieve Network Load Balancers # noqa: E501 Retrieve the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_find_by_network_load_balancer_id_with_http_info(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_find_by_network_load_balancer_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_find_by_network_load_balancer_id`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_find_by_network_load_balancer_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_find_by_network_load_balancer_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_find_by_network_load_balancer_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_delete(self, datacenter_id, network_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Delete NLB Flow Logs # noqa: E501 Delete the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_delete(datacenter_id, network_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_delete_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_delete_with_http_info(self, datacenter_id, network_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Delete NLB Flow Logs # noqa: E501 Delete the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_delete_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'flow_log_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_delete`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_delete`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_networkloadbalancers_flowlogs_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id(self, datacenter_id, network_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Retrieve NLB Flow Logs # noqa: E501 Retrieve the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, network_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(self, datacenter_id, network_load_balancer_id, flow_log_id, **kwargs): # noqa: E501 """Retrieve NLB Flow Logs # noqa: E501 Retrieve the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'flow_log_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_get(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """List NLB Flow Logs # noqa: E501 List all the Flow Logs for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_get(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLogs """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_get_with_http_info(datacenter_id, network_load_balancer_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_get_with_http_info(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """List NLB Flow Logs # noqa: E501 List all the Flow Logs for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_get_with_http_info(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLogs, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_get`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLogs' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_patch(self, datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, **kwargs): # noqa: E501 """Partially modify NLB Flow Logs # noqa: E501 Update the properties of the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_patch(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param network_load_balancer_flow_log_properties: The properties of the Flow Log to be updated. (required) :type network_load_balancer_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_patch_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_patch_with_http_info(self, datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, **kwargs): # noqa: E501 """Partially modify NLB Flow Logs # noqa: E501 Update the properties of the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_patch_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param network_load_balancer_flow_log_properties: The properties of the Flow Log to be updated. (required) :type network_load_balancer_flow_log_properties: FlowLogProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'flow_log_id', 'network_load_balancer_flow_log_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_networkloadbalancers_flowlogs_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_flow_log_properties' is set if self.api_client.client_side_validation and ('network_load_balancer_flow_log_properties' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_flow_log_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_flow_log_properties` when calling `datacenters_networkloadbalancers_flowlogs_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_flow_log_properties' in local_var_params: body_params = local_var_params['network_load_balancer_flow_log_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_post(self, datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, **kwargs): # noqa: E501 """Create a NLB Flow Log # noqa: E501 Adds a new Flow Log for the Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_post(datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_flow_log: The Flow Log to create. (required) :type network_load_balancer_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_post_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_post_with_http_info(self, datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, **kwargs): # noqa: E501 """Create a NLB Flow Log # noqa: E501 Adds a new Flow Log for the Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_post_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_flow_log: The Flow Log to create. (required) :type network_load_balancer_flow_log: FlowLog :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'network_load_balancer_flow_log', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_post`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_post`") # noqa: E501 # verify the required parameter 'network_load_balancer_flow_log' is set if self.api_client.client_side_validation and ('network_load_balancer_flow_log' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_flow_log` when calling `datacenters_networkloadbalancers_flowlogs_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_flow_log' in local_var_params: body_params = local_var_params['network_load_balancer_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_flowlogs_put(self, datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, **kwargs): # noqa: E501 """Modify NLB Flow Logs # noqa: E501 Modify the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_put(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param network_load_balancer_flow_log: The modified NLB Flow Log. (required) :type network_load_balancer_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FlowLog """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_flowlogs_put_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_flowlogs_put_with_http_info(self, datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, **kwargs): # noqa: E501 """Modify NLB Flow Logs # noqa: E501 Modify the specified Network Load Balancer Flow Log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_flowlogs_put_with_http_info(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param flow_log_id: The unique ID of the Flow Log. (required) :type flow_log_id: str :param network_load_balancer_flow_log: The modified NLB Flow Log. (required) :type network_load_balancer_flow_log: FlowLogPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FlowLog, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'flow_log_id', 'network_load_balancer_flow_log', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_flowlogs_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'flow_log_id' is set if self.api_client.client_side_validation and ('flow_log_id' not in local_var_params or # noqa: E501 local_var_params['flow_log_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `flow_log_id` when calling `datacenters_networkloadbalancers_flowlogs_put`") # noqa: E501 # verify the required parameter 'network_load_balancer_flow_log' is set if self.api_client.client_side_validation and ('network_load_balancer_flow_log' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_flow_log'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_flow_log` when calling `datacenters_networkloadbalancers_flowlogs_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_flowlogs_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'flow_log_id' in local_var_params: path_params['flowLogId'] = local_var_params['flow_log_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_flow_log' in local_var_params: body_params = local_var_params['network_load_balancer_flow_log'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FlowLog' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_delete(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Delete NLB forwarding rules # noqa: E501 Delete the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_delete(datacenter_id, network_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_delete_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_delete_with_http_info(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Delete NLB forwarding rules # noqa: E501 Delete the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_delete_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'forwarding_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_delete`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_delete`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_networkloadbalancers_forwardingrules_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Retrieve NLB forwarding rules # noqa: E501 Retrieve the specified Network Load Balance forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, network_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, **kwargs): # noqa: E501 """Retrieve NLB forwarding rules # noqa: E501 Retrieve the specified Network Load Balance forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'forwarding_rule_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_get(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """List NLB forwarding rules # noqa: E501 List the forwarding rules for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_get(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancerForwardingRules """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_get_with_http_info(datacenter_id, network_load_balancer_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_get_with_http_info(self, datacenter_id, network_load_balancer_id, **kwargs): # noqa: E501 """List NLB forwarding rules # noqa: E501 List the forwarding rules for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_get_with_http_info(datacenter_id, network_load_balancer_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancerForwardingRules, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_get`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancerForwardingRules' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_patch(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, **kwargs): # noqa: E501 """Partially modify NLB forwarding rules # noqa: E501 Update the properties of the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_patch(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param network_load_balancer_forwarding_rule_properties: The properties of the forwarding rule to be updated. (required) :type network_load_balancer_forwarding_rule_properties: NetworkLoadBalancerForwardingRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_patch_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_patch_with_http_info(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, **kwargs): # noqa: E501 """Partially modify NLB forwarding rules # noqa: E501 Update the properties of the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_patch_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param network_load_balancer_forwarding_rule_properties: The properties of the forwarding rule to be updated. (required) :type network_load_balancer_forwarding_rule_properties: NetworkLoadBalancerForwardingRuleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'forwarding_rule_id', 'network_load_balancer_forwarding_rule_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_networkloadbalancers_forwardingrules_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_forwarding_rule_properties' is set if self.api_client.client_side_validation and ('network_load_balancer_forwarding_rule_properties' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_forwarding_rule_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_forwarding_rule_properties` when calling `datacenters_networkloadbalancers_forwardingrules_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_forwarding_rule_properties' in local_var_params: body_params = local_var_params['network_load_balancer_forwarding_rule_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_post(self, datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Create a NLB Forwarding Rule # noqa: E501 Creates a forwarding rule for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_post(datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_forwarding_rule: The forwarding rule to create. (required) :type network_load_balancer_forwarding_rule: NetworkLoadBalancerForwardingRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_post_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_post_with_http_info(self, datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Create a NLB Forwarding Rule # noqa: E501 Creates a forwarding rule for the specified Network Load Balancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_post_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_forwarding_rule: The forwarding rule to create. (required) :type network_load_balancer_forwarding_rule: NetworkLoadBalancerForwardingRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'network_load_balancer_forwarding_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_post`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_post`") # noqa: E501 # verify the required parameter 'network_load_balancer_forwarding_rule' is set if self.api_client.client_side_validation and ('network_load_balancer_forwarding_rule' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_forwarding_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_forwarding_rule` when calling `datacenters_networkloadbalancers_forwardingrules_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_forwarding_rule' in local_var_params: body_params = local_var_params['network_load_balancer_forwarding_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_forwardingrules_put(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Modify NLB forwarding rules # noqa: E501 Modify the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_put(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param network_load_balancer_forwarding_rule: The modified NLB forwarding rule. (required) :type network_load_balancer_forwarding_rule: NetworkLoadBalancerForwardingRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancerForwardingRule """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_forwardingrules_put_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_forwardingrules_put_with_http_info(self, datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, **kwargs): # noqa: E501 """Modify NLB forwarding rules # noqa: E501 Modify the specified Network Load Balancer forwarding rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_forwardingrules_put_with_http_info(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param forwarding_rule_id: The unique ID of the forwarding rule. (required) :type forwarding_rule_id: str :param network_load_balancer_forwarding_rule: The modified NLB forwarding rule. (required) :type network_load_balancer_forwarding_rule: NetworkLoadBalancerForwardingRulePut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancerForwardingRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'forwarding_rule_id', 'network_load_balancer_forwarding_rule', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_forwardingrules_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'forwarding_rule_id' is set if self.api_client.client_side_validation and ('forwarding_rule_id' not in local_var_params or # noqa: E501 local_var_params['forwarding_rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forwarding_rule_id` when calling `datacenters_networkloadbalancers_forwardingrules_put`") # noqa: E501 # verify the required parameter 'network_load_balancer_forwarding_rule' is set if self.api_client.client_side_validation and ('network_load_balancer_forwarding_rule' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_forwarding_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_forwarding_rule` when calling `datacenters_networkloadbalancers_forwardingrules_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_forwardingrules_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 if 'forwarding_rule_id' in local_var_params: path_params['forwardingRuleId'] = local_var_params['forwarding_rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_forwarding_rule' in local_var_params: body_params = local_var_params['network_load_balancer_forwarding_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancerForwardingRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_get(self, datacenter_id, **kwargs): # noqa: E501 """List Network Load Balancers # noqa: E501 List all the Network Load Balancers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancers """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List Network Load Balancers # noqa: E501 List all the Network Load Balancers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_networkloadbalancers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_networkloadbalancers_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_networkloadbalancers_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_patch(self, datacenter_id, network_load_balancer_id, network_load_balancer_properties, **kwargs): # noqa: E501 """Partially modify Network Load Balancers # noqa: E501 Update the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_patch(datacenter_id, network_load_balancer_id, network_load_balancer_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_properties: The properties of the Network Load Balancer to be updated. (required) :type network_load_balancer_properties: NetworkLoadBalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_patch_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_properties, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_patch_with_http_info(self, datacenter_id, network_load_balancer_id, network_load_balancer_properties, **kwargs): # noqa: E501 """Partially modify Network Load Balancers # noqa: E501 Update the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_patch_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer_properties, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer_properties: The properties of the Network Load Balancer to be updated. (required) :type network_load_balancer_properties: NetworkLoadBalancerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'network_load_balancer_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_patch`") # noqa: E501 # verify the required parameter 'network_load_balancer_properties' is set if self.api_client.client_side_validation and ('network_load_balancer_properties' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_properties` when calling `datacenters_networkloadbalancers_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer_properties' in local_var_params: body_params = local_var_params['network_load_balancer_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_post(self, datacenter_id, network_load_balancer, **kwargs): # noqa: E501 """Create a Network Load Balancer # noqa: E501 Creates a Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_post(datacenter_id, network_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer: The Network Load Balancer to create. (required) :type network_load_balancer: NetworkLoadBalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_post_with_http_info(datacenter_id, network_load_balancer, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_post_with_http_info(self, datacenter_id, network_load_balancer, **kwargs): # noqa: E501 """Create a Network Load Balancer # noqa: E501 Creates a Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_post_with_http_info(datacenter_id, network_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer: The Network Load Balancer to create. (required) :type network_load_balancer: NetworkLoadBalancer :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_post`") # noqa: E501 # verify the required parameter 'network_load_balancer' is set if self.api_client.client_side_validation and ('network_load_balancer' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer` when calling `datacenters_networkloadbalancers_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer' in local_var_params: body_params = local_var_params['network_load_balancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_networkloadbalancers_put(self, datacenter_id, network_load_balancer_id, network_load_balancer, **kwargs): # noqa: E501 """Modify Network Load Balancers # noqa: E501 Modify the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_put(datacenter_id, network_load_balancer_id, network_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer: The modified Network Load Balancer. (required) :type network_load_balancer: NetworkLoadBalancerPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: NetworkLoadBalancer """ kwargs['_return_http_data_only'] = True return self.datacenters_networkloadbalancers_put_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer, **kwargs) # noqa: E501 def datacenters_networkloadbalancers_put_with_http_info(self, datacenter_id, network_load_balancer_id, network_load_balancer, **kwargs): # noqa: E501 """Modify Network Load Balancers # noqa: E501 Modify the properties of the specified Network Load Balancer within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_networkloadbalancers_put_with_http_info(datacenter_id, network_load_balancer_id, network_load_balancer, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param network_load_balancer_id: The unique ID of the Network Load Balancer. (required) :type network_load_balancer_id: str :param network_load_balancer: The modified Network Load Balancer. (required) :type network_load_balancer: NetworkLoadBalancerPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(NetworkLoadBalancer, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'network_load_balancer_id', 'network_load_balancer', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_networkloadbalancers_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_networkloadbalancers_put`") # noqa: E501 # verify the required parameter 'network_load_balancer_id' is set if self.api_client.client_side_validation and ('network_load_balancer_id' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer_id` when calling `datacenters_networkloadbalancers_put`") # noqa: E501 # verify the required parameter 'network_load_balancer' is set if self.api_client.client_side_validation and ('network_load_balancer' not in local_var_params or # noqa: E501 local_var_params['network_load_balancer'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `network_load_balancer` when calling `datacenters_networkloadbalancers_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_networkloadbalancers_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'network_load_balancer_id' in local_var_params: path_params['networkLoadBalancerId'] = local_var_params['network_load_balancer_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'network_load_balancer' in local_var_params: body_params = local_var_params['network_load_balancer'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'NetworkLoadBalancer' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/private_cross_connects_api.py0000644000175100001660000013450215046550312024302 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class PrivateCrossConnectsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def pccs_delete(self, pcc_id, **kwargs): # noqa: E501 """Delete Private Cross-Connects # noqa: E501 Remove the specified Cross Connect. Cross connect can be deleted only if it is not connected to any LANs. For non administrator users a cross connect can be deleted only if you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_delete(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.pccs_delete_with_http_info(pcc_id, **kwargs) # noqa: E501 def pccs_delete_with_http_info(self, pcc_id, **kwargs): # noqa: E501 """Delete Private Cross-Connects # noqa: E501 Remove the specified Cross Connect. Cross connect can be deleted only if it is not connected to any LANs. For non administrator users a cross connect can be deleted only if you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_delete_with_http_info(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'pcc_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method pccs_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'pcc_id' is set if self.api_client.client_side_validation and ('pcc_id' not in local_var_params or # noqa: E501 local_var_params['pcc_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pcc_id` when calling `pccs_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'pcc_id' in local_var_params: path_params['pccId'] = local_var_params['pcc_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/pccs/{pccId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def pccs_find_by_id(self, pcc_id, **kwargs): # noqa: E501 """Retrieve a Cross Connect # noqa: E501 Retrieve a Cross Connect by the resource ID. Cross Connect ID is in the response body when the Cross Connect is created and in the list of Private Cross-Connects, returned by GET. For contract owner and administrators all Private Cross-Connects in your contract can be retrieved. For non administrator users it only returns the cross connects you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_find_by_id(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: PrivateCrossConnect """ kwargs['_return_http_data_only'] = True return self.pccs_find_by_id_with_http_info(pcc_id, **kwargs) # noqa: E501 def pccs_find_by_id_with_http_info(self, pcc_id, **kwargs): # noqa: E501 """Retrieve a Cross Connect # noqa: E501 Retrieve a Cross Connect by the resource ID. Cross Connect ID is in the response body when the Cross Connect is created and in the list of Private Cross-Connects, returned by GET. For contract owner and administrators all Private Cross-Connects in your contract can be retrieved. For non administrator users it only returns the cross connects you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_find_by_id_with_http_info(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PrivateCrossConnect, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pcc_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method pccs_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'pcc_id' is set if self.api_client.client_side_validation and ('pcc_id' not in local_var_params or # noqa: E501 local_var_params['pcc_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pcc_id` when calling `pccs_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'pcc_id' in local_var_params: path_params['pccId'] = local_var_params['pcc_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'PrivateCrossConnect' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/pccs/{pccId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def pccs_get(self, **kwargs): # noqa: E501 """List Private Cross-Connects # noqa: E501 List all Private Cross-Connects. For contract owner and administrators it returns all Private Cross-Connects in your contract. For non administrator users it only returns the Private Cross-Connects you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: PrivateCrossConnects """ kwargs['_return_http_data_only'] = True return self.pccs_get_with_http_info(**kwargs) # noqa: E501 def pccs_get_with_http_info(self, **kwargs): # noqa: E501 """List Private Cross-Connects # noqa: E501 List all Private Cross-Connects. For contract owner and administrators it returns all Private Cross-Connects in your contract. For non administrator users it only returns the Private Cross-Connects you are granted access via the user groups you are member of. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PrivateCrossConnects, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method pccs_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'PrivateCrossConnects' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/pccs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def pccs_patch(self, pcc_id, pcc, **kwargs): # noqa: E501 """Partially modify a Private Cross-Connects # noqa: E501 Update the properties of the specified Cross Connect.For non administrator users you can only update the Private Cross-Connects you are granted access via the user groups you are member of # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_patch(pcc_id, pcc, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pcc: The properties of the Cross Connect to be updated. (required) :type pcc: PrivateCrossConnectProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: PrivateCrossConnect """ kwargs['_return_http_data_only'] = True return self.pccs_patch_with_http_info(pcc_id, pcc, **kwargs) # noqa: E501 def pccs_patch_with_http_info(self, pcc_id, pcc, **kwargs): # noqa: E501 """Partially modify a Private Cross-Connects # noqa: E501 Update the properties of the specified Cross Connect.For non administrator users you can only update the Private Cross-Connects you are granted access via the user groups you are member of # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_patch_with_http_info(pcc_id, pcc, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the Cross Connect. (required) :type pcc_id: str :param pcc: The properties of the Cross Connect to be updated. (required) :type pcc: PrivateCrossConnectProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PrivateCrossConnect, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pcc_id', 'pcc', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method pccs_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'pcc_id' is set if self.api_client.client_side_validation and ('pcc_id' not in local_var_params or # noqa: E501 local_var_params['pcc_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pcc_id` when calling `pccs_patch`") # noqa: E501 # verify the required parameter 'pcc' is set if self.api_client.client_side_validation and ('pcc' not in local_var_params or # noqa: E501 local_var_params['pcc'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pcc` when calling `pccs_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'pcc_id' in local_var_params: path_params['pccId'] = local_var_params['pcc_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'pcc' in local_var_params: body_params = local_var_params['pcc'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'PrivateCrossConnect' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/pccs/{pccId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def pccs_post(self, pcc, **kwargs): # noqa: E501 """Create a Cross Connect # noqa: E501 Creates a Cross-Connect. Only contract owners, administrators and users with createPcc user privilege can create a cross connect. Please note that connecting a LAN to a cross connect is to be done via the /lan endpoint. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_post(pcc, async_req=True) >>> result = thread.get() :param pcc: The Cross Connect to create. (required) :type pcc: PrivateCrossConnect :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: PrivateCrossConnect """ kwargs['_return_http_data_only'] = True return self.pccs_post_with_http_info(pcc, **kwargs) # noqa: E501 def pccs_post_with_http_info(self, pcc, **kwargs): # noqa: E501 """Create a Cross Connect # noqa: E501 Creates a Cross-Connect. Only contract owners, administrators and users with createPcc user privilege can create a cross connect. Please note that connecting a LAN to a cross connect is to be done via the /lan endpoint. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pccs_post_with_http_info(pcc, async_req=True) >>> result = thread.get() :param pcc: The Cross Connect to create. (required) :type pcc: PrivateCrossConnect :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PrivateCrossConnect, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pcc', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method pccs_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'pcc' is set if self.api_client.client_side_validation and ('pcc' not in local_var_params or # noqa: E501 local_var_params['pcc'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pcc` when calling `pccs_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `pccs_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'pcc' in local_var_params: body_params = local_var_params['pcc'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'PrivateCrossConnect' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/pccs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/requests_api.py0000644000175100001660000011010315046550312021365 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class RequestsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def requests_find_by_id(self, request_id, **kwargs): # noqa: E501 """Retrieve requests # noqa: E501 Retrieve the properties of the specified request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_find_by_id(request_id, async_req=True) >>> result = thread.get() :param request_id: The unique ID of the request. (required) :type request_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Request """ kwargs['_return_http_data_only'] = True return self.requests_find_by_id_with_http_info(request_id, **kwargs) # noqa: E501 def requests_find_by_id_with_http_info(self, request_id, **kwargs): # noqa: E501 """Retrieve requests # noqa: E501 Retrieve the properties of the specified request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_find_by_id_with_http_info(request_id, async_req=True) >>> result = thread.get() :param request_id: The unique ID of the request. (required) :type request_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Request, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'request_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method requests_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'request_id' is set if self.api_client.client_side_validation and ('request_id' not in local_var_params or # noqa: E501 local_var_params['request_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `request_id` when calling `requests_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'request_id' in local_var_params: path_params['requestId'] = local_var_params['request_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Request' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/requests/{requestId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def requests_get(self, **kwargs): # noqa: E501 """List requests # noqa: E501 List all API requests. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param filter_status: Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. :type filter_status: str :param filter_created_after: Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. :type filter_created_after: str :param filter_created_before: Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. :type filter_created_before: str :param filter_created_date: Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_created_date: str :param filter_created_by: Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_created_by: str :param filter_etag: Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_etag: str :param filter_request_status: Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_request_status: str :param filter_method: Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_method: str :param filter_headers: Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_headers: str :param filter_body: Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_body: str :param filter_url: Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_url: str :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Requests """ kwargs['_return_http_data_only'] = True return self.requests_get_with_http_info(**kwargs) # noqa: E501 def requests_get_with_http_info(self, **kwargs): # noqa: E501 """List requests # noqa: E501 List all API requests. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param filter_status: Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. :type filter_status: str :param filter_created_after: Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. :type filter_created_after: str :param filter_created_before: Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. :type filter_created_before: str :param filter_created_date: Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_created_date: str :param filter_created_by: Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_created_by: str :param filter_etag: Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_etag: str :param filter_request_status: Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_request_status: str :param filter_method: Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_method: str :param filter_headers: Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_headers: str :param filter_body: Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_body: str :param filter_url: Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. :type filter_url: str :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Requests, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number', 'filter_status', 'filter_created_after', 'filter_created_before', 'filter_created_date', 'filter_created_by', 'filter_etag', 'filter_request_status', 'filter_method', 'filter_headers', 'filter_body', 'filter_url', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method requests_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `requests_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `requests_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `requests_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'filter_status' in local_var_params and local_var_params['filter_status'] is not None: # noqa: E501 query_params.append(('filter.status', local_var_params['filter_status'])) # noqa: E501 if 'filter_created_after' in local_var_params and local_var_params['filter_created_after'] is not None: # noqa: E501 query_params.append(('filter.createdAfter', local_var_params['filter_created_after'])) # noqa: E501 if 'filter_created_before' in local_var_params and local_var_params['filter_created_before'] is not None: # noqa: E501 query_params.append(('filter.createdBefore', local_var_params['filter_created_before'])) # noqa: E501 if 'filter_created_date' in local_var_params and local_var_params['filter_created_date'] is not None: # noqa: E501 query_params.append(('filter.createdDate', local_var_params['filter_created_date'])) # noqa: E501 if 'filter_created_by' in local_var_params and local_var_params['filter_created_by'] is not None: # noqa: E501 query_params.append(('filter.createdBy', local_var_params['filter_created_by'])) # noqa: E501 if 'filter_etag' in local_var_params and local_var_params['filter_etag'] is not None: # noqa: E501 query_params.append(('filter.etag', local_var_params['filter_etag'])) # noqa: E501 if 'filter_request_status' in local_var_params and local_var_params['filter_request_status'] is not None: # noqa: E501 query_params.append(('filter.requestStatus', local_var_params['filter_request_status'])) # noqa: E501 if 'filter_method' in local_var_params and local_var_params['filter_method'] is not None: # noqa: E501 query_params.append(('filter.method', local_var_params['filter_method'])) # noqa: E501 if 'filter_headers' in local_var_params and local_var_params['filter_headers'] is not None: # noqa: E501 query_params.append(('filter.headers', local_var_params['filter_headers'])) # noqa: E501 if 'filter_body' in local_var_params and local_var_params['filter_body'] is not None: # noqa: E501 query_params.append(('filter.body', local_var_params['filter_body'])) # noqa: E501 if 'filter_url' in local_var_params and local_var_params['filter_url'] is not None: # noqa: E501 query_params.append(('filter.url', local_var_params['filter_url'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Requests' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/requests', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def requests_status_get(self, request_id, **kwargs): # noqa: E501 """Retrieve request status # noqa: E501 Retrieve the status of the specified request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_status_get(request_id, async_req=True) >>> result = thread.get() :param request_id: The unique ID of the request. (required) :type request_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: RequestStatus """ kwargs['_return_http_data_only'] = True return self.requests_status_get_with_http_info(request_id, **kwargs) # noqa: E501 def requests_status_get_with_http_info(self, request_id, **kwargs): # noqa: E501 """Retrieve request status # noqa: E501 Retrieve the status of the specified request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.requests_status_get_with_http_info(request_id, async_req=True) >>> result = thread.get() :param request_id: The unique ID of the request. (required) :type request_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(RequestStatus, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'request_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method requests_status_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'request_id' is set if self.api_client.client_side_validation and ('request_id' not in local_var_params or # noqa: E501 local_var_params['request_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `request_id` when calling `requests_status_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_status_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `requests_status_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'request_id' in local_var_params: path_params['requestId'] = local_var_params['request_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'RequestStatus' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/requests/{requestId}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/security_groups_api.py0000644000175100001660000043475115046550312023002 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class SecurityGroupsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_securitygroups_delete(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """Delete a Security Group # noqa: E501 Deletes the specified Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_delete(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_delete_with_http_info(datacenter_id, security_group_id, **kwargs) # noqa: E501 def datacenters_securitygroups_delete_with_http_info(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """Delete a Security Group # noqa: E501 Deletes the specified Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_delete_with_http_info(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_delete`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_find_by_id(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """Retrieve a Security Group # noqa: E501 Retrieves the attributes of a given Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_find_by_id(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroup """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_find_by_id_with_http_info(datacenter_id, security_group_id, **kwargs) # noqa: E501 def datacenters_securitygroups_find_by_id_with_http_info(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """Retrieve a Security Group # noqa: E501 Retrieves the attributes of a given Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_find_by_id_with_http_info(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_find_by_id`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_firewallrules_delete(self, datacenter_id, security_group_id, rule_id, **kwargs): # noqa: E501 """Remove a Firewall Rule from a Security Group # noqa: E501 Removes the specific Firewall Rule from the Security Group and delete the Firewall rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_firewallrules_delete(datacenter_id, security_group_id, rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the firewall rule. (required) :type rule_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_firewallrules_delete_with_http_info(datacenter_id, security_group_id, rule_id, **kwargs) # noqa: E501 def datacenters_securitygroups_firewallrules_delete_with_http_info(self, datacenter_id, security_group_id, rule_id, **kwargs): # noqa: E501 """Remove a Firewall Rule from a Security Group # noqa: E501 Removes the specific Firewall Rule from the Security Group and delete the Firewall rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_firewallrules_delete_with_http_info(datacenter_id, security_group_id, rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the firewall rule. (required) :type rule_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'rule_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_firewallrules_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_firewallrules_delete`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_firewallrules_delete`") # noqa: E501 # verify the required parameter 'rule_id' is set if self.api_client.client_side_validation and ('rule_id' not in local_var_params or # noqa: E501 local_var_params['rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule_id` when calling `datacenters_securitygroups_firewallrules_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 if 'rule_id' in local_var_params: path_params['ruleId'] = local_var_params['rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_firewallrules_post(self, datacenter_id, security_group_id, firewall_rule, **kwargs): # noqa: E501 """Create Firewall rule to a Security Group # noqa: E501 Create one firewall rule and attach it to the existing security group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_firewallrules_post(datacenter_id, security_group_id, firewall_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param firewall_rule: The firewall to be attached (or created and attached). (required) :type firewall_rule: FirewallRule :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_firewallrules_post_with_http_info(datacenter_id, security_group_id, firewall_rule, **kwargs) # noqa: E501 def datacenters_securitygroups_firewallrules_post_with_http_info(self, datacenter_id, security_group_id, firewall_rule, **kwargs): # noqa: E501 """Create Firewall rule to a Security Group # noqa: E501 Create one firewall rule and attach it to the existing security group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_firewallrules_post_with_http_info(datacenter_id, security_group_id, firewall_rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param firewall_rule: The firewall to be attached (or created and attached). (required) :type firewall_rule: FirewallRule :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'firewall_rule' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_firewallrules_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_firewallrules_post`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_firewallrules_post`") # noqa: E501 # verify the required parameter 'firewall_rule' is set if self.api_client.client_side_validation and ('firewall_rule' not in local_var_params or # noqa: E501 local_var_params['firewall_rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `firewall_rule` when calling `datacenters_securitygroups_firewallrules_post`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) header_params = {} form_params = [] local_var_files = {} body_params = None if 'firewall_rule' in local_var_params: body_params = local_var_params['firewall_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_get(self, datacenter_id, **kwargs): # noqa: E501 """List Security Groups # noqa: E501 Retrieve a list of available security groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroups """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_securitygroups_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List Security Groups # noqa: E501 Retrieve a list of available security groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_securitygroups_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_securitygroups_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_securitygroups_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_patch(self, datacenter_id, security_group_id, security_group, **kwargs): # noqa: E501 """Partially modify Security Group # noqa: E501 Modify the properties of the specified Security Group within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_patch(datacenter_id, security_group_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param security_group: The modified Security Group (required) :type security_group: SecurityGroupProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroup """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_patch_with_http_info(datacenter_id, security_group_id, security_group, **kwargs) # noqa: E501 def datacenters_securitygroups_patch_with_http_info(self, datacenter_id, security_group_id, security_group, **kwargs): # noqa: E501 """Partially modify Security Group # noqa: E501 Modify the properties of the specified Security Group within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_patch_with_http_info(datacenter_id, security_group_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param security_group: The modified Security Group (required) :type security_group: SecurityGroupProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'security_group', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_patch`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_patch`") # noqa: E501 # verify the required parameter 'security_group' is set if self.api_client.client_side_validation and ('security_group' not in local_var_params or # noqa: E501 local_var_params['security_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group` when calling `datacenters_securitygroups_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'security_group' in local_var_params: body_params = local_var_params['security_group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_post(self, datacenter_id, security_group, **kwargs): # noqa: E501 """Create a Security Group # noqa: E501 Creates a security group within the data center. This will allow you to define which IP addresses and networks have access to your servers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_post(datacenter_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group: The security group to be created (required) :type security_group: SecurityGroupRequest :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroup """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_post_with_http_info(datacenter_id, security_group, **kwargs) # noqa: E501 def datacenters_securitygroups_post_with_http_info(self, datacenter_id, security_group, **kwargs): # noqa: E501 """Create a Security Group # noqa: E501 Creates a security group within the data center. This will allow you to define which IP addresses and networks have access to your servers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_post_with_http_info(datacenter_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group: The security group to be created (required) :type security_group: SecurityGroupRequest :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_post`") # noqa: E501 # verify the required parameter 'security_group' is set if self.api_client.client_side_validation and ('security_group' not in local_var_params or # noqa: E501 local_var_params['security_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group` when calling `datacenters_securitygroups_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'security_group' in local_var_params: body_params = local_var_params['security_group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_put(self, datacenter_id, security_group_id, security_group, **kwargs): # noqa: E501 """Modify Security Group # noqa: E501 Modify the properties of the specified Security Group within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_put(datacenter_id, security_group_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param security_group: The modified Security Group (required) :type security_group: SecurityGroupRequest :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroup """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_put_with_http_info(datacenter_id, security_group_id, security_group, **kwargs) # noqa: E501 def datacenters_securitygroups_put_with_http_info(self, datacenter_id, security_group_id, security_group, **kwargs): # noqa: E501 """Modify Security Group # noqa: E501 Modify the properties of the specified Security Group within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_put_with_http_info(datacenter_id, security_group_id, security_group, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param security_group: The modified Security Group (required) :type security_group: SecurityGroupRequest :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'security_group', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_put`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_put`") # noqa: E501 # verify the required parameter 'security_group' is set if self.api_client.client_side_validation and ('security_group' not in local_var_params or # noqa: E501 local_var_params['security_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group` when calling `datacenters_securitygroups_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'security_group' in local_var_params: body_params = local_var_params['security_group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_rules_find_by_id(self, datacenter_id, security_group_id, rule_id, **kwargs): # noqa: E501 """Retrieve security group rule by id # noqa: E501 Retrieve the properties of the specified Security Group rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_find_by_id(datacenter_id, security_group_id, rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group rule. (required) :type rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_rules_find_by_id_with_http_info(datacenter_id, security_group_id, rule_id, **kwargs) # noqa: E501 def datacenters_securitygroups_rules_find_by_id_with_http_info(self, datacenter_id, security_group_id, rule_id, **kwargs): # noqa: E501 """Retrieve security group rule by id # noqa: E501 Retrieve the properties of the specified Security Group rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_find_by_id_with_http_info(datacenter_id, security_group_id, rule_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the Security Group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group rule. (required) :type rule_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'rule_id', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_rules_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_rules_find_by_id`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_rules_find_by_id`") # noqa: E501 # verify the required parameter 'rule_id' is set if self.api_client.client_side_validation and ('rule_id' not in local_var_params or # noqa: E501 local_var_params['rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule_id` when calling `datacenters_securitygroups_rules_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 if 'rule_id' in local_var_params: path_params['ruleId'] = local_var_params['rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_rules_get(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """List Security Group rules # noqa: E501 List all rules for the specified Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_get(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRules """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_rules_get_with_http_info(datacenter_id, security_group_id, **kwargs) # noqa: E501 def datacenters_securitygroups_rules_get_with_http_info(self, datacenter_id, security_group_id, **kwargs): # noqa: E501 """List Security Group rules # noqa: E501 List all rules for the specified Security Group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_get_with_http_info(datacenter_id, security_group_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRules, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'pretty', 'depth', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_rules_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_rules_get`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_rules_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_securitygroups_rules_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_securitygroups_rules_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_securitygroups_rules_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRules' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_rules_patch(self, datacenter_id, security_group_id, rule_id, rule, **kwargs): # noqa: E501 """Partially modify Security Group Rules # noqa: E501 Update the properties of the specified Security Group rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_patch(datacenter_id, security_group_id, rule_id, rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group Rule. (required) :type rule_id: str :param rule: The properties of the Security Group Rule to be updated. (required) :type rule: FirewallruleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_rules_patch_with_http_info(datacenter_id, security_group_id, rule_id, rule, **kwargs) # noqa: E501 def datacenters_securitygroups_rules_patch_with_http_info(self, datacenter_id, security_group_id, rule_id, rule, **kwargs): # noqa: E501 """Partially modify Security Group Rules # noqa: E501 Update the properties of the specified Security Group rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_patch_with_http_info(datacenter_id, security_group_id, rule_id, rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group Rule. (required) :type rule_id: str :param rule: The properties of the Security Group Rule to be updated. (required) :type rule: FirewallruleProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'rule_id', 'rule', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_rules_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_rules_patch`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_rules_patch`") # noqa: E501 # verify the required parameter 'rule_id' is set if self.api_client.client_side_validation and ('rule_id' not in local_var_params or # noqa: E501 local_var_params['rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule_id` when calling `datacenters_securitygroups_rules_patch`") # noqa: E501 # verify the required parameter 'rule' is set if self.api_client.client_side_validation and ('rule' not in local_var_params or # noqa: E501 local_var_params['rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule` when calling `datacenters_securitygroups_rules_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 if 'rule_id' in local_var_params: path_params['ruleId'] = local_var_params['rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'rule' in local_var_params: body_params = local_var_params['rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_securitygroups_rules_put(self, datacenter_id, security_group_id, rule_id, rule, **kwargs): # noqa: E501 """Modify a Security Group Rule # noqa: E501 Modifies the properties of the specified Security Group Rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_put(datacenter_id, security_group_id, rule_id, rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group Rule. (required) :type rule_id: str :param rule: The modified Security Group Rule. (required) :type rule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: FirewallRule """ kwargs['_return_http_data_only'] = True return self.datacenters_securitygroups_rules_put_with_http_info(datacenter_id, security_group_id, rule_id, rule, **kwargs) # noqa: E501 def datacenters_securitygroups_rules_put_with_http_info(self, datacenter_id, security_group_id, rule_id, rule, **kwargs): # noqa: E501 """Modify a Security Group Rule # noqa: E501 Modifies the properties of the specified Security Group Rule. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_securitygroups_rules_put_with_http_info(datacenter_id, security_group_id, rule_id, rule, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param security_group_id: The unique ID of the security group. (required) :type security_group_id: str :param rule_id: The unique ID of the Security Group Rule. (required) :type rule_id: str :param rule: The modified Security Group Rule. (required) :type rule: FirewallRule :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(FirewallRule, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'security_group_id', 'rule_id', 'rule', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_securitygroups_rules_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_securitygroups_rules_put`") # noqa: E501 # verify the required parameter 'security_group_id' is set if self.api_client.client_side_validation and ('security_group_id' not in local_var_params or # noqa: E501 local_var_params['security_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `security_group_id` when calling `datacenters_securitygroups_rules_put`") # noqa: E501 # verify the required parameter 'rule_id' is set if self.api_client.client_side_validation and ('rule_id' not in local_var_params or # noqa: E501 local_var_params['rule_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule_id` when calling `datacenters_securitygroups_rules_put`") # noqa: E501 # verify the required parameter 'rule' is set if self.api_client.client_side_validation and ('rule' not in local_var_params or # noqa: E501 local_var_params['rule'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `rule` when calling `datacenters_securitygroups_rules_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_securitygroups_rules_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'security_group_id' in local_var_params: path_params['securityGroupId'] = local_var_params['security_group_id'] # noqa: E501 if 'rule_id' in local_var_params: path_params['ruleId'] = local_var_params['rule_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'rule' in local_var_params: body_params = local_var_params['rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'FirewallRule' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_nics_securitygroups_put(self, datacenter_id, server_id, nic_id, securitygroups, **kwargs): # noqa: E501 """Attach a list of Security Groups to a NIC # noqa: E501 Updating the list of Security Groups attached to an existing NIC specified by its ID. Security Groups should already exist as part of the datacenter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_securitygroups_put(datacenter_id, server_id, nic_id, securitygroups, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the server. (required) :type nic_id: str :param securitygroups: The list of NIC attached Security Groups IDs. (required) :type securitygroups: ListOfIds :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroups """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_nics_securitygroups_put_with_http_info(datacenter_id, server_id, nic_id, securitygroups, **kwargs) # noqa: E501 def datacenters_servers_nics_securitygroups_put_with_http_info(self, datacenter_id, server_id, nic_id, securitygroups, **kwargs): # noqa: E501 """Attach a list of Security Groups to a NIC # noqa: E501 Updating the list of Security Groups attached to an existing NIC specified by its ID. Security Groups should already exist as part of the datacenter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_nics_securitygroups_put_with_http_info(datacenter_id, server_id, nic_id, securitygroups, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param nic_id: The unique ID of the server. (required) :type nic_id: str :param securitygroups: The list of NIC attached Security Groups IDs. (required) :type securitygroups: ListOfIds :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'nic_id', 'securitygroups', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_nics_securitygroups_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_nics_securitygroups_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_nics_securitygroups_put`") # noqa: E501 # verify the required parameter 'nic_id' is set if self.api_client.client_side_validation and ('nic_id' not in local_var_params or # noqa: E501 local_var_params['nic_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `nic_id` when calling `datacenters_servers_nics_securitygroups_put`") # noqa: E501 # verify the required parameter 'securitygroups' is set if self.api_client.client_side_validation and ('securitygroups' not in local_var_params or # noqa: E501 local_var_params['securitygroups'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `securitygroups` when calling `datacenters_servers_nics_securitygroups_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_securitygroups_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_nics_securitygroups_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'nic_id' in local_var_params: path_params['nicId'] = local_var_params['nic_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'securitygroups' in local_var_params: body_params = local_var_params['securitygroups'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_securitygroups_put(self, datacenter_id, server_id, securitygroups, **kwargs): # noqa: E501 """Attach a list of Security Groups to a Server # noqa: E501 Updating the list of Security Groups attached to an existing server specified by its ID. Security Groups should already exist as part of the datacenter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_securitygroups_put(datacenter_id, server_id, securitygroups, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param securitygroups: The list of server attached Security Groups IDs. (required) :type securitygroups: ListOfIds :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: SecurityGroups """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_securitygroups_put_with_http_info(datacenter_id, server_id, securitygroups, **kwargs) # noqa: E501 def datacenters_servers_securitygroups_put_with_http_info(self, datacenter_id, server_id, securitygroups, **kwargs): # noqa: E501 """Attach a list of Security Groups to a Server # noqa: E501 Updating the list of Security Groups attached to an existing server specified by its ID. Security Groups should already exist as part of the datacenter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_securitygroups_put_with_http_info(datacenter_id, server_id, securitygroups, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param securitygroups: The list of server attached Security Groups IDs. (required) :type securitygroups: ListOfIds :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SecurityGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'securitygroups', 'pretty', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_securitygroups_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_securitygroups_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_securitygroups_put`") # noqa: E501 # verify the required parameter 'securitygroups' is set if self.api_client.client_side_validation and ('securitygroups' not in local_var_params or # noqa: E501 local_var_params['securitygroups'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `securitygroups` when calling `datacenters_servers_securitygroups_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_securitygroups_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_securitygroups_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'securitygroups' in local_var_params: body_params = local_var_params['securitygroups'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'SecurityGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/securitygroups', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/servers_api.py0000644000175100001660000072555215046550312021227 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class ServersApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_servers_cdroms_delete(self, datacenter_id, server_id, cdrom_id, **kwargs): # noqa: E501 """Detach a CD-ROM by ID # noqa: E501 Detachs the specified CD-ROM from the server. Detaching a CD-ROM deletes the CD-ROM. The image will not be deleted. Note that detaching a CD-ROM leads to a reset of the server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom_id: The unique ID of the CD-ROM. (required) :type cdrom_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_cdroms_delete_with_http_info(datacenter_id, server_id, cdrom_id, **kwargs) # noqa: E501 def datacenters_servers_cdroms_delete_with_http_info(self, datacenter_id, server_id, cdrom_id, **kwargs): # noqa: E501 """Detach a CD-ROM by ID # noqa: E501 Detachs the specified CD-ROM from the server. Detaching a CD-ROM deletes the CD-ROM. The image will not be deleted. Note that detaching a CD-ROM leads to a reset of the server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_delete_with_http_info(datacenter_id, server_id, cdrom_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom_id: The unique ID of the CD-ROM. (required) :type cdrom_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'cdrom_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_cdroms_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_cdroms_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_cdroms_delete`") # noqa: E501 # verify the required parameter 'cdrom_id' is set if self.api_client.client_side_validation and ('cdrom_id' not in local_var_params or # noqa: E501 local_var_params['cdrom_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `cdrom_id` when calling `datacenters_servers_cdroms_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'cdrom_id' in local_var_params: path_params['cdromId'] = local_var_params['cdrom_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_cdroms_find_by_id(self, datacenter_id, server_id, cdrom_id, **kwargs): # noqa: E501 """Get Attached CD-ROM by ID # noqa: E501 Retrieves the properties of the CD-ROM attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom_id: The unique ID of the CD-ROM. (required) :type cdrom_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Image """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_cdroms_find_by_id_with_http_info(datacenter_id, server_id, cdrom_id, **kwargs) # noqa: E501 def datacenters_servers_cdroms_find_by_id_with_http_info(self, datacenter_id, server_id, cdrom_id, **kwargs): # noqa: E501 """Get Attached CD-ROM by ID # noqa: E501 Retrieves the properties of the CD-ROM attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_find_by_id_with_http_info(datacenter_id, server_id, cdrom_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom_id: The unique ID of the CD-ROM. (required) :type cdrom_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'cdrom_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_cdroms_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_cdroms_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_cdroms_find_by_id`") # noqa: E501 # verify the required parameter 'cdrom_id' is set if self.api_client.client_side_validation and ('cdrom_id' not in local_var_params or # noqa: E501 local_var_params['cdrom_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `cdrom_id` when calling `datacenters_servers_cdroms_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'cdrom_id' in local_var_params: path_params['cdromId'] = local_var_params['cdrom_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Image' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_cdroms_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Attached CD-ROMs # noqa: E501 Lists all CD-ROMs attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Cdroms """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_cdroms_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_cdroms_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Attached CD-ROMs # noqa: E501 Lists all CD-ROMs attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Cdroms, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_cdroms_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_cdroms_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_cdroms_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_cdroms_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_cdroms_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_cdroms_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Cdroms' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/cdroms', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_cdroms_post(self, datacenter_id, server_id, cdrom, **kwargs): # noqa: E501 """Attach a CD-ROM # noqa: E501 Attachs a CD-ROM to an existing server specified by its ID. CD-ROMs cannot be created stand-alone like volumes. They are either attached to a server or do not exist. They always have an ISO-Image associated; empty CD-ROMs can not be provisioned. It is possible to attach up to two CD-ROMs to the same server. Note that attaching a CD-ROM leads to a reset of the server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom: The CD-ROM to be attached. (required) :type cdrom: Image :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Image """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_cdroms_post_with_http_info(datacenter_id, server_id, cdrom, **kwargs) # noqa: E501 def datacenters_servers_cdroms_post_with_http_info(self, datacenter_id, server_id, cdrom, **kwargs): # noqa: E501 """Attach a CD-ROM # noqa: E501 Attachs a CD-ROM to an existing server specified by its ID. CD-ROMs cannot be created stand-alone like volumes. They are either attached to a server or do not exist. They always have an ISO-Image associated; empty CD-ROMs can not be provisioned. It is possible to attach up to two CD-ROMs to the same server. Note that attaching a CD-ROM leads to a reset of the server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_cdroms_post_with_http_info(datacenter_id, server_id, cdrom, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param cdrom: The CD-ROM to be attached. (required) :type cdrom: Image :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'cdrom', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_cdroms_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_cdroms_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_cdroms_post`") # noqa: E501 # verify the required parameter 'cdrom' is set if self.api_client.client_side_validation and ('cdrom' not in local_var_params or # noqa: E501 local_var_params['cdrom'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `cdrom` when calling `datacenters_servers_cdroms_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_cdroms_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'cdrom' in local_var_params: body_params = local_var_params['cdrom'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Image' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/cdroms', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_delete(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Delete servers # noqa: E501 Delete the specified server in your data center. The attached storage volumes will also be removed if the query parameter is set to true otherwise a separate API call must be made for these actions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_delete(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param delete_volumes: If true, all attached storage volumes will also be deleted. :type delete_volumes: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_delete_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_delete_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Delete servers # noqa: E501 Delete the specified server in your data center. The attached storage volumes will also be removed if the query parameter is set to true otherwise a separate API call must be made for these actions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_delete_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param delete_volumes: If true, all attached storage volumes will also be deleted. :type delete_volumes: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number', 'delete_volumes' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'delete_volumes' in local_var_params and local_var_params['delete_volumes'] is not None: # noqa: E501 query_params.append(('deleteVolumes', local_var_params['delete_volumes'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_find_by_id(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Retrieve servers by ID # noqa: E501 Retrieve information about the specified server within the data center, such as its configuration, provisioning status, and so on. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_find_by_id(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Server """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_find_by_id_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_find_by_id_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Retrieve servers by ID # noqa: E501 Retrieve information about the specified server within the data center, such as its configuration, provisioning status, and so on. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_find_by_id_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Server, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Server' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_get(self, datacenter_id, **kwargs): # noqa: E501 """List servers # noqa: E501 List all servers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Servers """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_servers_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List servers # noqa: E501 List all servers within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Servers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Servers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_patch(self, datacenter_id, server_id, server, **kwargs): # noqa: E501 """Partially modify servers # noqa: E501 Update the properties of the specified server within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_patch(datacenter_id, server_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param server: The properties of the server to be updated. (required) :type server: ServerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Server """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_patch_with_http_info(datacenter_id, server_id, server, **kwargs) # noqa: E501 def datacenters_servers_patch_with_http_info(self, datacenter_id, server_id, server, **kwargs): # noqa: E501 """Partially modify servers # noqa: E501 Update the properties of the specified server within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_patch_with_http_info(datacenter_id, server_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param server: The properties of the server to be updated. (required) :type server: ServerProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Server, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'server', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_patch`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_patch`") # noqa: E501 # verify the required parameter 'server' is set if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 local_var_params['server'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server` when calling `datacenters_servers_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'server' in local_var_params: body_params = local_var_params['server'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Server' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_post(self, datacenter_id, server, **kwargs): # noqa: E501 """Create a Server # noqa: E501 Creates a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_post(datacenter_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server: The server to create. (required) :type server: Server :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Server """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_post_with_http_info(datacenter_id, server, **kwargs) # noqa: E501 def datacenters_servers_post_with_http_info(self, datacenter_id, server, **kwargs): # noqa: E501 """Create a Server # noqa: E501 Creates a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_post_with_http_info(datacenter_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server: The server to create. (required) :type server: Server :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Server, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_post`") # noqa: E501 # verify the required parameter 'server' is set if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 local_var_params['server'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server` when calling `datacenters_servers_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'server' in local_var_params: body_params = local_var_params['server'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Server' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_put(self, datacenter_id, server_id, server, **kwargs): # noqa: E501 """Modify a Server by ID # noqa: E501 Modifies the properties of the specified server within the data center. Starting with v5, the 'allowReboot' attribute is retired; while previously required for changing certain server properties, this behavior is now implicit, and the backend will perform this automatically. For example, in earlier versions, when the CPU family is changed, 'allowReboot' had to be set to 'true'; this is no longer required, the reboot will be performed automatically. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_put(datacenter_id, server_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param server: The modified server (required) :type server: Server :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Server """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_put_with_http_info(datacenter_id, server_id, server, **kwargs) # noqa: E501 def datacenters_servers_put_with_http_info(self, datacenter_id, server_id, server, **kwargs): # noqa: E501 """Modify a Server by ID # noqa: E501 Modifies the properties of the specified server within the data center. Starting with v5, the 'allowReboot' attribute is retired; while previously required for changing certain server properties, this behavior is now implicit, and the backend will perform this automatically. For example, in earlier versions, when the CPU family is changed, 'allowReboot' had to be set to 'true'; this is no longer required, the reboot will be performed automatically. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_put_with_http_info(datacenter_id, server_id, server, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param server: The modified server (required) :type server: Server :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Server, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'server', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_put`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_put`") # noqa: E501 # verify the required parameter 'server' is set if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 local_var_params['server'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server` when calling `datacenters_servers_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'server' in local_var_params: body_params = local_var_params['server'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Server' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_reboot_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Reboot servers # noqa: E501 Force a hard reboot of the specified server within the data center. Don't use this method if you wish to reboot gracefully. This is an equivalent of powering down a computer and turning it back on. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_reboot_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_reboot_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_reboot_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Reboot servers # noqa: E501 Force a hard reboot of the specified server within the data center. Don't use this method if you wish to reboot gracefully. This is an equivalent of powering down a computer and turning it back on. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_reboot_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_reboot_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_reboot_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_reboot_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_reboot_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_reboot_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/reboot', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_remote_console_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Remote Console link # noqa: E501 Retrieve a link with a JSON Web Token for accessing the server's Remote Console. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_remote_console_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: RemoteConsoleUrl """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_remote_console_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_remote_console_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Remote Console link # noqa: E501 Retrieve a link with a JSON Web Token for accessing the server's Remote Console. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_remote_console_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(RemoteConsoleUrl, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_remote_console_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_remote_console_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_remote_console_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_remote_console_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_remote_console_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'RemoteConsoleUrl' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/remoteconsole', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_resume_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Resume a Cube Server by ID # noqa: E501 Resumes a suspended Cube Server specified by its ID. Since the suspended instance was not deleted the allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_resume_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_resume_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_resume_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Resume a Cube Server by ID # noqa: E501 Resumes a suspended Cube Server specified by its ID. Since the suspended instance was not deleted the allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_resume_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_resume_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_resume_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_resume_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_resume_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_resume_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/resume', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_start_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Start an Enterprise Server by ID # noqa: E501 Starts the Enterprise Server specified by its ID. >Note that you cannot use this method to start a Cube Server. By starting the Enterprise Server, cores and RAM are provisioned, and the billing continues. If the server's public IPv4 address has been deallocated, a new IPv4 address will be assigned. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_start_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_start_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_start_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Start an Enterprise Server by ID # noqa: E501 Starts the Enterprise Server specified by its ID. >Note that you cannot use this method to start a Cube Server. By starting the Enterprise Server, cores and RAM are provisioned, and the billing continues. If the server's public IPv4 address has been deallocated, a new IPv4 address will be assigned. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_start_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_start_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_start_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_start_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_start_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_start_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/start', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_stop_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Stop an Enterprise Server by ID # noqa: E501 Stops the Enterprise Server specified by its ID. >Note that you cannot use this method to stop a Cube Server. By stopping the Enterprise Server, cores and RAM are freed and no longer charged. Public IPv4 IPs that are not reserved are returned to the IPv4 pool. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_stop_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_stop_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_stop_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Stop an Enterprise Server by ID # noqa: E501 Stops the Enterprise Server specified by its ID. >Note that you cannot use this method to stop a Cube Server. By stopping the Enterprise Server, cores and RAM are freed and no longer charged. Public IPv4 IPs that are not reserved are returned to the IPv4 pool. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_stop_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_stop_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_stop_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_stop_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_stop_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_stop_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/stop', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_suspend_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Suspend a Cube Server by ID # noqa: E501 Suspends the specified Cubes instance within the data center. The instance is not deleted and allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_suspend_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_suspend_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_suspend_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Suspend a Cube Server by ID # noqa: E501 Suspends the specified Cubes instance within the data center. The instance is not deleted and allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_suspend_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_suspend_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_suspend_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_suspend_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_suspend_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_suspend_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/suspend', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_token_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get JSON Web Token # noqa: E501 Retrieve a JSON Web Token from the server for use in login operations (such as accessing the server's console). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_token_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Token """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_token_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_token_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get JSON Web Token # noqa: E501 Retrieve a JSON Web Token from the server for use in login operations (such as accessing the server's console). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_token_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Token, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_token_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_token_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_token_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_token_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_token_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Token' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/token', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_upgrade_post(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Upgrade a Server by ID # noqa: E501 Upgrades the server version. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_upgrade_post(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_upgrade_post_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_upgrade_post_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Upgrade a Server by ID # noqa: E501 Upgrades the server version. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_upgrade_post_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_upgrade_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_upgrade_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_upgrade_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_upgrade_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_upgrade_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/upgrade', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_volumes_delete(self, datacenter_id, server_id, volume_id, **kwargs): # noqa: E501 """Detach a Volume by ID # noqa: E501 Detachs the specified volume from the server. Note that only the volume's connection to the specified server is disconnected. If you want to delete the volume, you must submit a separate request to perform the deletion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_delete(datacenter_id, server_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_volumes_delete_with_http_info(datacenter_id, server_id, volume_id, **kwargs) # noqa: E501 def datacenters_servers_volumes_delete_with_http_info(self, datacenter_id, server_id, volume_id, **kwargs): # noqa: E501 """Detach a Volume by ID # noqa: E501 Detachs the specified volume from the server. Note that only the volume's connection to the specified server is disconnected. If you want to delete the volume, you must submit a separate request to perform the deletion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_delete_with_http_info(datacenter_id, server_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'volume_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_volumes_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_volumes_delete`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_volumes_delete`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_servers_volumes_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_volumes_find_by_id(self, datacenter_id, server_id, volume_id, **kwargs): # noqa: E501 """Get Attached Volume by ID # noqa: E501 Retrieves the properties of the volume attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_find_by_id(datacenter_id, server_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_volumes_find_by_id_with_http_info(datacenter_id, server_id, volume_id, **kwargs) # noqa: E501 def datacenters_servers_volumes_find_by_id_with_http_info(self, datacenter_id, server_id, volume_id, **kwargs): # noqa: E501 """Get Attached Volume by ID # noqa: E501 Retrieves the properties of the volume attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_find_by_id_with_http_info(datacenter_id, server_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'volume_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_volumes_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_volumes_find_by_id`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_volumes_find_by_id`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_servers_volumes_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_volumes_get(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Attached Volumes # noqa: E501 Lists all volumes attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_get(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: AttachedVolumes """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_volumes_get_with_http_info(datacenter_id, server_id, **kwargs) # noqa: E501 def datacenters_servers_volumes_get_with_http_info(self, datacenter_id, server_id, **kwargs): # noqa: E501 """Get Attached Volumes # noqa: E501 Lists all volumes attached to the specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_get_with_http_info(datacenter_id, server_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(AttachedVolumes, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_volumes_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_volumes_get`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_volumes_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_servers_volumes_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_volumes_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_servers_volumes_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'AttachedVolumes' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/volumes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_servers_volumes_post(self, datacenter_id, server_id, volume, **kwargs): # noqa: E501 """Attach a Volume to a Server # noqa: E501 Attachs an existing storage volume to the specified server. You can attach an existing volume in the VDC to a server. To move a volume from one server to another, you must first detach the volume from the first server and attach it to the second server. It is also possible to create and attach a volume in one step by simply providing a new volume description as a payload. The only difference is the URL; see 'Creating a Volume' for details about volumes. Note that the combined total of attached volumes and NICs cannot exceed 24 per server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_post(datacenter_id, server_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume: The volume to be attached (or created and attached). (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_servers_volumes_post_with_http_info(datacenter_id, server_id, volume, **kwargs) # noqa: E501 def datacenters_servers_volumes_post_with_http_info(self, datacenter_id, server_id, volume, **kwargs): # noqa: E501 """Attach a Volume to a Server # noqa: E501 Attachs an existing storage volume to the specified server. You can attach an existing volume in the VDC to a server. To move a volume from one server to another, you must first detach the volume from the first server and attach it to the second server. It is also possible to create and attach a volume in one step by simply providing a new volume description as a payload. The only difference is the URL; see 'Creating a Volume' for details about volumes. Note that the combined total of attached volumes and NICs cannot exceed 24 per server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_servers_volumes_post_with_http_info(datacenter_id, server_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param server_id: The unique ID of the server. (required) :type server_id: str :param volume: The volume to be attached (or created and attached). (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'server_id', 'volume', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_servers_volumes_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_servers_volumes_post`") # noqa: E501 # verify the required parameter 'server_id' is set if self.api_client.client_side_validation and ('server_id' not in local_var_params or # noqa: E501 local_var_params['server_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `server_id` when calling `datacenters_servers_volumes_post`") # noqa: E501 # verify the required parameter 'volume' is set if self.api_client.client_side_validation and ('volume' not in local_var_params or # noqa: E501 local_var_params['volume'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume` when calling `datacenters_servers_volumes_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_servers_volumes_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'server_id' in local_var_params: path_params['serverId'] = local_var_params['server_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'volume' in local_var_params: body_params = local_var_params['volume'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/servers/{serverId}/volumes', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/snapshots_api.py0000644000175100001660000013253415046550312021550 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class SnapshotsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def snapshots_delete(self, snapshot_id, **kwargs): # noqa: E501 """Delete snapshots # noqa: E501 Deletes the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_delete(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.snapshots_delete_with_http_info(snapshot_id, **kwargs) # noqa: E501 def snapshots_delete_with_http_info(self, snapshot_id, **kwargs): # noqa: E501 """Delete snapshots # noqa: E501 Deletes the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_delete_with_http_info(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'snapshot_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_find_by_id(self, snapshot_id, **kwargs): # noqa: E501 """Retrieve snapshots by ID # noqa: E501 Retrieve the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_find_by_id(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Snapshot """ kwargs['_return_http_data_only'] = True return self.snapshots_find_by_id_with_http_info(snapshot_id, **kwargs) # noqa: E501 def snapshots_find_by_id_with_http_info(self, snapshot_id, **kwargs): # noqa: E501 """Retrieve snapshots by ID # noqa: E501 Retrieve the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_find_by_id_with_http_info(snapshot_id, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Snapshot' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_get(self, **kwargs): # noqa: E501 """List snapshots # noqa: E501 List all available snapshots. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Snapshots """ kwargs['_return_http_data_only'] = True return self.snapshots_get_with_http_info(**kwargs) # noqa: E501 def snapshots_get_with_http_info(self, **kwargs): # noqa: E501 """List snapshots # noqa: E501 List all available snapshots. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Snapshots, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Snapshots' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_patch(self, snapshot_id, snapshot, **kwargs): # noqa: E501 """Partially modify snapshots # noqa: E501 Update the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_patch(snapshot_id, snapshot, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param snapshot: The properties of the snapshot to be updated. (required) :type snapshot: SnapshotProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Snapshot """ kwargs['_return_http_data_only'] = True return self.snapshots_patch_with_http_info(snapshot_id, snapshot, **kwargs) # noqa: E501 def snapshots_patch_with_http_info(self, snapshot_id, snapshot, **kwargs): # noqa: E501 """Partially modify snapshots # noqa: E501 Update the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_patch_with_http_info(snapshot_id, snapshot, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param snapshot: The properties of the snapshot to be updated. (required) :type snapshot: SnapshotProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'snapshot', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_patch`") # noqa: E501 # verify the required parameter 'snapshot' is set if self.api_client.client_side_validation and ('snapshot' not in local_var_params or # noqa: E501 local_var_params['snapshot'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot` when calling `snapshots_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'snapshot' in local_var_params: body_params = local_var_params['snapshot'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Snapshot' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def snapshots_put(self, snapshot_id, snapshot, **kwargs): # noqa: E501 """Modify a Snapshot by ID # noqa: E501 Modifies the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_put(snapshot_id, snapshot, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param snapshot: The modified snapshot (required) :type snapshot: Snapshot :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Snapshot """ kwargs['_return_http_data_only'] = True return self.snapshots_put_with_http_info(snapshot_id, snapshot, **kwargs) # noqa: E501 def snapshots_put_with_http_info(self, snapshot_id, snapshot, **kwargs): # noqa: E501 """Modify a Snapshot by ID # noqa: E501 Modifies the properties of the specified snapshot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.snapshots_put_with_http_info(snapshot_id, snapshot, async_req=True) >>> result = thread.get() :param snapshot_id: The unique ID of the snapshot. (required) :type snapshot_id: str :param snapshot: The modified snapshot (required) :type snapshot: Snapshot :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'snapshot_id', 'snapshot', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method snapshots_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'snapshot_id' is set if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 local_var_params['snapshot_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot_id` when calling `snapshots_put`") # noqa: E501 # verify the required parameter 'snapshot' is set if self.api_client.client_side_validation and ('snapshot' not in local_var_params or # noqa: E501 local_var_params['snapshot'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `snapshot` when calling `snapshots_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `snapshots_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'snapshot_id' in local_var_params: path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'snapshot' in local_var_params: body_params = local_var_params['snapshot'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Snapshot' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/snapshots/{snapshotId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/target_groups_api.py0000644000175100001660000016342715046550312022420 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class TargetGroupsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def target_groups_delete(self, target_group_id, **kwargs): # noqa: E501 """Delete a Target Group by ID # noqa: E501 Deletes the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.target_groups_delete(target_group_id, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.target_groups_delete_with_http_info(target_group_id, **kwargs) # noqa: E501 def target_groups_delete_with_http_info(self, target_group_id, **kwargs): # noqa: E501 """Delete a Target Group by ID # noqa: E501 Deletes the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.target_groups_delete_with_http_info(target_group_id, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'target_group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method target_groups_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'target_group_id' is set if self.api_client.client_side_validation and ('target_group_id' not in local_var_params or # noqa: E501 local_var_params['target_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group_id` when calling `target_groups_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `target_groups_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `target_groups_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'target_group_id' in local_var_params: path_params['targetGroupId'] = local_var_params['target_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups/{targetGroupId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def targetgroups_find_by_target_group_id(self, target_group_id, **kwargs): # noqa: E501 """Get a Target Group by ID # noqa: E501 Retrieves the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_find_by_target_group_id(target_group_id, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: TargetGroup """ kwargs['_return_http_data_only'] = True return self.targetgroups_find_by_target_group_id_with_http_info(target_group_id, **kwargs) # noqa: E501 def targetgroups_find_by_target_group_id_with_http_info(self, target_group_id, **kwargs): # noqa: E501 """Get a Target Group by ID # noqa: E501 Retrieves the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_find_by_target_group_id_with_http_info(target_group_id, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(TargetGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'target_group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method targetgroups_find_by_target_group_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'target_group_id' is set if self.api_client.client_side_validation and ('target_group_id' not in local_var_params or # noqa: E501 local_var_params['target_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group_id` when calling `targetgroups_find_by_target_group_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_find_by_target_group_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_find_by_target_group_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'target_group_id' in local_var_params: path_params['targetGroupId'] = local_var_params['target_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'TargetGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups/{targetGroupId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def targetgroups_get(self, **kwargs): # noqa: E501 """Get Target Groups # noqa: E501 Lists target groups. A target group is a set of one or more registered targets. You must specify an IP address, a port number, and a weight for each target. Any object with an IP address in your VDC can be a target, for example, a VM, another load balancer, etc. You can register a target with multiple target groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (used together with offset for pagination). It must not exceed 200. :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: TargetGroups """ kwargs['_return_http_data_only'] = True return self.targetgroups_get_with_http_info(**kwargs) # noqa: E501 def targetgroups_get_with_http_info(self, **kwargs): # noqa: E501 """Get Target Groups # noqa: E501 Lists target groups. A target group is a set of one or more registered targets. You must specify an IP address, a port number, and a weight for each target. Any object with an IP address in your VDC can be a target, for example, a VM, another load balancer, etc. You can register a target with multiple target groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (used together with offset for pagination). It must not exceed 200. :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(TargetGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method targetgroups_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `targetgroups_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `targetgroups_get`, must be a value less than or equal to `200`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `targetgroups_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'TargetGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def targetgroups_patch(self, target_group_id, target_group_properties, **kwargs): # noqa: E501 """Partially Modify a Target Group by ID # noqa: E501 Updates the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_patch(target_group_id, target_group_properties, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param target_group_properties: The target group properties to be updated. (required) :type target_group_properties: TargetGroupProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: TargetGroup """ kwargs['_return_http_data_only'] = True return self.targetgroups_patch_with_http_info(target_group_id, target_group_properties, **kwargs) # noqa: E501 def targetgroups_patch_with_http_info(self, target_group_id, target_group_properties, **kwargs): # noqa: E501 """Partially Modify a Target Group by ID # noqa: E501 Updates the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_patch_with_http_info(target_group_id, target_group_properties, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param target_group_properties: The target group properties to be updated. (required) :type target_group_properties: TargetGroupProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(TargetGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'target_group_id', 'target_group_properties', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method targetgroups_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'target_group_id' is set if self.api_client.client_side_validation and ('target_group_id' not in local_var_params or # noqa: E501 local_var_params['target_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group_id` when calling `targetgroups_patch`") # noqa: E501 # verify the required parameter 'target_group_properties' is set if self.api_client.client_side_validation and ('target_group_properties' not in local_var_params or # noqa: E501 local_var_params['target_group_properties'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group_properties` when calling `targetgroups_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'target_group_id' in local_var_params: path_params['targetGroupId'] = local_var_params['target_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'target_group_properties' in local_var_params: body_params = local_var_params['target_group_properties'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'TargetGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups/{targetGroupId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def targetgroups_post(self, target_group, **kwargs): # noqa: E501 """Create a Target Group # noqa: E501 Creates a target group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_post(target_group, async_req=True) >>> result = thread.get() :param target_group: The target group to create. (required) :type target_group: TargetGroup :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: TargetGroup """ kwargs['_return_http_data_only'] = True return self.targetgroups_post_with_http_info(target_group, **kwargs) # noqa: E501 def targetgroups_post_with_http_info(self, target_group, **kwargs): # noqa: E501 """Create a Target Group # noqa: E501 Creates a target group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_post_with_http_info(target_group, async_req=True) >>> result = thread.get() :param target_group: The target group to create. (required) :type target_group: TargetGroup :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(TargetGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'target_group', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method targetgroups_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'target_group' is set if self.api_client.client_side_validation and ('target_group' not in local_var_params or # noqa: E501 local_var_params['target_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group` when calling `targetgroups_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'target_group' in local_var_params: body_params = local_var_params['target_group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'TargetGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def targetgroups_put(self, target_group_id, target_group, **kwargs): # noqa: E501 """Modify a Target Group by ID # noqa: E501 Modifies the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_put(target_group_id, target_group, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param target_group: The modified target group. (required) :type target_group: TargetGroupPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: TargetGroup """ kwargs['_return_http_data_only'] = True return self.targetgroups_put_with_http_info(target_group_id, target_group, **kwargs) # noqa: E501 def targetgroups_put_with_http_info(self, target_group_id, target_group, **kwargs): # noqa: E501 """Modify a Target Group by ID # noqa: E501 Modifies the properties of the target group specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.targetgroups_put_with_http_info(target_group_id, target_group, async_req=True) >>> result = thread.get() :param target_group_id: The unique ID of the target group. (required) :type target_group_id: str :param target_group: The modified target group. (required) :type target_group: TargetGroupPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(TargetGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'target_group_id', 'target_group', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method targetgroups_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'target_group_id' is set if self.api_client.client_side_validation and ('target_group_id' not in local_var_params or # noqa: E501 local_var_params['target_group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group_id` when calling `targetgroups_put`") # noqa: E501 # verify the required parameter 'target_group' is set if self.api_client.client_side_validation and ('target_group' not in local_var_params or # noqa: E501 local_var_params['target_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `target_group` when calling `targetgroups_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `targetgroups_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'target_group_id' in local_var_params: path_params['targetGroupId'] = local_var_params['target_group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'target_group' in local_var_params: body_params = local_var_params['target_group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'TargetGroup' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/targetgroups/{targetGroupId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/templates_api.py0000644000175100001660000003674215046550312021530 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class TemplatesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def templates_find_by_id(self, template_id, **kwargs): # noqa: E501 """Get Cubes Template by ID # noqa: E501 Retrieves the properties of the Cubes template specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.templates_find_by_id(template_id, async_req=True) >>> result = thread.get() :param template_id: The unique template ID. (required) :type template_id: str :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Template """ kwargs['_return_http_data_only'] = True return self.templates_find_by_id_with_http_info(template_id, **kwargs) # noqa: E501 def templates_find_by_id_with_http_info(self, template_id, **kwargs): # noqa: E501 """Get Cubes Template by ID # noqa: E501 Retrieves the properties of the Cubes template specified by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.templates_find_by_id_with_http_info(template_id, async_req=True) >>> result = thread.get() :param template_id: The unique template ID. (required) :type template_id: str :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Template, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'template_id', 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method templates_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'template_id' is set if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 local_var_params['template_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `template_id` when calling `templates_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `templates_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `templates_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'template_id' in local_var_params: path_params['templateId'] = local_var_params['template_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Template' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/templates/{templateId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def templates_get(self, **kwargs): # noqa: E501 """Get Cubes Templates # noqa: E501 Retrieves all available templates. Templates provide a pre-defined configuration for Cube servers. >Templates are read-only and cannot be created, modified, or deleted by users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.templates_get(async_req=True) >>> result = thread.get() :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Templates """ kwargs['_return_http_data_only'] = True return self.templates_get_with_http_info(**kwargs) # noqa: E501 def templates_get_with_http_info(self, **kwargs): # noqa: E501 """Get Cubes Templates # noqa: E501 Retrieves all available templates. Templates provide a pre-defined configuration for Cube servers. >Templates are read-only and cannot be created, modified, or deleted by users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.templates_get_with_http_info(async_req=True) >>> result = thread.get() :param depth: 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 :type depth: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Templates, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'depth' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method templates_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `templates_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `templates_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Templates' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/templates', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/user_management_api.py0000644000175100001660000067210715046550312022705 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class UserManagementApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def um_groups_delete(self, group_id, **kwargs): # noqa: E501 """Delete groups # noqa: E501 Remove the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_delete(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.um_groups_delete_with_http_info(group_id, **kwargs) # noqa: E501 def um_groups_delete_with_http_info(self, group_id, **kwargs): # noqa: E501 """Delete groups # noqa: E501 Remove the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_delete_with_http_info(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_find_by_id(self, group_id, **kwargs): # noqa: E501 """Retrieve groups # noqa: E501 Retrieve a group by the group ID. This value is in the response body when the group is created, and in the list of the groups, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_find_by_id(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Group """ kwargs['_return_http_data_only'] = True return self.um_groups_find_by_id_with_http_info(group_id, **kwargs) # noqa: E501 def um_groups_find_by_id_with_http_info(self, group_id, **kwargs): # noqa: E501 """Retrieve groups # noqa: E501 Retrieve a group by the group ID. This value is in the response body when the group is created, and in the list of the groups, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_find_by_id_with_http_info(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Group' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_get(self, **kwargs): # noqa: E501 """List all groups # noqa: E501 List all the available user groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Groups """ kwargs['_return_http_data_only'] = True return self.um_groups_get_with_http_info(**kwargs) # noqa: E501 def um_groups_get_with_http_info(self, **kwargs): # noqa: E501 """List all groups # noqa: E501 List all the available user groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Groups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Groups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_post(self, group, **kwargs): # noqa: E501 """Create groups # noqa: E501 Create a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_post(group, async_req=True) >>> result = thread.get() :param group: The group to create. (required) :type group: Group :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Group """ kwargs['_return_http_data_only'] = True return self.um_groups_post_with_http_info(group, **kwargs) # noqa: E501 def um_groups_post_with_http_info(self, group, **kwargs): # noqa: E501 """Create groups # noqa: E501 Create a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_post_with_http_info(group, async_req=True) >>> result = thread.get() :param group: The group to create. (required) :type group: Group :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group' is set if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 local_var_params['group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `um_groups_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'group' in local_var_params: body_params = local_var_params['group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Group' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_put(self, group_id, group, **kwargs): # noqa: E501 """Modify groups # noqa: E501 Modify the properties of the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_put(group_id, group, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param group: The modified group. (required) :type group: Group :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Group """ kwargs['_return_http_data_only'] = True return self.um_groups_put_with_http_info(group_id, group, **kwargs) # noqa: E501 def um_groups_put_with_http_info(self, group_id, group, **kwargs): # noqa: E501 """Modify groups # noqa: E501 Modify the properties of the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_put_with_http_info(group_id, group, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param group: The modified group. (required) :type group: Group :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'group', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_put`") # noqa: E501 # verify the required parameter 'group' is set if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 local_var_params['group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `um_groups_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'group' in local_var_params: body_params = local_var_params['group'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Group' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_resources_get(self, group_id, **kwargs): # noqa: E501 """Retrieve group resources # noqa: E501 List the resources assigned to the group, by group ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_resources_get(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ResourceGroups """ kwargs['_return_http_data_only'] = True return self.um_groups_resources_get_with_http_info(group_id, **kwargs) # noqa: E501 def um_groups_resources_get_with_http_info(self, group_id, **kwargs): # noqa: E501 """Retrieve group resources # noqa: E501 List the resources assigned to the group, by group ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_resources_get_with_http_info(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ResourceGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_resources_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_resources_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_resources_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_resources_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ResourceGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/resources', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_shares_delete(self, group_id, resource_id, **kwargs): # noqa: E501 """Remove group shares # noqa: E501 Remove the specified share from the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_delete(group_id, resource_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.um_groups_shares_delete_with_http_info(group_id, resource_id, **kwargs) # noqa: E501 def um_groups_shares_delete_with_http_info(self, group_id, resource_id, **kwargs): # noqa: E501 """Remove group shares # noqa: E501 Remove the specified share from the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_delete_with_http_info(group_id, resource_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'group_id', 'resource_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_shares_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_shares_delete`") # noqa: E501 # verify the required parameter 'resource_id' is set if self.api_client.client_side_validation and ('resource_id' not in local_var_params or # noqa: E501 local_var_params['resource_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_id` when calling `um_groups_shares_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 if 'resource_id' in local_var_params: path_params['resourceId'] = local_var_params['resource_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/shares/{resourceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_shares_find_by_resource_id(self, group_id, resource_id, **kwargs): # noqa: E501 """Retrieve group shares # noqa: E501 Retrieve the properties of the specified group share. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_find_by_resource_id(group_id, resource_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: GroupShare """ kwargs['_return_http_data_only'] = True return self.um_groups_shares_find_by_resource_id_with_http_info(group_id, resource_id, **kwargs) # noqa: E501 def um_groups_shares_find_by_resource_id_with_http_info(self, group_id, resource_id, **kwargs): # noqa: E501 """Retrieve group shares # noqa: E501 Retrieve the properties of the specified group share. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_find_by_resource_id_with_http_info(group_id, resource_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GroupShare, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'resource_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_shares_find_by_resource_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_shares_find_by_resource_id`") # noqa: E501 # verify the required parameter 'resource_id' is set if self.api_client.client_side_validation and ('resource_id' not in local_var_params or # noqa: E501 local_var_params['resource_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_id` when calling `um_groups_shares_find_by_resource_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_find_by_resource_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_find_by_resource_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 if 'resource_id' in local_var_params: path_params['resourceId'] = local_var_params['resource_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'GroupShare' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/shares/{resourceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_shares_get(self, group_id, **kwargs): # noqa: E501 """List group shares # noqa: E501 List all shares and share privileges for the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_get(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: GroupShares """ kwargs['_return_http_data_only'] = True return self.um_groups_shares_get_with_http_info(group_id, **kwargs) # noqa: E501 def um_groups_shares_get_with_http_info(self, group_id, **kwargs): # noqa: E501 """List group shares # noqa: E501 List all shares and share privileges for the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_get_with_http_info(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GroupShares, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_shares_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_shares_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'GroupShares' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/shares', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_shares_post(self, group_id, resource_id, resource, **kwargs): # noqa: E501 """Add group shares # noqa: E501 Add the specified share to the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_post(group_id, resource_id, resource, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param resource: The resource to add. (required) :type resource: GroupShare :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: GroupShare """ kwargs['_return_http_data_only'] = True return self.um_groups_shares_post_with_http_info(group_id, resource_id, resource, **kwargs) # noqa: E501 def um_groups_shares_post_with_http_info(self, group_id, resource_id, resource, **kwargs): # noqa: E501 """Add group shares # noqa: E501 Add the specified share to the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_post_with_http_info(group_id, resource_id, resource, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param resource: The resource to add. (required) :type resource: GroupShare :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GroupShare, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'resource_id', 'resource', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_shares_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_shares_post`") # noqa: E501 # verify the required parameter 'resource_id' is set if self.api_client.client_side_validation and ('resource_id' not in local_var_params or # noqa: E501 local_var_params['resource_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_id` when calling `um_groups_shares_post`") # noqa: E501 # verify the required parameter 'resource' is set if self.api_client.client_side_validation and ('resource' not in local_var_params or # noqa: E501 local_var_params['resource'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource` when calling `um_groups_shares_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 if 'resource_id' in local_var_params: path_params['resourceId'] = local_var_params['resource_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'resource' in local_var_params: body_params = local_var_params['resource'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'GroupShare' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/shares/{resourceId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_shares_put(self, group_id, resource_id, resource, **kwargs): # noqa: E501 """Modify group share privileges # noqa: E501 Modify share permissions for the specified group. With an empty body, no updates are performed, and the current share permissions for the group are returned with response code 200. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_put(group_id, resource_id, resource, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param resource: The modified resource (required) :type resource: GroupShare :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: GroupShare """ kwargs['_return_http_data_only'] = True return self.um_groups_shares_put_with_http_info(group_id, resource_id, resource, **kwargs) # noqa: E501 def um_groups_shares_put_with_http_info(self, group_id, resource_id, resource, **kwargs): # noqa: E501 """Modify group share privileges # noqa: E501 Modify share permissions for the specified group. With an empty body, no updates are performed, and the current share permissions for the group are returned with response code 200. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_shares_put_with_http_info(group_id, resource_id, resource, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param resource_id: The unique ID of the resource. (required) :type resource_id: str :param resource: The modified resource (required) :type resource: GroupShare :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GroupShare, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'resource_id', 'resource', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_shares_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_shares_put`") # noqa: E501 # verify the required parameter 'resource_id' is set if self.api_client.client_side_validation and ('resource_id' not in local_var_params or # noqa: E501 local_var_params['resource_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_id` when calling `um_groups_shares_put`") # noqa: E501 # verify the required parameter 'resource' is set if self.api_client.client_side_validation and ('resource' not in local_var_params or # noqa: E501 local_var_params['resource'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource` when calling `um_groups_shares_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_shares_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 if 'resource_id' in local_var_params: path_params['resourceId'] = local_var_params['resource_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'resource' in local_var_params: body_params = local_var_params['resource'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'GroupShare' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/shares/{resourceId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_users_delete(self, group_id, user_id, **kwargs): # noqa: E501 """Remove users from groups # noqa: E501 Remove the specified user from the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_delete(group_id, user_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.um_groups_users_delete_with_http_info(group_id, user_id, **kwargs) # noqa: E501 def um_groups_users_delete_with_http_info(self, group_id, user_id, **kwargs): # noqa: E501 """Remove users from groups # noqa: E501 Remove the specified user from the group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_delete_with_http_info(group_id, user_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'group_id', 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_users_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_users_delete`") # noqa: E501 # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_groups_users_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/users/{userId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_users_get(self, group_id, **kwargs): # noqa: E501 """List group members # noqa: E501 List all members of the specified user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_get(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: GroupMembers """ kwargs['_return_http_data_only'] = True return self.um_groups_users_get_with_http_info(group_id, **kwargs) # noqa: E501 def um_groups_users_get_with_http_info(self, group_id, **kwargs): # noqa: E501 """List group members # noqa: E501 List all members of the specified user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_get_with_http_info(group_id, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GroupMembers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_users_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_users_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'GroupMembers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/users', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_groups_users_post(self, group_id, user, **kwargs): # noqa: E501 """Add a Group Member # noqa: E501 Adds an existing user to the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_post(group_id, user, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param user: The user to add. (required) :type user: UserGroupPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: User """ kwargs['_return_http_data_only'] = True return self.um_groups_users_post_with_http_info(group_id, user, **kwargs) # noqa: E501 def um_groups_users_post_with_http_info(self, group_id, user, **kwargs): # noqa: E501 """Add a Group Member # noqa: E501 Adds an existing user to the specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_groups_users_post_with_http_info(group_id, user, async_req=True) >>> result = thread.get() :param group_id: The unique ID of the group. (required) :type group_id: str :param user: The user to add. (required) :type user: UserGroupPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'group_id', 'user', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_groups_users_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `um_groups_users_post`") # noqa: E501 # verify the required parameter 'user' is set if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `um_groups_users_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_groups_users_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'group_id' in local_var_params: path_params['groupId'] = local_var_params['group_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'user' in local_var_params: body_params = local_var_params['user'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'User' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/groups/{groupId}/users', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_resources_find_by_type(self, resource_type, **kwargs): # noqa: E501 """List resources by type # noqa: E501 List all resources of the specified type. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_find_by_type(resource_type, async_req=True) >>> result = thread.get() :param resource_type: The resource type (required) :type resource_type: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Resources """ kwargs['_return_http_data_only'] = True return self.um_resources_find_by_type_with_http_info(resource_type, **kwargs) # noqa: E501 def um_resources_find_by_type_with_http_info(self, resource_type, **kwargs): # noqa: E501 """List resources by type # noqa: E501 List all resources of the specified type. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_find_by_type_with_http_info(resource_type, async_req=True) >>> result = thread.get() :param resource_type: The resource type (required) :type resource_type: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Resources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'resource_type', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_resources_find_by_type" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'resource_type' is set if self.api_client.client_side_validation and ('resource_type' not in local_var_params or # noqa: E501 local_var_params['resource_type'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_type` when calling `um_resources_find_by_type`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_find_by_type`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_find_by_type`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'resource_type' in local_var_params: path_params['resourceType'] = local_var_params['resource_type'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Resources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/resources/{resourceType}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_resources_find_by_type_and_id(self, resource_type, resource_id, **kwargs): # noqa: E501 """Retrieve resources by type # noqa: E501 Retrieve a resource by the resource type and resource ID. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_find_by_type_and_id(resource_type, resource_id, async_req=True) >>> result = thread.get() :param resource_type: The resource type (required) :type resource_type: str :param resource_id: The resource ID (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Resource """ kwargs['_return_http_data_only'] = True return self.um_resources_find_by_type_and_id_with_http_info(resource_type, resource_id, **kwargs) # noqa: E501 def um_resources_find_by_type_and_id_with_http_info(self, resource_type, resource_id, **kwargs): # noqa: E501 """Retrieve resources by type # noqa: E501 Retrieve a resource by the resource type and resource ID. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_find_by_type_and_id_with_http_info(resource_type, resource_id, async_req=True) >>> result = thread.get() :param resource_type: The resource type (required) :type resource_type: str :param resource_id: The resource ID (required) :type resource_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Resource, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'resource_type', 'resource_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_resources_find_by_type_and_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'resource_type' is set if self.api_client.client_side_validation and ('resource_type' not in local_var_params or # noqa: E501 local_var_params['resource_type'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_type` when calling `um_resources_find_by_type_and_id`") # noqa: E501 # verify the required parameter 'resource_id' is set if self.api_client.client_side_validation and ('resource_id' not in local_var_params or # noqa: E501 local_var_params['resource_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `resource_id` when calling `um_resources_find_by_type_and_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_find_by_type_and_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_find_by_type_and_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'resource_type' in local_var_params: path_params['resourceType'] = local_var_params['resource_type'] # noqa: E501 if 'resource_id' in local_var_params: path_params['resourceId'] = local_var_params['resource_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Resource' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/resources/{resourceType}/{resourceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_resources_get(self, **kwargs): # noqa: E501 """List all resources # noqa: E501 List all the available resources. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Resources """ kwargs['_return_http_data_only'] = True return self.um_resources_get_with_http_info(**kwargs) # noqa: E501 def um_resources_get_with_http_info(self, **kwargs): # noqa: E501 """List all resources # noqa: E501 List all the available resources. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_resources_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Resources, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_resources_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_resources_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Resources' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/resources', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_delete(self, user_id, **kwargs): # noqa: E501 """Delete users # noqa: E501 Delete the specified user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_delete(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.um_users_delete_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_delete_with_http_info(self, user_id, **kwargs): # noqa: E501 """Delete users # noqa: E501 Delete the specified user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_delete_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_find_by_id(self, user_id, **kwargs): # noqa: E501 """Retrieve users # noqa: E501 Retrieve user properties by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_find_by_id(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: User """ kwargs['_return_http_data_only'] = True return self.um_users_find_by_id_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_find_by_id_with_http_info(self, user_id, **kwargs): # noqa: E501 """Retrieve users # noqa: E501 Retrieve user properties by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_find_by_id_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'User' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_get(self, **kwargs): # noqa: E501 """List all users # noqa: E501 List all the users in your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_get(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Users """ kwargs['_return_http_data_only'] = True return self.um_users_get_with_http_info(**kwargs) # noqa: E501 def um_users_get_with_http_info(self, **kwargs): # noqa: E501 """List all users # noqa: E501 List all the users in your account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_get_with_http_info(async_req=True) >>> result = thread.get() :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `um_users_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `um_users_get`, must be a value less than or equal to `100`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `um_users_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Users' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_groups_get(self, user_id, **kwargs): # noqa: E501 """Retrieve group resources by user ID # noqa: E501 Retrieve group resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_groups_get(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ResourceGroups """ kwargs['_return_http_data_only'] = True return self.um_users_groups_get_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_groups_get_with_http_info(self, user_id, **kwargs): # noqa: E501 """Retrieve group resources by user ID # noqa: E501 Retrieve group resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_groups_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ResourceGroups, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_groups_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_groups_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_groups_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_groups_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ResourceGroups' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/groups', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_owns_get(self, user_id, **kwargs): # noqa: E501 """Retrieve user resources by user ID # noqa: E501 Retrieve own resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_owns_get(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ResourcesUsers """ kwargs['_return_http_data_only'] = True return self.um_users_owns_get_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_owns_get_with_http_info(self, user_id, **kwargs): # noqa: E501 """Retrieve user resources by user ID # noqa: E501 Retrieve own resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_owns_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ResourcesUsers, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_owns_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_owns_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_owns_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_owns_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'ResourcesUsers' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/owns', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_post(self, user, **kwargs): # noqa: E501 """Create users # noqa: E501 Create a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_post(user, async_req=True) >>> result = thread.get() :param user: The user to create. (required) :type user: UserPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: User """ kwargs['_return_http_data_only'] = True return self.um_users_post_with_http_info(user, **kwargs) # noqa: E501 def um_users_post_with_http_info(self, user, **kwargs): # noqa: E501 """Create users # noqa: E501 Create a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_post_with_http_info(user, async_req=True) >>> result = thread.get() :param user: The user to create. (required) :type user: UserPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user' is set if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `um_users_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'user' in local_var_params: body_params = local_var_params['user'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'User' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_put(self, user_id, user, **kwargs): # noqa: E501 """Modify users # noqa: E501 Modify the properties of the specified user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_put(user_id, user, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param user: The modified user (required) :type user: UserPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: User """ kwargs['_return_http_data_only'] = True return self.um_users_put_with_http_info(user_id, user, **kwargs) # noqa: E501 def um_users_put_with_http_info(self, user_id, user, **kwargs): # noqa: E501 """Modify users # noqa: E501 Modify the properties of the specified user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_put_with_http_info(user_id, user, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param user: The modified user (required) :type user: UserPut :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'user', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_put`") # noqa: E501 # verify the required parameter 'user' is set if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `um_users_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'user' in local_var_params: body_params = local_var_params['user'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'User' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/user_s3_keys_api.py0000644000175100001660000015775315046550312022156 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class UserS3KeysApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def um_users_s3keys_delete(self, user_id, key_id, **kwargs): # noqa: E501 """Delete Object storage keys # noqa: E501 Delete the specified user Object storage key. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_delete(user_id, key_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.um_users_s3keys_delete_with_http_info(user_id, key_id, **kwargs) # noqa: E501 def um_users_s3keys_delete_with_http_info(self, user_id, key_id, **kwargs): # noqa: E501 """Delete Object storage keys # noqa: E501 Delete the specified user Object storage key. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_delete_with_http_info(user_id, key_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'user_id', 'key_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3keys_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3keys_delete`") # noqa: E501 # verify the required parameter 'key_id' is set if self.api_client.client_side_validation and ('key_id' not in local_var_params or # noqa: E501 local_var_params['key_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key_id` when calling `um_users_s3keys_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 if 'key_id' in local_var_params: path_params['keyId'] = local_var_params['key_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3keys/{keyId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_s3keys_find_by_key_id(self, user_id, key_id, **kwargs): # noqa: E501 """Retrieve user Object storage keys by key ID # noqa: E501 Retrieve the specified user Object storage key. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. The key ID is in the response body when the Object storage key is created, and in the list of all user Object storage keys, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_find_by_key_id(user_id, key_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: S3Key """ kwargs['_return_http_data_only'] = True return self.um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, **kwargs) # noqa: E501 def um_users_s3keys_find_by_key_id_with_http_info(self, user_id, key_id, **kwargs): # noqa: E501 """Retrieve user Object storage keys by key ID # noqa: E501 Retrieve the specified user Object storage key. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. The key ID is in the response body when the Object storage key is created, and in the list of all user Object storage keys, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(S3Key, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'key_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3keys_find_by_key_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3keys_find_by_key_id`") # noqa: E501 # verify the required parameter 'key_id' is set if self.api_client.client_side_validation and ('key_id' not in local_var_params or # noqa: E501 local_var_params['key_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key_id` when calling `um_users_s3keys_find_by_key_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_find_by_key_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_find_by_key_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 if 'key_id' in local_var_params: path_params['keyId'] = local_var_params['key_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'S3Key' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3keys/{keyId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_s3keys_get(self, user_id, **kwargs): # noqa: E501 """List user Object storage keys # noqa: E501 List Object storage keys by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_get(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: S3Keys """ kwargs['_return_http_data_only'] = True return self.um_users_s3keys_get_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_s3keys_get_with_http_info(self, user_id, **kwargs): # noqa: E501 """List user Object storage keys # noqa: E501 List Object storage keys by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(S3Keys, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3keys_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3keys_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'S3Keys' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_s3keys_post(self, user_id, **kwargs): # noqa: E501 """Create user Object storage keys # noqa: E501 Create an Object storage key for the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. A maximum of five keys per user can be generated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_post(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: S3Key """ kwargs['_return_http_data_only'] = True return self.um_users_s3keys_post_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_s3keys_post_with_http_info(self, user_id, **kwargs): # noqa: E501 """Create user Object storage keys # noqa: E501 Create an Object storage key for the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. A maximum of five keys per user can be generated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_post_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(S3Key, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3keys_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3keys_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'S3Key' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3keys', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_s3keys_put(self, user_id, key_id, s3_key, **kwargs): # noqa: E501 """Modify a Object storage Key by Key ID # noqa: E501 Enables or disables the specified user Object storage key. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_put(user_id, key_id, s3_key, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param s3_key: The modified Object storage key. (required) :type s3_key: S3Key :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: S3Key """ kwargs['_return_http_data_only'] = True return self.um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, **kwargs) # noqa: E501 def um_users_s3keys_put_with_http_info(self, user_id, key_id, s3_key, **kwargs): # noqa: E501 """Modify a Object storage Key by Key ID # noqa: E501 Enables or disables the specified user Object storage key. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param key_id: The unique ID of the Object storage key. (required) :type key_id: str :param s3_key: The modified Object storage key. (required) :type s3_key: S3Key :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(S3Key, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'key_id', 's3_key', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3keys_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3keys_put`") # noqa: E501 # verify the required parameter 'key_id' is set if self.api_client.client_side_validation and ('key_id' not in local_var_params or # noqa: E501 local_var_params['key_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `key_id` when calling `um_users_s3keys_put`") # noqa: E501 # verify the required parameter 's3_key' is set if self.api_client.client_side_validation and ('s3_key' not in local_var_params or # noqa: E501 local_var_params['s3_key'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `s3_key` when calling `um_users_s3keys_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `um_users_s3keys_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 if 'key_id' in local_var_params: path_params['keyId'] = local_var_params['key_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 's3_key' in local_var_params: body_params = local_var_params['s3_key'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'S3Key' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3keys/{keyId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def um_users_s3ssourl_get(self, user_id, **kwargs): # noqa: E501 """Retrieve Object storage single sign-on URLs # noqa: E501 Retrieve Ionos Object Storage single sign-on URLs for the the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3ssourl_get(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: S3ObjectStorageSSO """ kwargs['_return_http_data_only'] = True return self.um_users_s3ssourl_get_with_http_info(user_id, **kwargs) # noqa: E501 def um_users_s3ssourl_get_with_http_info(self, user_id, **kwargs): # noqa: E501 """Retrieve Object storage single sign-on URLs # noqa: E501 Retrieve Ionos Object Storage single sign-on URLs for the the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.um_users_s3ssourl_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param user_id: The unique ID of the user. (required) :type user_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(S3ObjectStorageSSO, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'user_id', 'pretty', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method um_users_s3ssourl_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 local_var_params['user_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user_id` when calling `um_users_s3ssourl_get`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userId'] = local_var_params['user_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'S3ObjectStorageSSO' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/um/users/{userId}/s3ssourl', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api/volumes_api.py0000644000175100001660000024652115046550312021222 0ustar00runnerdockerfrom __future__ import absolute_import import re # noqa: F401 import six from ionoscloud.api_client import ApiClient from ionoscloud.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class VolumesApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def datacenters_volumes_create_snapshot_post(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Create volume snapshots # noqa: E501 Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_create_snapshot_post(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param snapshot: The payload of the snapshot. :type snapshot: CreateSnapshot :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Snapshot """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_create_snapshot_post_with_http_info(datacenter_id, volume_id, **kwargs) # noqa: E501 def datacenters_volumes_create_snapshot_post_with_http_info(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Create volume snapshots # noqa: E501 Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_create_snapshot_post_with_http_info(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param snapshot: The payload of the snapshot. :type snapshot: CreateSnapshot :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number', 'snapshot' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_create_snapshot_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_create_snapshot_post`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_create_snapshot_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_create_snapshot_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_create_snapshot_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'snapshot' in local_var_params: body_params = local_var_params['snapshot'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Snapshot' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_delete(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Delete volumes # noqa: E501 Delete the specified volume within the data center. Use with caution, the volume will be permanently removed! # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_delete(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_delete_with_http_info(datacenter_id, volume_id, **kwargs) # noqa: E501 def datacenters_volumes_delete_with_http_info(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Delete volumes # noqa: E501 Delete the specified volume within the data center. Use with caution, the volume will be permanently removed! # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_delete_with_http_info(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_delete" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_delete`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_delete`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_delete`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_delete`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_find_by_id(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Retrieve volumes # noqa: E501 Retrieve the properties of the specified volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_find_by_id(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_find_by_id_with_http_info(datacenter_id, volume_id, **kwargs) # noqa: E501 def datacenters_volumes_find_by_id_with_http_info(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Retrieve volumes # noqa: E501 Retrieve the properties of the specified volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_find_by_id_with_http_info(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_find_by_id" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_find_by_id`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_find_by_id`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_find_by_id`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_find_by_id`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_get(self, datacenter_id, **kwargs): # noqa: E501 """List volumes # noqa: E501 List all the volumes within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_get(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volumes """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_get_with_http_info(datacenter_id, **kwargs) # noqa: E501 def datacenters_volumes_get_with_http_info(self, datacenter_id, **kwargs): # noqa: E501 """List volumes # noqa: E501 List all the volumes within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_get_with_http_info(datacenter_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param offset: The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). :type offset: int :param limit: The maximum number of elements to return (use together with offset for pagination). :type limit: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volumes, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'pretty', 'depth', 'x_contract_number', 'offset', 'limit' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_get" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_get`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_get`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `offset` when calling `datacenters_volumes_get`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 10000: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_volumes_get`, must be a value less than or equal to `10000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `datacenters_volumes_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 query_params.append(('offset', local_var_params['offset'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volumes' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_patch(self, datacenter_id, volume_id, volume, **kwargs): # noqa: E501 """Partially modify volumes # noqa: E501 Update the properties of the specified storage volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_patch(datacenter_id, volume_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param volume: The properties of the volume to be updated. (required) :type volume: VolumeProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_patch_with_http_info(datacenter_id, volume_id, volume, **kwargs) # noqa: E501 def datacenters_volumes_patch_with_http_info(self, datacenter_id, volume_id, volume, **kwargs): # noqa: E501 """Partially modify volumes # noqa: E501 Update the properties of the specified storage volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_patch_with_http_info(datacenter_id, volume_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param volume: The properties of the volume to be updated. (required) :type volume: VolumeProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'volume', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_patch" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_patch`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_patch`") # noqa: E501 # verify the required parameter 'volume' is set if self.api_client.client_side_validation and ('volume' not in local_var_params or # noqa: E501 local_var_params['volume'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume` when calling `datacenters_volumes_patch`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_patch`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_patch`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'volume' in local_var_params: body_params = local_var_params['volume'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_post(self, datacenter_id, volume, **kwargs): # noqa: E501 """Create a Volume # noqa: E501 Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_post(datacenter_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume: The volume to create. (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_post_with_http_info(datacenter_id, volume, **kwargs) # noqa: E501 def datacenters_volumes_post_with_http_info(self, datacenter_id, volume, **kwargs): # noqa: E501 """Create a Volume # noqa: E501 Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_post_with_http_info(datacenter_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume: The volume to create. (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_post`") # noqa: E501 # verify the required parameter 'volume' is set if self.api_client.client_side_validation and ('volume' not in local_var_params or # noqa: E501 local_var_params['volume'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume` when calling `datacenters_volumes_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'volume' in local_var_params: body_params = local_var_params['volume'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_put(self, datacenter_id, volume_id, volume, **kwargs): # noqa: E501 """Modify a Volume by ID # noqa: E501 Modifies the properties of the specified volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_put(datacenter_id, volume_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param volume: The modified volume (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: Volume """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_put_with_http_info(datacenter_id, volume_id, volume, **kwargs) # noqa: E501 def datacenters_volumes_put_with_http_info(self, datacenter_id, volume_id, volume, **kwargs): # noqa: E501 """Modify a Volume by ID # noqa: E501 Modifies the properties of the specified volume within the data center. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_put_with_http_info(datacenter_id, volume_id, volume, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param volume: The modified volume (required) :type volume: Volume :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(Volume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'volume', 'pretty', 'depth', 'x_contract_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_put" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_put`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_put`") # noqa: E501 # verify the required parameter 'volume' is set if self.api_client.client_side_validation and ('volume' not in local_var_params or # noqa: E501 local_var_params['volume'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume` when calling `datacenters_volumes_put`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_put`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_put`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'volume' in local_var_params: body_params = local_var_params['volume'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = 'Volume' if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def datacenters_volumes_restore_snapshot_post(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Restore volume snapshots # noqa: E501 Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_restore_snapshot_post(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param restore_snapshot: The payload used to restore a snapshot. :type restore_snapshot: RestoreSnapshot :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.datacenters_volumes_restore_snapshot_post_with_http_info(datacenter_id, volume_id, **kwargs) # noqa: E501 def datacenters_volumes_restore_snapshot_post_with_http_info(self, datacenter_id, volume_id, **kwargs): # noqa: E501 """Restore volume snapshots # noqa: E501 Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.datacenters_volumes_restore_snapshot_post_with_http_info(datacenter_id, volume_id, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the data center. (required) :type datacenter_id: str :param volume_id: The unique ID of the volume. (required) :type volume_id: str :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: 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 :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests are to be executed. :type x_contract_number: int :param restore_snapshot: The payload used to restore a snapshot. :type restore_snapshot: RestoreSnapshot :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number', 'restore_snapshot' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.iteritems(local_var_params['kwargs']): if local_var_params_key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method datacenters_volumes_restore_snapshot_post" % local_var_params_key ) local_var_params[local_var_params_key] = local_var_params_val del local_var_params['kwargs'] # verify the required parameter 'datacenter_id' is set if self.api_client.client_side_validation and ('datacenter_id' not in local_var_params or # noqa: E501 local_var_params['datacenter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `datacenter_id` when calling `datacenters_volumes_restore_snapshot_post`") # noqa: E501 # verify the required parameter 'volume_id' is set if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501 local_var_params['volume_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `volume_id` when calling `datacenters_volumes_restore_snapshot_post`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] > 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_restore_snapshot_post`, must be a value less than or equal to `10`") # noqa: E501 if self.api_client.client_side_validation and 'depth' in local_var_params and local_var_params['depth'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `depth` when calling `datacenters_volumes_restore_snapshot_post`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'datacenter_id' in local_var_params: path_params['datacenterId'] = local_var_params['datacenter_id'] # noqa: E501 if 'volume_id' in local_var_params: path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501 query_params = list(local_var_params.get('query_params', {}).items()) if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_params: header_params['X-Contract-Number'] = local_var_params['x_contract_number'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'restore_snapshot' in local_var_params: body_params = local_var_params['restore_snapshot'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['BasicAuthentication', 'TokenAuthentication'] # noqa: E501 response_type = None if 'response_type' in kwargs: response_type = kwargs['response_type'] return self.api_client.call_api( '/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=response_type, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/api_client.py0000644000175100001660000010466715046550312020241 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import atexit import datetime from dateutil.parser import parse import json import http import mimetypes from multiprocessing.pool import ThreadPool import os import re import tempfile import logging import time import sys # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote from urllib3.exceptions import ProtocolError from ionoscloud.configuration import Configuration import ionoscloud.models from ionoscloud import rest from ionoscloud.exceptions import ApiValueError, ApiException, ApiFailedRequest, ApiTimeout import ionoscloud # Copyright 2015-2017 IONOS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class ICRequestError(Exception): """Base error for request failures""" def __init__(self, msg, request_id): # pylint: disable=super-init-not-called self.msg = msg self.request_id = request_id class ICFailedRequest(ICRequestError): """Raised when a provisioning request failed.""" class ICTimeoutError(ICRequestError): """Raised when a request does not finish in the given time span.""" class ApiClient(object): """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the OpenAPI templates. NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API :param pool_threads: The number of threads to use for async requests to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types NATIVE_TYPES_MAPPING = { 'int': int, 'long': int if six.PY3 else long, # noqa: F821 'float': float, 'str': str, 'bool': bool, 'date': datetime.date, 'datetime': datetime.datetime, 'object': object, } _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1): if configuration is None: configuration = Configuration.get_default_copy() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. self.user_agent = 'ionos-cloud-sdk-python/6.1.13' self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): self.close() def close(self): if self._pool: self._pool.close() self._pool.join() self._pool = None if hasattr(atexit, 'unregister'): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) self._pool = ThreadPool(self.pool_threads) return self._pool @property def user_agent(self): """User agent for this API client""" return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value def __call_api( self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None): config = self.configuration logger = logging.getLogger(__name__) # header parameters header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( '{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) query_params = self.parameters_to_tuples(query_params, collection_formats) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) post_params = self.parameters_to_tuples(post_params, collection_formats) post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( header_params, query_params, auth_settings, request_auth=_request_auth) # body if body: body = self.sanitize_for_serialization(body) # request url if _host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path try: number_of_calls = 0 while True: # perform request and return response try: response_data = self.request( method, url, query_params=query_params, headers=header_params, post_params=post_params, body=body, _preload_content=_preload_content, _request_timeout=_request_timeout) break except ApiException as response_error: number_of_calls += 1 if response_error.status in ( http.HTTPStatus.BAD_GATEWAY.value, http.HTTPStatus.SERVICE_UNAVAILABLE.value, http.HTTPStatus.GATEWAY_TIMEOUT.value, ): backoff_time = config.wait_time elif response_error.status == http.HTTPStatus.TOO_MANY_REQUESTS.value: backoff_time = config.wait_time try: backoff_time = int(response_error.headers['Retry-After']) except ValueError: pass else: raise response_error if number_of_calls >= config.max_retries: if config.debug: logger.debug('number of maximum retries exceeded {}'.format(config.max_retries)) raise response_error if backoff_time > config.max_wait_time: backoff_time = config.max_wait_time if config.debug: logger.debug('HTTP response body ~BEGIN~\n#{}\n~END~\n'.format(response_error.body)) time.sleep(backoff_time) except ProtocolError as protocol_error: number_of_calls += 1 if number_of_calls >= config.max_retries: if config.debug: logger.debug('number of maximum retries exceeded {}'.format(config.max_retries)) raise protocol_error time.sleep(config.wait_time) except ApiException as e: e.body = e.body.decode('utf-8') if e.body is not None and six.PY3 else e.body e.url = url raise e content_type = response_data.getheader('content-type') self.last_response = response_data return_data = response_data if not _preload_content: return return_data if six.PY3 and response_type not in ["file", "bytes"]: match = None if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) encoding = match.group(1) if match else "utf-8" response_data.data = response_data.data.decode(encoding) # deserialize response data if response_type: return_data = self.deserialize(response_data, response_type) else: return_data = None if _return_http_data_only: return (return_data) else: return (return_data, response_data.status, response_data.getheaders()) def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. """ if obj is None: return None elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() if isinstance(obj, dict): obj_dict = obj else: # Convert model obj to dict except # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) for attr, _ in six.iteritems(obj.openapi_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)} def deserialize(self, response, response_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. :return: deserialized object. """ # handle file downloading # save response body into a tmp file and return the instance if response_type == "file": return self.__deserialize_file(response) # fetch data from response object try: data = json.loads(response.data) except ValueError: data = response.data return self.__deserialize(data, response_type) def __deserialize(self, data, klass): """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object. """ if data is None: return None if type(klass) == str: if klass.startswith('list['): sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: klass = getattr(ionoscloud.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) elif klass == object: return self.__deserialize_object(data) elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :param query_params: Query parameters in the url. :param header_params: Header parameters to be placed in the request header. :param body: Request body. :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, header, and post parameters. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_token: dict, optional :return: If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly. """ if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, _request_auth) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, _request_auth)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) else: raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ new_params = [] if collection_formats is None: collection_formats = {} for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': new_params.extend((k, value) for value in v) else: if collection_format == 'ssv': delimiter = ' ' elif collection_format == 'tsv': delimiter = '\t' elif collection_format == 'pipes': delimiter = '|' else: # csv is the default delimiter = ',' new_params.append( (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params def files_parameters(self, files=None): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] if files: for k, v in six.iteritems(files): if not v: continue file_names = v if type(v) is list else [v] for n in file_names: with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() mimetype = (mimetypes.guess_type(filename)[0] or 'application/octet-stream') params.append( tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts): """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: return accepts = [x.lower() for x in accepts] if 'application/json' in accepts: return 'application/json' else: return ', '.join(accepts) def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json). """ if not content_types: return 'application/json' content_types = [x.lower() for x in content_types] if 'application/json' in content_types or '*/*' in content_types: return 'application/json' else: return content_types[0] def update_params_for_auth(self, headers, querys, auth_settings, request_auth=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. :param request_auth: if set, the provided settings will override the token in the configuration. """ if not auth_settings: return if request_auth: self._apply_auth_params(headers, querys, request_auth) return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params(headers, querys, auth_setting) def _apply_auth_params(self, headers, querys, auth_setting): """Updates the request parameters based on a single auth_setting :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_setting: auth settings for the endpoint """ if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) else: raise ApiValueError( 'Authentication token must be in `query` or `header`' ) def __deserialize_file(self, response): """Deserializes body to file Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. :param response: RESTResponse. :return: file path. """ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) os.close(fd) os.remove(path) content_disposition = response.getheader("Content-Disposition") if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: f.write(response.data) return path def __deserialize_primitive(self, data, klass): """Deserializes string to primitive type. :param data: str. :param klass: class literal. :return: int, long, float, str, bool. """ try: return klass(data) except UnicodeEncodeError: return six.text_type(data) except TypeError: return data def __deserialize_object(self, value): """Return an original value. :return: object. """ return value def __deserialize_date(self, string): """Deserializes string to date. :param string: str. :return: date. """ try: return parse(string).date() except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime. """ try: return parse(string) except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason=( "Failed to parse `{0}` as datetime object" .format(string) ) ) def __deserialize_model(self, data, klass): """Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object. """ has_discriminator = False if (hasattr(klass, 'get_real_child_model') and klass.discriminator_value_class_map): has_discriminator = True if not klass.openapi_types and has_discriminator is False: return data kwargs = {} if (data is not None and klass.openapi_types is not None and isinstance(data, (list, dict))): for attr, attr_type in six.iteritems(klass.openapi_types): if klass.attribute_map[attr] in data: value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) instance = klass(**kwargs) if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) return instance def wait_for_completion(self, request_id, timeout=3600, initial_wait=1, scaleup=10, max_wait=60): """ Poll resource request status until resource is provisioned. :param request_id: Request id of the action. :type request_id: ``str`` :param timeout: Maximum waiting time in seconds. None means infinite waiting time. :type timeout: ``int`` :param initial_wait: Initial polling interval in seconds. :type initial_wait: ``int`` :param scaleup: Double polling interval every scaleup steps, which will be doubled. :type scaleup: ``int`` :param max_wait: Maximum polling interval in seconds. :type max_wait: ``int`` """ if not request_id: return logger = logging.getLogger(__name__) wait_period = initial_wait next_increase = time.time() + wait_period * scaleup if timeout: timeout = time.time() + timeout while True: request = ionoscloud.RequestsApi(self).requests_status_get(request_id, response_type='object') if request['metadata']['status'] == 'DONE': break elif request['metadata']['status'] == 'FAILED': raise ApiFailedRequest( message='Request {0} failed to complete: {1}'.format(request_id, request['metadata']['message']), request_id=request_id ) current_time = time.time() if timeout and current_time > timeout: raise ApiTimeout( message='Timed out waiting for request {0}.'.format(request_id), request_id=request_id ) if wait_period < max_wait and current_time > next_increase: wait_period *= 2 next_increase = time.time() + wait_period * scaleup scaleup *= 2 logger.info("Request %s is in state '%s'. Sleeping for %i seconds...", request_id, request['metadata']['status'], wait_period) time.sleep(wait_period) @staticmethod def wait_for(fn_check, fn_request, timeout=3600, initial_wait=1, scaleup=10, max_wait=60, console_print=None): """ Poll resource request status until resource is provisioned. :param fn_check: Function used to check the response :type fn_check: ``function`` :param fn_request: Function used to perform the request :type fn_request: ``function`` :param timeout: Maximum waiting time in seconds. None means infinite waiting time. :type timeout: ``int`` :param initial_wait: Initial polling interval in seconds. :type initial_wait: ``int`` :param scaleup: Double polling interval every scaleup steps, which will be doubled. :type scaleup: ``int`` :param max_wait: Maximum polling interval in seconds. :type max_wait: ``int`` """ logger = logging.getLogger(__name__) wait_period = initial_wait next_increase = time.time() + wait_period * scaleup if timeout: timeout = time.time() + timeout while True: if console_print is not None: sys.stdout.write(console_print) sys.stdout.flush() resp = fn_request() check_response = fn_check(resp) if check_response: break current_time = time.time() if timeout and current_time > timeout: if type(resp) == dict and resp.get('requestId'): raise ApiTimeout( message='Timed out waiting for request {0}.'.format(resp['requestId']), request_id=resp['requestId'], ) else: raise ApiTimeout(message='Timeout reached') if wait_period < max_wait and current_time > next_increase: wait_period *= 2 next_increase = time.time() + wait_period * scaleup scaleup *= 2 logger.info("Sleeping for %i seconds...", wait_period) time.sleep(wait_period) if console_print is not None: print('') return resp ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/configuration.py0000644000175100001660000004301715046550312020770 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import copy import logging import multiprocessing import os import sys import urllib3 import six from six.moves import http_client as httplib from ionoscloud.exceptions import ApiValueError JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'maxItems', 'minItems' } class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. :param host: Base url :param token: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. :param token_prefix: Dict to store API prefix (e.g. Bearer) The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication :param discard_unknown_keys: Boolean value indicating whether to discard unknown properties. A server may send a response that includes additional properties that are not known by the client in the following scenarios: 1. The OpenAPI document is incomplete, i.e. it does not match the server implementation. 2. The client was generated using an older version of the OpenAPI document and the server has been upgraded since then. If a schema in the OpenAPI document defines the additionalProperties attribute, then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard. :param disabled_client_side_validations (string): Comma-separated list of JSON schema validation keywords to disable JSON schema structural validation rules. The following keywords may be specified: multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, maxItems, minItems. By default, the validation is performed for data generated locally by the client and data received from the server, independent of any validation performed by the server side. If the input data does not satisfy the JSON schema validation rules specified in the OpenAPI document, an exception is raised. If disabled_client_side_validations is set, structural validation is disabled. This can be useful to troubleshoot data validation problem, such as when the OpenAPI document validation rules do not match the actual API data received by the server. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. :param server_operation_index: Mapping from operation ID to an index to server configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. :Example: API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: cookieAuth: # name for the security scheme type: apiKey in: cookie name: JSESSIONID # cookie name You can programmatically set the cookie: conf = ionoscloud.Configuration( token='AuthToken' token_prefix='Bearer' ) The following cookie will be added to the HTTP request: Cookie: JSESSIONID abc123 HTTP Basic Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: http_basic_auth: type: http scheme: basic Configure API client with HTTP basic authentication: conf = ionoscloud.Configuration( username='the-user', password='the-password', ) """ _default = None def __init__(self, host=None, token=None, token_prefix=None, username=None, password=None, fingerprint=None, discard_unknown_keys=False, disabled_client_side_validations="", server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, ): """Constructor """ self._base_path = "https://api.ionos.com/cloudapi/v6" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index self.server_operation_index = server_operation_index or {} """Default server index """ self.server_variables = server_variables or {} self.server_operation_variables = server_operation_variables or {} """Default server variables """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings self.token = {} if token: self.token = token """dict to store API key(s) """ self.token_prefix = {} if token_prefix: self.token_prefix = token_prefix """dict to store API prefix (e.g. Bearer) """ self.refresh_token_hook = None """function hook to refresh API key if expired """ self.username = username """Username for HTTP basic authentication """ self.password = password """Password for HTTP basic authentication """ self.fingerprint = fingerprint """API certificate fingerprint """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ self.logger["package_logger"] = logging.getLogger("ionoscloud") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None """Log stream handler """ self.logger_file_handler = None """Log file handler """ self.logger_file = None """Debug file location """ self.debug = False """Debug switch """ self.verify_ssl = True """SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server. """ self.ssl_ca_cert = None """Set this to customize the certificate file to verify the peer. """ self.cert_file = None """client certificate file """ self.key_file = None """client key file """ self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is not the best value when you are making a lot of possibly parallel requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance. """ self.proxy = os.environ.get('IONOS_HTTP_PROXY') """Proxy URL """ self.proxy_headers = {} proxy_headers_list = os.environ.get('IONOS_HTTP_PROXY_HEADERS','').splitlines() for header in proxy_headers_list: k,v = header.split(':', 1) self.proxy_headers[k.strip()] = bytes(v.lstrip(), "utf-8").decode("unicode_escape") """Proxy headers """ self.safe_chars_for_path_param = '/' """Safe chars for path_param """ self.retries = False """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = False """Default maximum number of api call retries""" self.max_retries = 3 self.wait_time = 100 self.max_wait_time = 2000 def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) # use setters to configure loggers result.logger_file = self.logger_file result.debug = self.debug return result def __setattr__(self, name, value): object.__setattr__(self, name, value) if name == 'disabled_client_side_validations': s = set(filter(None, value.split(','))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: raise ApiValueError( "Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s @classmethod def set_default(cls, default): """Set default instance of configuration. It stores default configuration, which can be returned by get_default_copy method. :param default: object of Configuration """ cls._default = copy.deepcopy(default) @classmethod def get_default_copy(cls): """Return new instance of configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration passed by the set_default method. :return: The configuration object. """ if cls._default is not None: return copy.deepcopy(cls._default) return Configuration() @property def logger_file(self): """The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str """ return self.__logger_file @logger_file.setter def logger_file(self, value): """The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str """ self.__logger_file = value if self.__logger_file: # If set logging file, # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) @property def debug(self): """Debug status :param value: The debug status, True or False. :type: bool """ return self.__debug @debug.setter def debug(self, value): """Debug status :param value: The debug status, True or False. :type: bool """ self.__debug = value if self.__debug: # if debug status is True, turn on debug logging for _, logger in six.iteritems(self.logger): logger.setLevel(logging.DEBUG) # turn on httplib debug httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in six.iteritems(self.logger): logger.setLevel(logging.WARNING) # turn off httplib debug httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): """The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str """ return self.__logger_format @logger_format.setter def logger_format(self, value): """The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str """ self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) def get_token_with_prefix(self): """Gets API key (with prefix if set). :return: The token for api key authentication. """ if not self.token_prefix: self.token_prefix = 'Bearer' if self.refresh_token_hook is not None: self.refresh_token_hook(self) return "%s %s" % (self.token_prefix, self.token) def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ username = "" if self.username is not None: username = self.username password = "" if self.password is not None: password = self.password return urllib3.util.make_headers( basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth = {} if self.username is not None and self.password is not None: auth['BasicAuthentication'] = { 'type': 'basic', 'in': 'header', 'key': 'Authorization', 'value': self.get_basic_auth_token() } if self.token: auth['TokenAuthentication'] = { 'type': 'token', 'in': 'header', 'key': 'Authorization', 'value': self.get_token_with_prefix(), } return auth def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. """ return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 6.0\n"\ "SDK Package Version: 6.1.13".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): """Gets an array of host settings :return: An array of host settings """ return [ { 'url': "https://api.ionos.com/cloudapi/v6", 'description': "No description provided", } ] def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :param servers: an array of host settings or None :return: URL based on host settings """ if index is None: return self._base_path variables = {} if variables is None else variables servers = self.get_host_settings() if servers is None else servers try: server = servers[index] except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " "Must be less than {1}".format(index, len(servers))) url = server['url'] # go through variables and replace placeholders for variable_name, variable in server.get('variables', {}).items(): used_value = variables.get( variable_name, variable['default_value']) if 'enum_values' in variable \ and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( variable_name, variables[variable_name], variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) return url @property def host(self): """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter def host(self, value): """Fix base path.""" self._base_path = value self.server_index = None ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/exceptions.py0000644000175100001660000001247315046550312020304 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import six class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): """ Raises an exception for TypeErrors Args: msg (str): the exception message Keyword Args: path_to_item (list): a list of keys an indices to get to the current_item None if unset valid_classes (tuple): the primitive classes that current item should be an instance of None if unset key_type (bool): False if our value is a value in a dict True if it is a key in a dict False if our item is an item in a list None if unset """ self.path_to_item = path_to_item self.valid_classes = valid_classes self.key_type = key_type full_msg = msg if path_to_item: full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) super(ApiTypeError, self).__init__(full_msg) class ApiValueError(OpenApiException, ValueError): def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message Keyword Args: path_to_item (list) the path to the exception in the received_data dict. None if unset """ self.path_to_item = path_to_item full_msg = msg if path_to_item: full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) super(ApiValueError, self).__init__(full_msg) class ApiAttributeError(OpenApiException, AttributeError): def __init__(self, msg, path_to_item=None): """ Raised when an attribute reference or assignment fails. Args: msg (str): the exception message Keyword Args: path_to_item (None/list) the path to the exception in the received_data dict """ self.path_to_item = path_to_item full_msg = msg if path_to_item: full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) super(ApiAttributeError, self).__init__(full_msg) class ApiKeyError(OpenApiException, KeyError): def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message Keyword Args: path_to_item (None/list) the path to the exception in the received_data dict """ self.path_to_item = path_to_item full_msg = msg if path_to_item: full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) super(ApiKeyError, self).__init__(full_msg) class ApiException(OpenApiException): def __init__(self, status=None, reason=None, http_resp=None, url=None): if http_resp: self.status = http_resp.status self.reason = http_resp.reason self.body = http_resp.data self.headers = http_resp.getheaders() self.url = url else: self.status = status self.reason = reason self.body = None self.headers = None def __str__(self): """Custom error messages for exception""" error_message = "({0})\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) return error_message class ApiTimeout(OpenApiException): def __init__(self, message, request_id=None): """ Args: msg (str): the exception message request_id (str): the request id if any """ self.message = message self.request_id = request_id def __str__(self): return self.message class ApiFailedRequest(OpenApiException): def __init__(self, message, request_id=None): """ Args: msg (str): the exception message request_id (str): the request id if any """ self.message = message self.request_id = request_id def __str__(self): return self.message def render_path(path_to_item): """Returns a string representation of a path""" result = "" for pth in path_to_item: if isinstance(pth, six.integer_types): result += "[{0}]".format(pth) else: result += "['{0}']".format(pth) return result ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2402747 ionoscloud-6.1.13/ionoscloud/models/0000755000175100001660000000000015046550321017025 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/models/__init__.py0000644000175100001660000003372615046550312021151 0ustar00runnerdocker# coding: utf-8 # flake8: noqa """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import # import models into model package from ionoscloud.models.application_load_balancer import ApplicationLoadBalancer from ionoscloud.models.application_load_balancer_entities import ApplicationLoadBalancerEntities from ionoscloud.models.application_load_balancer_forwarding_rule import ApplicationLoadBalancerForwardingRule from ionoscloud.models.application_load_balancer_forwarding_rule_properties import ApplicationLoadBalancerForwardingRuleProperties from ionoscloud.models.application_load_balancer_forwarding_rule_put import ApplicationLoadBalancerForwardingRulePut from ionoscloud.models.application_load_balancer_forwarding_rules import ApplicationLoadBalancerForwardingRules from ionoscloud.models.application_load_balancer_http_rule import ApplicationLoadBalancerHttpRule from ionoscloud.models.application_load_balancer_http_rule_condition import ApplicationLoadBalancerHttpRuleCondition from ionoscloud.models.application_load_balancer_properties import ApplicationLoadBalancerProperties from ionoscloud.models.application_load_balancer_put import ApplicationLoadBalancerPut from ionoscloud.models.application_load_balancers import ApplicationLoadBalancers from ionoscloud.models.attached_volumes import AttachedVolumes from ionoscloud.models.backup_unit import BackupUnit from ionoscloud.models.backup_unit_properties import BackupUnitProperties from ionoscloud.models.backup_unit_sso import BackupUnitSSO from ionoscloud.models.backup_units import BackupUnits from ionoscloud.models.balanced_nics import BalancedNics from ionoscloud.models.cdroms import Cdroms from ionoscloud.models.connectable_datacenter import ConnectableDatacenter from ionoscloud.models.contract import Contract from ionoscloud.models.contract_properties import ContractProperties from ionoscloud.models.contracts import Contracts from ionoscloud.models.cpu_architecture_properties import CpuArchitectureProperties from ionoscloud.models.create_snapshot import CreateSnapshot from ionoscloud.models.create_snapshot_properties import CreateSnapshotProperties from ionoscloud.models.data_center_entities import DataCenterEntities from ionoscloud.models.datacenter import Datacenter from ionoscloud.models.datacenter_element_metadata import DatacenterElementMetadata from ionoscloud.models.datacenter_post import DatacenterPost from ionoscloud.models.datacenter_properties import DatacenterProperties from ionoscloud.models.datacenter_properties_post import DatacenterPropertiesPost from ionoscloud.models.datacenter_properties_put import DatacenterPropertiesPut from ionoscloud.models.datacenter_put import DatacenterPut from ionoscloud.models.datacenters import Datacenters from ionoscloud.models.error import Error from ionoscloud.models.error_message import ErrorMessage from ionoscloud.models.firewall_rule import FirewallRule from ionoscloud.models.firewall_rules import FirewallRules from ionoscloud.models.firewallrule_properties import FirewallruleProperties from ionoscloud.models.flow_log import FlowLog from ionoscloud.models.flow_log_properties import FlowLogProperties from ionoscloud.models.flow_log_put import FlowLogPut from ionoscloud.models.flow_logs import FlowLogs from ionoscloud.models.group import Group from ionoscloud.models.group_entities import GroupEntities from ionoscloud.models.group_members import GroupMembers from ionoscloud.models.group_properties import GroupProperties from ionoscloud.models.group_share import GroupShare from ionoscloud.models.group_share_properties import GroupShareProperties from ionoscloud.models.group_shares import GroupShares from ionoscloud.models.group_users import GroupUsers from ionoscloud.models.groups import Groups from ionoscloud.models.ip_failover import IPFailover from ionoscloud.models.image import Image from ionoscloud.models.image_properties import ImageProperties from ionoscloud.models.images import Images from ionoscloud.models.info import Info from ionoscloud.models.ip_block import IpBlock from ionoscloud.models.ip_block_properties import IpBlockProperties from ionoscloud.models.ip_blocks import IpBlocks from ionoscloud.models.ip_consumer import IpConsumer from ionoscloud.models.kubernetes_auto_scaling import KubernetesAutoScaling from ionoscloud.models.kubernetes_cluster import KubernetesCluster from ionoscloud.models.kubernetes_cluster_entities import KubernetesClusterEntities from ionoscloud.models.kubernetes_cluster_for_post import KubernetesClusterForPost from ionoscloud.models.kubernetes_cluster_for_put import KubernetesClusterForPut from ionoscloud.models.kubernetes_cluster_properties import KubernetesClusterProperties from ionoscloud.models.kubernetes_cluster_properties_for_post import KubernetesClusterPropertiesForPost from ionoscloud.models.kubernetes_cluster_properties_for_put import KubernetesClusterPropertiesForPut from ionoscloud.models.kubernetes_clusters import KubernetesClusters from ionoscloud.models.kubernetes_maintenance_window import KubernetesMaintenanceWindow from ionoscloud.models.kubernetes_node import KubernetesNode from ionoscloud.models.kubernetes_node_metadata import KubernetesNodeMetadata from ionoscloud.models.kubernetes_node_pool import KubernetesNodePool from ionoscloud.models.kubernetes_node_pool_for_post import KubernetesNodePoolForPost from ionoscloud.models.kubernetes_node_pool_for_put import KubernetesNodePoolForPut from ionoscloud.models.kubernetes_node_pool_lan import KubernetesNodePoolLan from ionoscloud.models.kubernetes_node_pool_lan_routes import KubernetesNodePoolLanRoutes from ionoscloud.models.kubernetes_node_pool_properties import KubernetesNodePoolProperties from ionoscloud.models.kubernetes_node_pool_properties_for_post import KubernetesNodePoolPropertiesForPost from ionoscloud.models.kubernetes_node_pool_properties_for_put import KubernetesNodePoolPropertiesForPut from ionoscloud.models.kubernetes_node_pool_server_type import KubernetesNodePoolServerType from ionoscloud.models.kubernetes_node_pools import KubernetesNodePools from ionoscloud.models.kubernetes_node_properties import KubernetesNodeProperties from ionoscloud.models.kubernetes_nodes import KubernetesNodes from ionoscloud.models.label import Label from ionoscloud.models.label_properties import LabelProperties from ionoscloud.models.label_resource import LabelResource from ionoscloud.models.label_resource_properties import LabelResourceProperties from ionoscloud.models.label_resources import LabelResources from ionoscloud.models.labels import Labels from ionoscloud.models.lan import Lan from ionoscloud.models.lan_entities import LanEntities from ionoscloud.models.lan_nics import LanNics from ionoscloud.models.lan_properties import LanProperties from ionoscloud.models.lans import Lans from ionoscloud.models.list_of_ids import ListOfIds from ionoscloud.models.loadbalancer import Loadbalancer from ionoscloud.models.loadbalancer_entities import LoadbalancerEntities from ionoscloud.models.loadbalancer_properties import LoadbalancerProperties from ionoscloud.models.loadbalancers import Loadbalancers from ionoscloud.models.location import Location from ionoscloud.models.location_properties import LocationProperties from ionoscloud.models.locations import Locations from ionoscloud.models.nat_gateway import NatGateway from ionoscloud.models.nat_gateway_entities import NatGatewayEntities from ionoscloud.models.nat_gateway_lan_properties import NatGatewayLanProperties from ionoscloud.models.nat_gateway_properties import NatGatewayProperties from ionoscloud.models.nat_gateway_put import NatGatewayPut from ionoscloud.models.nat_gateway_rule import NatGatewayRule from ionoscloud.models.nat_gateway_rule_properties import NatGatewayRuleProperties from ionoscloud.models.nat_gateway_rule_protocol import NatGatewayRuleProtocol from ionoscloud.models.nat_gateway_rule_put import NatGatewayRulePut from ionoscloud.models.nat_gateway_rule_type import NatGatewayRuleType from ionoscloud.models.nat_gateway_rules import NatGatewayRules from ionoscloud.models.nat_gateways import NatGateways from ionoscloud.models.network_load_balancer import NetworkLoadBalancer from ionoscloud.models.network_load_balancer_entities import NetworkLoadBalancerEntities from ionoscloud.models.network_load_balancer_forwarding_rule import NetworkLoadBalancerForwardingRule from ionoscloud.models.network_load_balancer_forwarding_rule_health_check import NetworkLoadBalancerForwardingRuleHealthCheck from ionoscloud.models.network_load_balancer_forwarding_rule_properties import NetworkLoadBalancerForwardingRuleProperties from ionoscloud.models.network_load_balancer_forwarding_rule_put import NetworkLoadBalancerForwardingRulePut from ionoscloud.models.network_load_balancer_forwarding_rule_target import NetworkLoadBalancerForwardingRuleTarget from ionoscloud.models.network_load_balancer_forwarding_rule_target_health_check import NetworkLoadBalancerForwardingRuleTargetHealthCheck from ionoscloud.models.network_load_balancer_forwarding_rules import NetworkLoadBalancerForwardingRules from ionoscloud.models.network_load_balancer_properties import NetworkLoadBalancerProperties from ionoscloud.models.network_load_balancer_put import NetworkLoadBalancerPut from ionoscloud.models.network_load_balancers import NetworkLoadBalancers from ionoscloud.models.nic import Nic from ionoscloud.models.nic_entities import NicEntities from ionoscloud.models.nic_properties import NicProperties from ionoscloud.models.nic_put import NicPut from ionoscloud.models.nics import Nics from ionoscloud.models.no_state_meta_data import NoStateMetaData from ionoscloud.models.pagination_links import PaginationLinks from ionoscloud.models.peer import Peer from ionoscloud.models.private_cross_connect import PrivateCrossConnect from ionoscloud.models.private_cross_connect_properties import PrivateCrossConnectProperties from ionoscloud.models.private_cross_connects import PrivateCrossConnects from ionoscloud.models.remote_console_url import RemoteConsoleUrl from ionoscloud.models.request import Request from ionoscloud.models.request_metadata import RequestMetadata from ionoscloud.models.request_properties import RequestProperties from ionoscloud.models.request_status import RequestStatus from ionoscloud.models.request_status_metadata import RequestStatusMetadata from ionoscloud.models.request_target import RequestTarget from ionoscloud.models.requests import Requests from ionoscloud.models.resource import Resource from ionoscloud.models.resource_entities import ResourceEntities from ionoscloud.models.resource_groups import ResourceGroups from ionoscloud.models.resource_limits import ResourceLimits from ionoscloud.models.resource_properties import ResourceProperties from ionoscloud.models.resource_reference import ResourceReference from ionoscloud.models.resources import Resources from ionoscloud.models.resources_users import ResourcesUsers from ionoscloud.models.restore_snapshot import RestoreSnapshot from ionoscloud.models.restore_snapshot_properties import RestoreSnapshotProperties from ionoscloud.models.s3_bucket import S3Bucket from ionoscloud.models.s3_key import S3Key from ionoscloud.models.s3_key_metadata import S3KeyMetadata from ionoscloud.models.s3_key_properties import S3KeyProperties from ionoscloud.models.s3_keys import S3Keys from ionoscloud.models.s3_object_storage_sso import S3ObjectStorageSSO from ionoscloud.models.security_group import SecurityGroup from ionoscloud.models.security_group_entities import SecurityGroupEntities from ionoscloud.models.security_group_entities_request import SecurityGroupEntitiesRequest from ionoscloud.models.security_group_properties import SecurityGroupProperties from ionoscloud.models.security_group_request import SecurityGroupRequest from ionoscloud.models.security_groups import SecurityGroups from ionoscloud.models.server import Server from ionoscloud.models.server_entities import ServerEntities from ionoscloud.models.server_properties import ServerProperties from ionoscloud.models.servers import Servers from ionoscloud.models.snapshot import Snapshot from ionoscloud.models.snapshot_properties import SnapshotProperties from ionoscloud.models.snapshots import Snapshots from ionoscloud.models.target_group import TargetGroup from ionoscloud.models.target_group_health_check import TargetGroupHealthCheck from ionoscloud.models.target_group_http_health_check import TargetGroupHttpHealthCheck from ionoscloud.models.target_group_properties import TargetGroupProperties from ionoscloud.models.target_group_put import TargetGroupPut from ionoscloud.models.target_group_target import TargetGroupTarget from ionoscloud.models.target_groups import TargetGroups from ionoscloud.models.target_port_range import TargetPortRange from ionoscloud.models.template import Template from ionoscloud.models.template_properties import TemplateProperties from ionoscloud.models.templates import Templates from ionoscloud.models.token import Token from ionoscloud.models.type import Type from ionoscloud.models.user import User from ionoscloud.models.user_group_post import UserGroupPost from ionoscloud.models.user_metadata import UserMetadata from ionoscloud.models.user_post import UserPost from ionoscloud.models.user_properties import UserProperties from ionoscloud.models.user_properties_post import UserPropertiesPost from ionoscloud.models.user_properties_put import UserPropertiesPut from ionoscloud.models.user_put import UserPut from ionoscloud.models.users import Users from ionoscloud.models.users_entities import UsersEntities from ionoscloud.models.volume import Volume from ionoscloud.models.volume_properties import VolumeProperties from ionoscloud.models.volumes import Volumes ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer.py0000644000175100001660000001725215046550310024535 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancer(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ApplicationLoadBalancerProperties', 'entities': 'ApplicationLoadBalancerEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this ApplicationLoadBalancer. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancer. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancer. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancer. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancer. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancer. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancer. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancer. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancer. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancer. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancer. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancer. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this ApplicationLoadBalancer. # noqa: E501 :return: The metadata of this ApplicationLoadBalancer. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this ApplicationLoadBalancer. :param metadata: The metadata of this ApplicationLoadBalancer. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this ApplicationLoadBalancer. # noqa: E501 :return: The properties of this ApplicationLoadBalancer. # noqa: E501 :rtype: ApplicationLoadBalancerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this ApplicationLoadBalancer. :param properties: The properties of this ApplicationLoadBalancer. # noqa: E501 :type properties: ApplicationLoadBalancerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this ApplicationLoadBalancer. # noqa: E501 :return: The entities of this ApplicationLoadBalancer. # noqa: E501 :rtype: ApplicationLoadBalancerEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this ApplicationLoadBalancer. :param entities: The entities of this ApplicationLoadBalancer. # noqa: E501 :type entities: ApplicationLoadBalancerEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancer): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancer): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_entities.py0000644000175100001660000000773715046550310026450 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'forwardingrules': 'ApplicationLoadBalancerForwardingRules', } attribute_map = { 'forwardingrules': 'forwardingrules', } def __init__(self, forwardingrules=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._forwardingrules = None self.discriminator = None if forwardingrules is not None: self.forwardingrules = forwardingrules @property def forwardingrules(self): """Gets the forwardingrules of this ApplicationLoadBalancerEntities. # noqa: E501 :return: The forwardingrules of this ApplicationLoadBalancerEntities. # noqa: E501 :rtype: ApplicationLoadBalancerForwardingRules """ return self._forwardingrules @forwardingrules.setter def forwardingrules(self, forwardingrules): """Sets the forwardingrules of this ApplicationLoadBalancerEntities. :param forwardingrules: The forwardingrules of this ApplicationLoadBalancerEntities. # noqa: E501 :type forwardingrules: ApplicationLoadBalancerForwardingRules """ self._forwardingrules = forwardingrules def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_forwarding_rule.py0000644000175100001660000001641015046550310030001 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerForwardingRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ApplicationLoadBalancerForwardingRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerForwardingRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this ApplicationLoadBalancerForwardingRule. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancerForwardingRule. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancerForwardingRule. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerForwardingRule. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancerForwardingRule. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancerForwardingRule. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :return: The metadata of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this ApplicationLoadBalancerForwardingRule. :param metadata: The metadata of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :return: The properties of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :rtype: ApplicationLoadBalancerForwardingRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this ApplicationLoadBalancerForwardingRule. :param properties: The properties of this ApplicationLoadBalancerForwardingRule. # noqa: E501 :type properties: ApplicationLoadBalancerForwardingRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRule): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRule): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_forwarding_rule_properties.py0000644000175100001660000002717215046550310032264 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerForwardingRuleProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'protocol': 'str', 'listener_ip': 'str', 'listener_port': 'int', 'client_timeout': 'int', 'server_certificates': 'list[str]', 'http_rules': 'list[ApplicationLoadBalancerHttpRule]', } attribute_map = { 'name': 'name', 'protocol': 'protocol', 'listener_ip': 'listenerIp', 'listener_port': 'listenerPort', 'client_timeout': 'clientTimeout', 'server_certificates': 'serverCertificates', 'http_rules': 'httpRules', } def __init__(self, name=None, protocol=None, listener_ip=None, listener_port=None, client_timeout=None, server_certificates=None, http_rules=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerForwardingRuleProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._protocol = None self._listener_ip = None self._listener_port = None self._client_timeout = None self._server_certificates = None self._http_rules = None self.discriminator = None self.name = name self.protocol = protocol self.listener_ip = listener_ip self.listener_port = listener_port if client_timeout is not None: self.client_timeout = client_timeout if server_certificates is not None: self.server_certificates = server_certificates if http_rules is not None: self.http_rules = http_rules @property def name(self): """Gets the name of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 The name of the Application Load Balancer forwarding rule. # noqa: E501 :return: The name of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ApplicationLoadBalancerForwardingRuleProperties. The name of the Application Load Balancer forwarding rule. # noqa: E501 :param name: The name of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def protocol(self): """Gets the protocol of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 The balancing protocol. # noqa: E501 :return: The protocol of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this ApplicationLoadBalancerForwardingRuleProperties. The balancing protocol. # noqa: E501 :param protocol: The protocol of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type protocol: str """ if self.local_vars_configuration.client_side_validation and protocol is None: # noqa: E501 raise ValueError("Invalid value for `protocol`, must not be `None`") # noqa: E501 allowed_values = ["HTTP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol @property def listener_ip(self): """Gets the listener_ip of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 The listening (inbound) IP. # noqa: E501 :return: The listener_ip of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._listener_ip @listener_ip.setter def listener_ip(self, listener_ip): """Sets the listener_ip of this ApplicationLoadBalancerForwardingRuleProperties. The listening (inbound) IP. # noqa: E501 :param listener_ip: The listener_ip of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type listener_ip: str """ if self.local_vars_configuration.client_side_validation and listener_ip is None: # noqa: E501 raise ValueError("Invalid value for `listener_ip`, must not be `None`") # noqa: E501 self._listener_ip = listener_ip @property def listener_port(self): """Gets the listener_port of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 The listening (inbound) port number; the valid range is 1 to 65535. # noqa: E501 :return: The listener_port of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: int """ return self._listener_port @listener_port.setter def listener_port(self, listener_port): """Sets the listener_port of this ApplicationLoadBalancerForwardingRuleProperties. The listening (inbound) port number; the valid range is 1 to 65535. # noqa: E501 :param listener_port: The listener_port of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type listener_port: int """ if self.local_vars_configuration.client_side_validation and listener_port is None: # noqa: E501 raise ValueError("Invalid value for `listener_port`, must not be `None`") # noqa: E501 self._listener_port = listener_port @property def client_timeout(self): """Gets the client_timeout of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). # noqa: E501 :return: The client_timeout of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: int """ return self._client_timeout @client_timeout.setter def client_timeout(self, client_timeout): """Sets the client_timeout of this ApplicationLoadBalancerForwardingRuleProperties. The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). # noqa: E501 :param client_timeout: The client_timeout of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type client_timeout: int """ self._client_timeout = client_timeout @property def server_certificates(self): """Gets the server_certificates of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The server_certificates of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: list[str] """ return self._server_certificates @server_certificates.setter def server_certificates(self, server_certificates): """Sets the server_certificates of this ApplicationLoadBalancerForwardingRuleProperties. Array of items in the collection. # noqa: E501 :param server_certificates: The server_certificates of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type server_certificates: list[str] """ self._server_certificates = server_certificates @property def http_rules(self): """Gets the http_rules of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 An array of items in the collection. The original order of rules is preserved during processing, except that rules of the 'FORWARD' type are processed after the rules with other defined actions. The relative order of the 'FORWARD' type rules is also preserved during the processing. # noqa: E501 :return: The http_rules of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: list[ApplicationLoadBalancerHttpRule] """ return self._http_rules @http_rules.setter def http_rules(self, http_rules): """Sets the http_rules of this ApplicationLoadBalancerForwardingRuleProperties. An array of items in the collection. The original order of rules is preserved during processing, except that rules of the 'FORWARD' type are processed after the rules with other defined actions. The relative order of the 'FORWARD' type rules is also preserved during the processing. # noqa: E501 :param http_rules: The http_rules of this ApplicationLoadBalancerForwardingRuleProperties. # noqa: E501 :type http_rules: list[ApplicationLoadBalancerHttpRule] """ self._http_rules = http_rules def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRuleProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRuleProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_forwarding_rule_put.py0000644000175100001660000001500215046550310030665 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerForwardingRulePut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'ApplicationLoadBalancerForwardingRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerForwardingRulePut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancerForwardingRulePut. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerForwardingRulePut. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancerForwardingRulePut. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :return: The properties of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :rtype: ApplicationLoadBalancerForwardingRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this ApplicationLoadBalancerForwardingRulePut. :param properties: The properties of this ApplicationLoadBalancerForwardingRulePut. # noqa: E501 :type properties: ApplicationLoadBalancerForwardingRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRulePut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRulePut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_forwarding_rules.py0000644000175100001660000002131015046550310030157 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerForwardingRules(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[ApplicationLoadBalancerForwardingRule]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerForwardingRules - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this ApplicationLoadBalancerForwardingRules. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancerForwardingRules. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancerForwardingRules. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerForwardingRules. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancerForwardingRules. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancerForwardingRules. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this ApplicationLoadBalancerForwardingRules. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: list[ApplicationLoadBalancerForwardingRule] """ return self._items @items.setter def items(self, items): """Sets the items of this ApplicationLoadBalancerForwardingRules. Array of items in the collection. # noqa: E501 :param items: The items of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type items: list[ApplicationLoadBalancerForwardingRule] """ self._items = items @property def offset(self): """Gets the offset of this ApplicationLoadBalancerForwardingRules. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this ApplicationLoadBalancerForwardingRules. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this ApplicationLoadBalancerForwardingRules. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this ApplicationLoadBalancerForwardingRules. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :return: The links of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this ApplicationLoadBalancerForwardingRules. :param links: The links of this ApplicationLoadBalancerForwardingRules. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRules): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerForwardingRules): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_http_rule.py0000644000175100001660000003203115046550310026613 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerHttpRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'type': 'str', 'target_group': 'str', 'drop_query': 'bool', 'location': 'str', 'status_code': 'int', 'response_message': 'str', 'content_type': 'str', 'conditions': 'list[ApplicationLoadBalancerHttpRuleCondition]', } attribute_map = { 'name': 'name', 'type': 'type', 'target_group': 'targetGroup', 'drop_query': 'dropQuery', 'location': 'location', 'status_code': 'statusCode', 'response_message': 'responseMessage', 'content_type': 'contentType', 'conditions': 'conditions', } def __init__(self, name=None, type=None, target_group=None, drop_query=None, location=None, status_code=None, response_message=None, content_type=None, conditions=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerHttpRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._type = None self._target_group = None self._drop_query = None self._location = None self._status_code = None self._response_message = None self._content_type = None self._conditions = None self.discriminator = None self.name = name self.type = type if target_group is not None: self.target_group = target_group if drop_query is not None: self.drop_query = drop_query if location is not None: self.location = location if status_code is not None: self.status_code = status_code if response_message is not None: self.response_message = response_message if content_type is not None: self.content_type = content_type if conditions is not None: self.conditions = conditions @property def name(self): """Gets the name of this ApplicationLoadBalancerHttpRule. # noqa: E501 The unique name of the Application Load Balancer HTTP rule. # noqa: E501 :return: The name of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ApplicationLoadBalancerHttpRule. The unique name of the Application Load Balancer HTTP rule. # noqa: E501 :param name: The name of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def type(self): """Gets the type of this ApplicationLoadBalancerHttpRule. # noqa: E501 The HTTP rule type. # noqa: E501 :return: The type of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerHttpRule. The HTTP rule type. # noqa: E501 :param type: The type of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 allowed_values = ["FORWARD", "STATIC", "REDIRECT"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def target_group(self): """Gets the target_group of this ApplicationLoadBalancerHttpRule. # noqa: E501 The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. # noqa: E501 :return: The target_group of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._target_group @target_group.setter def target_group(self, target_group): """Sets the target_group of this ApplicationLoadBalancerHttpRule. The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. # noqa: E501 :param target_group: The target_group of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type target_group: str """ self._target_group = target_group @property def drop_query(self): """Gets the drop_query of this ApplicationLoadBalancerHttpRule. # noqa: E501 Indicates whether the query part of the URI should be dropped and is valid only for 'REDIRECT' actions. Default value is 'FALSE', the redirect URI does not contain any query parameters. # noqa: E501 :return: The drop_query of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: bool """ return self._drop_query @drop_query.setter def drop_query(self, drop_query): """Sets the drop_query of this ApplicationLoadBalancerHttpRule. Indicates whether the query part of the URI should be dropped and is valid only for 'REDIRECT' actions. Default value is 'FALSE', the redirect URI does not contain any query parameters. # noqa: E501 :param drop_query: The drop_query of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type drop_query: bool """ self._drop_query = drop_query @property def location(self): """Gets the location of this ApplicationLoadBalancerHttpRule. # noqa: E501 The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. # noqa: E501 :return: The location of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this ApplicationLoadBalancerHttpRule. The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. # noqa: E501 :param location: The location of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type location: str """ self._location = location @property def status_code(self): """Gets the status_code of this ApplicationLoadBalancerHttpRule. # noqa: E501 The status code is for 'REDIRECT' and 'STATIC' actions only. If the HTTP rule is 'REDIRECT' the valid values are: 301, 302, 303, 307, 308; default value is '301'. If the HTTP rule is 'STATIC' the valid values are from the range 200-599; default value is '503'. # noqa: E501 :return: The status_code of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: int """ return self._status_code @status_code.setter def status_code(self, status_code): """Sets the status_code of this ApplicationLoadBalancerHttpRule. The status code is for 'REDIRECT' and 'STATIC' actions only. If the HTTP rule is 'REDIRECT' the valid values are: 301, 302, 303, 307, 308; default value is '301'. If the HTTP rule is 'STATIC' the valid values are from the range 200-599; default value is '503'. # noqa: E501 :param status_code: The status_code of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type status_code: int """ self._status_code = status_code @property def response_message(self): """Gets the response_message of this ApplicationLoadBalancerHttpRule. # noqa: E501 The response message of the request; this parameter is mandatory for 'STATIC' actions. # noqa: E501 :return: The response_message of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._response_message @response_message.setter def response_message(self, response_message): """Sets the response_message of this ApplicationLoadBalancerHttpRule. The response message of the request; this parameter is mandatory for 'STATIC' actions. # noqa: E501 :param response_message: The response_message of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type response_message: str """ self._response_message = response_message @property def content_type(self): """Gets the content_type of this ApplicationLoadBalancerHttpRule. # noqa: E501 Specifies the content type and is valid only for 'STATIC' actions. # noqa: E501 :return: The content_type of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: str """ return self._content_type @content_type.setter def content_type(self, content_type): """Sets the content_type of this ApplicationLoadBalancerHttpRule. Specifies the content type and is valid only for 'STATIC' actions. # noqa: E501 :param content_type: The content_type of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type content_type: str """ self._content_type = content_type @property def conditions(self): """Gets the conditions of this ApplicationLoadBalancerHttpRule. # noqa: E501 An array of items in the collection. The action will be executed only if each condition is met; the rule will always be applied if no conditions are set. # noqa: E501 :return: The conditions of this ApplicationLoadBalancerHttpRule. # noqa: E501 :rtype: list[ApplicationLoadBalancerHttpRuleCondition] """ return self._conditions @conditions.setter def conditions(self, conditions): """Sets the conditions of this ApplicationLoadBalancerHttpRule. An array of items in the collection. The action will be executed only if each condition is met; the rule will always be applied if no conditions are set. # noqa: E501 :param conditions: The conditions of this ApplicationLoadBalancerHttpRule. # noqa: E501 :type conditions: list[ApplicationLoadBalancerHttpRuleCondition] """ self._conditions = conditions def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerHttpRule): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerHttpRule): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_http_rule_condition.py0000644000175100001660000002237615046550310030674 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerHttpRuleCondition(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'type': 'str', 'condition': 'str', 'negate': 'bool', 'key': 'str', 'value': 'str', } attribute_map = { 'type': 'type', 'condition': 'condition', 'negate': 'negate', 'key': 'key', 'value': 'value', } def __init__(self, type=None, condition=None, negate=None, key=None, value=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerHttpRuleCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._type = None self._condition = None self._negate = None self._key = None self._value = None self.discriminator = None self.type = type self.condition = condition if negate is not None: self.negate = negate if key is not None: self.key = key if value is not None: self.value = value @property def type(self): """Gets the type of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 The HTTP rule condition type. # noqa: E501 :return: The type of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerHttpRuleCondition. The HTTP rule condition type. # noqa: E501 :param type: The type of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 allowed_values = ["HEADER", "PATH", "QUERY", "METHOD", "HOST", "COOKIE", "SOURCE_IP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def condition(self): """Gets the condition of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 The matching rule for the HTTP rule condition attribute; this parameter is mandatory for 'HEADER', 'PATH', 'QUERY', 'METHOD', 'HOST', and 'COOKIE' types. It must be 'null' if the type is 'SOURCE_IP'. # noqa: E501 :return: The condition of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :rtype: str """ return self._condition @condition.setter def condition(self, condition): """Sets the condition of this ApplicationLoadBalancerHttpRuleCondition. The matching rule for the HTTP rule condition attribute; this parameter is mandatory for 'HEADER', 'PATH', 'QUERY', 'METHOD', 'HOST', and 'COOKIE' types. It must be 'null' if the type is 'SOURCE_IP'. # noqa: E501 :param condition: The condition of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :type condition: str """ if self.local_vars_configuration.client_side_validation and condition is None: # noqa: E501 raise ValueError("Invalid value for `condition`, must not be `None`") # noqa: E501 allowed_values = ["EXISTS", "CONTAINS", "EQUALS", "MATCHES", "STARTS_WITH", "ENDS_WITH"] # noqa: E501 if self.local_vars_configuration.client_side_validation and condition not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `condition` ({0}), must be one of {1}" # noqa: E501 .format(condition, allowed_values) ) self._condition = condition @property def negate(self): """Gets the negate of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 Specifies whether the condition should be negated; the default value is 'FALSE'. # noqa: E501 :return: The negate of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :rtype: bool """ return self._negate @negate.setter def negate(self, negate): """Sets the negate of this ApplicationLoadBalancerHttpRuleCondition. Specifies whether the condition should be negated; the default value is 'FALSE'. # noqa: E501 :param negate: The negate of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :type negate: bool """ self._negate = negate @property def key(self): """Gets the key of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 The key can only be set when the HTTP rule condition type is 'COOKIES', 'HEADER', or 'QUERY'. For the type 'PATH', 'METHOD', 'HOST', or 'SOURCE_IP' the value must be 'null'. # noqa: E501 :return: The key of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :rtype: str """ return self._key @key.setter def key(self, key): """Sets the key of this ApplicationLoadBalancerHttpRuleCondition. The key can only be set when the HTTP rule condition type is 'COOKIES', 'HEADER', or 'QUERY'. For the type 'PATH', 'METHOD', 'HOST', or 'SOURCE_IP' the value must be 'null'. # noqa: E501 :param key: The key of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :type key: str """ self._key = key @property def value(self): """Gets the value of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 This parameter is mandatory for the conditions 'CONTAINS', 'EQUALS', 'MATCHES', 'STARTS_WITH', 'ENDS_WITH', or if the type is 'SOURCE_IP'. Specify a valid CIDR. If the condition is 'EXISTS', the value must be 'null'. # noqa: E501 :return: The value of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :rtype: str """ return self._value @value.setter def value(self, value): """Sets the value of this ApplicationLoadBalancerHttpRuleCondition. This parameter is mandatory for the conditions 'CONTAINS', 'EQUALS', 'MATCHES', 'STARTS_WITH', 'ENDS_WITH', or if the type is 'SOURCE_IP'. Specify a valid CIDR. If the condition is 'EXISTS', the value must be 'null'. # noqa: E501 :param value: The value of this ApplicationLoadBalancerHttpRuleCondition. # noqa: E501 :type value: str """ self._value = value def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerHttpRuleCondition): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerHttpRuleCondition): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_properties.py0000644000175100001660000002504215046550310027005 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'listener_lan': 'int', 'ips': 'list[str]', 'target_lan': 'int', 'lb_private_ips': 'list[str]', 'central_logging': 'bool', 'logging_format': 'str', } attribute_map = { 'name': 'name', 'listener_lan': 'listenerLan', 'ips': 'ips', 'target_lan': 'targetLan', 'lb_private_ips': 'lbPrivateIps', 'central_logging': 'centralLogging', 'logging_format': 'loggingFormat', } def __init__(self, name=None, listener_lan=None, ips=None, target_lan=None, lb_private_ips=None, central_logging=None, logging_format=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._listener_lan = None self._ips = None self._target_lan = None self._lb_private_ips = None self._central_logging = None self._logging_format = None self.discriminator = None self.name = name self.listener_lan = listener_lan if ips is not None: self.ips = ips self.target_lan = target_lan if lb_private_ips is not None: self.lb_private_ips = lb_private_ips if central_logging is not None: self.central_logging = central_logging if logging_format is not None: self.logging_format = logging_format @property def name(self): """Gets the name of this ApplicationLoadBalancerProperties. # noqa: E501 The Application Load Balancer name. # noqa: E501 :return: The name of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ApplicationLoadBalancerProperties. The Application Load Balancer name. # noqa: E501 :param name: The name of this ApplicationLoadBalancerProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def listener_lan(self): """Gets the listener_lan of this ApplicationLoadBalancerProperties. # noqa: E501 The ID of the listening (inbound) LAN. # noqa: E501 :return: The listener_lan of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: int """ return self._listener_lan @listener_lan.setter def listener_lan(self, listener_lan): """Sets the listener_lan of this ApplicationLoadBalancerProperties. The ID of the listening (inbound) LAN. # noqa: E501 :param listener_lan: The listener_lan of this ApplicationLoadBalancerProperties. # noqa: E501 :type listener_lan: int """ if self.local_vars_configuration.client_side_validation and listener_lan is None: # noqa: E501 raise ValueError("Invalid value for `listener_lan`, must not be `None`") # noqa: E501 self._listener_lan = listener_lan @property def ips(self): """Gets the ips of this ApplicationLoadBalancerProperties. # noqa: E501 Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers. # noqa: E501 :return: The ips of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: list[str] """ return self._ips @ips.setter def ips(self, ips): """Sets the ips of this ApplicationLoadBalancerProperties. Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers. # noqa: E501 :param ips: The ips of this ApplicationLoadBalancerProperties. # noqa: E501 :type ips: list[str] """ self._ips = ips @property def target_lan(self): """Gets the target_lan of this ApplicationLoadBalancerProperties. # noqa: E501 The ID of the balanced private target LAN (outbound). # noqa: E501 :return: The target_lan of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: int """ return self._target_lan @target_lan.setter def target_lan(self, target_lan): """Sets the target_lan of this ApplicationLoadBalancerProperties. The ID of the balanced private target LAN (outbound). # noqa: E501 :param target_lan: The target_lan of this ApplicationLoadBalancerProperties. # noqa: E501 :type target_lan: int """ if self.local_vars_configuration.client_side_validation and target_lan is None: # noqa: E501 raise ValueError("Invalid value for `target_lan`, must not be `None`") # noqa: E501 self._target_lan = target_lan @property def lb_private_ips(self): """Gets the lb_private_ips of this ApplicationLoadBalancerProperties. # noqa: E501 Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :return: The lb_private_ips of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: list[str] """ return self._lb_private_ips @lb_private_ips.setter def lb_private_ips(self, lb_private_ips): """Sets the lb_private_ips of this ApplicationLoadBalancerProperties. Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :param lb_private_ips: The lb_private_ips of this ApplicationLoadBalancerProperties. # noqa: E501 :type lb_private_ips: list[str] """ self._lb_private_ips = lb_private_ips @property def central_logging(self): """Gets the central_logging of this ApplicationLoadBalancerProperties. # noqa: E501 Turn logging on and off for this product. Default value is 'false'. # noqa: E501 :return: The central_logging of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: bool """ return self._central_logging @central_logging.setter def central_logging(self, central_logging): """Sets the central_logging of this ApplicationLoadBalancerProperties. Turn logging on and off for this product. Default value is 'false'. # noqa: E501 :param central_logging: The central_logging of this ApplicationLoadBalancerProperties. # noqa: E501 :type central_logging: bool """ self._central_logging = central_logging @property def logging_format(self): """Gets the logging_format of this ApplicationLoadBalancerProperties. # noqa: E501 Specifies the format of the logs. # noqa: E501 :return: The logging_format of this ApplicationLoadBalancerProperties. # noqa: E501 :rtype: str """ return self._logging_format @logging_format.setter def logging_format(self, logging_format): """Sets the logging_format of this ApplicationLoadBalancerProperties. Specifies the format of the logs. # noqa: E501 :param logging_format: The logging_format of this ApplicationLoadBalancerProperties. # noqa: E501 :type logging_format: str """ self._logging_format = logging_format def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancer_put.py0000644000175100001660000001430015046550310025414 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancerPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'ApplicationLoadBalancerProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancerPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this ApplicationLoadBalancerPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancerPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancerPut. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancerPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancerPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancerPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancerPut. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancerPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancerPut. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancerPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancerPut. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancerPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this ApplicationLoadBalancerPut. # noqa: E501 :return: The properties of this ApplicationLoadBalancerPut. # noqa: E501 :rtype: ApplicationLoadBalancerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this ApplicationLoadBalancerPut. :param properties: The properties of this ApplicationLoadBalancerPut. # noqa: E501 :type properties: ApplicationLoadBalancerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancerPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancerPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/application_load_balancers.py0000644000175100001660000002033615046550310024715 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ApplicationLoadBalancers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[ApplicationLoadBalancer]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """ApplicationLoadBalancers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this ApplicationLoadBalancers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ApplicationLoadBalancers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ApplicationLoadBalancers. The resource's unique identifier. # noqa: E501 :param id: The id of this ApplicationLoadBalancers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ApplicationLoadBalancers. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ApplicationLoadBalancers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ApplicationLoadBalancers. The type of object that has been created. # noqa: E501 :param type: The type of this ApplicationLoadBalancers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ApplicationLoadBalancers. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this ApplicationLoadBalancers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ApplicationLoadBalancers. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ApplicationLoadBalancers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this ApplicationLoadBalancers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this ApplicationLoadBalancers. # noqa: E501 :rtype: list[ApplicationLoadBalancer] """ return self._items @items.setter def items(self, items): """Sets the items of this ApplicationLoadBalancers. Array of items in the collection. # noqa: E501 :param items: The items of this ApplicationLoadBalancers. # noqa: E501 :type items: list[ApplicationLoadBalancer] """ self._items = items @property def offset(self): """Gets the offset of this ApplicationLoadBalancers. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this ApplicationLoadBalancers. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this ApplicationLoadBalancers. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this ApplicationLoadBalancers. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this ApplicationLoadBalancers. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this ApplicationLoadBalancers. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this ApplicationLoadBalancers. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this ApplicationLoadBalancers. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this ApplicationLoadBalancers. # noqa: E501 :return: The links of this ApplicationLoadBalancers. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this ApplicationLoadBalancers. :param links: The links of this ApplicationLoadBalancers. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ApplicationLoadBalancers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ApplicationLoadBalancers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/attached_volumes.py0000644000175100001660000001761315046550310022734 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class AttachedVolumes(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Volume]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """AttachedVolumes - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this AttachedVolumes. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this AttachedVolumes. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this AttachedVolumes. The resource's unique identifier. # noqa: E501 :param id: The id of this AttachedVolumes. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this AttachedVolumes. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this AttachedVolumes. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this AttachedVolumes. The type of object that has been created. # noqa: E501 :param type: The type of this AttachedVolumes. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this AttachedVolumes. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this AttachedVolumes. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this AttachedVolumes. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this AttachedVolumes. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this AttachedVolumes. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this AttachedVolumes. # noqa: E501 :rtype: list[Volume] """ return self._items @items.setter def items(self, items): """Sets the items of this AttachedVolumes. Array of items in the collection. # noqa: E501 :param items: The items of this AttachedVolumes. # noqa: E501 :type items: list[Volume] """ self._items = items @property def offset(self): """Gets the offset of this AttachedVolumes. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this AttachedVolumes. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this AttachedVolumes. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this AttachedVolumes. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this AttachedVolumes. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this AttachedVolumes. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this AttachedVolumes. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this AttachedVolumes. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this AttachedVolumes. # noqa: E501 :return: The links of this AttachedVolumes. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this AttachedVolumes. :param links: The links of this AttachedVolumes. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AttachedVolumes): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, AttachedVolumes): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/backup_unit.py0000644000175100001660000001556515046550310021715 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class BackupUnit(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'BackupUnitProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """BackupUnit - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this BackupUnit. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this BackupUnit. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this BackupUnit. The resource's unique identifier. # noqa: E501 :param id: The id of this BackupUnit. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this BackupUnit. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this BackupUnit. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this BackupUnit. The type of object that has been created. # noqa: E501 :param type: The type of this BackupUnit. # noqa: E501 :type type: str """ allowed_values = ["backupunit"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this BackupUnit. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this BackupUnit. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this BackupUnit. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this BackupUnit. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this BackupUnit. # noqa: E501 :return: The metadata of this BackupUnit. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this BackupUnit. :param metadata: The metadata of this BackupUnit. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this BackupUnit. # noqa: E501 :return: The properties of this BackupUnit. # noqa: E501 :rtype: BackupUnitProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this BackupUnit. :param properties: The properties of this BackupUnit. # noqa: E501 :type properties: BackupUnitProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BackupUnit): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BackupUnit): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/backup_unit_properties.py0000644000175100001660000001310015046550310024150 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class BackupUnitProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'password': 'str', 'email': 'str', } attribute_map = { 'name': 'name', 'password': 'password', 'email': 'email', } def __init__(self, name=None, password=None, email=None, local_vars_configuration=None): # noqa: E501 """BackupUnitProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._password = None self._email = None self.discriminator = None self.name = name if password is not None: self.password = password if email is not None: self.email = email @property def name(self): """Gets the name of this BackupUnitProperties. # noqa: E501 The name of the resource (alphanumeric characters only). # noqa: E501 :return: The name of this BackupUnitProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this BackupUnitProperties. The name of the resource (alphanumeric characters only). # noqa: E501 :param name: The name of this BackupUnitProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def password(self): """Gets the password of this BackupUnitProperties. # noqa: E501 The password associated with that resource. # noqa: E501 :return: The password of this BackupUnitProperties. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): """Sets the password of this BackupUnitProperties. The password associated with that resource. # noqa: E501 :param password: The password of this BackupUnitProperties. # noqa: E501 :type password: str """ self._password = password @property def email(self): """Gets the email of this BackupUnitProperties. # noqa: E501 The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. # noqa: E501 :return: The email of this BackupUnitProperties. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): """Sets the email of this BackupUnitProperties. The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. # noqa: E501 :param email: The email of this BackupUnitProperties. # noqa: E501 :type email: str """ self._email = email def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BackupUnitProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BackupUnitProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/backup_unit_sso.py0000644000175100001660000000725715046550310022600 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class BackupUnitSSO(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'sso_url': 'str', } attribute_map = { 'sso_url': 'ssoUrl', } def __init__(self, sso_url=None, local_vars_configuration=None): # noqa: E501 """BackupUnitSSO - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._sso_url = None self.discriminator = None if sso_url is not None: self.sso_url = sso_url @property def sso_url(self): """Gets the sso_url of this BackupUnitSSO. # noqa: E501 The backup unit single sign on url # noqa: E501 :return: The sso_url of this BackupUnitSSO. # noqa: E501 :rtype: str """ return self._sso_url @sso_url.setter def sso_url(self, sso_url): """Sets the sso_url of this BackupUnitSSO. The backup unit single sign on url # noqa: E501 :param sso_url: The sso_url of this BackupUnitSSO. # noqa: E501 :type sso_url: str """ self._sso_url = sso_url def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BackupUnitSSO): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BackupUnitSSO): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/backup_units.py0000644000175100001660000001401615046550310022066 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class BackupUnits(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[BackupUnit]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """BackupUnits - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this BackupUnits. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this BackupUnits. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this BackupUnits. The resource's unique identifier. # noqa: E501 :param id: The id of this BackupUnits. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this BackupUnits. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this BackupUnits. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this BackupUnits. The type of object that has been created. # noqa: E501 :param type: The type of this BackupUnits. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this BackupUnits. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this BackupUnits. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this BackupUnits. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this BackupUnits. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this BackupUnits. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this BackupUnits. # noqa: E501 :rtype: list[BackupUnit] """ return self._items @items.setter def items(self, items): """Sets the items of this BackupUnits. Array of items in the collection. # noqa: E501 :param items: The items of this BackupUnits. # noqa: E501 :type items: list[BackupUnit] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BackupUnits): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BackupUnits): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/balanced_nics.py0000644000175100001660000001743215046550310022151 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class BalancedNics(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Nic]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """BalancedNics - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this BalancedNics. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this BalancedNics. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this BalancedNics. The resource's unique identifier. # noqa: E501 :param id: The id of this BalancedNics. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this BalancedNics. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this BalancedNics. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this BalancedNics. The type of object that has been created. # noqa: E501 :param type: The type of this BalancedNics. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this BalancedNics. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this BalancedNics. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this BalancedNics. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this BalancedNics. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this BalancedNics. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this BalancedNics. # noqa: E501 :rtype: list[Nic] """ return self._items @items.setter def items(self, items): """Sets the items of this BalancedNics. Array of items in the collection. # noqa: E501 :param items: The items of this BalancedNics. # noqa: E501 :type items: list[Nic] """ self._items = items @property def offset(self): """Gets the offset of this BalancedNics. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this BalancedNics. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this BalancedNics. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this BalancedNics. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this BalancedNics. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this BalancedNics. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this BalancedNics. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this BalancedNics. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this BalancedNics. # noqa: E501 :return: The links of this BalancedNics. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this BalancedNics. :param links: The links of this BalancedNics. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BalancedNics): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BalancedNics): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/cdroms.py0000644000175100001660000001714015046550310020667 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Cdroms(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Image]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Cdroms - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Cdroms. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Cdroms. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Cdroms. The resource's unique identifier. # noqa: E501 :param id: The id of this Cdroms. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Cdroms. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Cdroms. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Cdroms. The type of object that has been created. # noqa: E501 :param type: The type of this Cdroms. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Cdroms. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Cdroms. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Cdroms. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Cdroms. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Cdroms. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Cdroms. # noqa: E501 :rtype: list[Image] """ return self._items @items.setter def items(self, items): """Sets the items of this Cdroms. Array of items in the collection. # noqa: E501 :param items: The items of this Cdroms. # noqa: E501 :type items: list[Image] """ self._items = items @property def offset(self): """Gets the offset of this Cdroms. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Cdroms. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Cdroms. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Cdroms. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Cdroms. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Cdroms. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Cdroms. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Cdroms. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Cdroms. # noqa: E501 :return: The links of this Cdroms. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Cdroms. :param links: The links of this Cdroms. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Cdroms): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Cdroms): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/connectable_datacenter.py0000644000175100001660000001264115046550310024050 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ConnectableDatacenter(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'name': 'str', 'location': 'str', } attribute_map = { 'id': 'id', 'name': 'name', 'location': 'location', } def __init__(self, id=None, name=None, location=None, local_vars_configuration=None): # noqa: E501 """ConnectableDatacenter - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._name = None self._location = None self.discriminator = None if id is not None: self.id = id if name is not None: self.name = name if location is not None: self.location = location @property def id(self): """Gets the id of this ConnectableDatacenter. # noqa: E501 Identifier of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :return: The id of this ConnectableDatacenter. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ConnectableDatacenter. Identifier of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :param id: The id of this ConnectableDatacenter. # noqa: E501 :type id: str """ self._id = id @property def name(self): """Gets the name of this ConnectableDatacenter. # noqa: E501 Name of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :return: The name of this ConnectableDatacenter. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ConnectableDatacenter. Name of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :param name: The name of this ConnectableDatacenter. # noqa: E501 :type name: str """ self._name = name @property def location(self): """Gets the location of this ConnectableDatacenter. # noqa: E501 Location of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :return: The location of this ConnectableDatacenter. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this ConnectableDatacenter. Location of the virtual data center that can be connected to the Cross Connect. # noqa: E501 :param location: The location of this ConnectableDatacenter. # noqa: E501 :type location: str """ self._location = location def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ConnectableDatacenter): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ConnectableDatacenter): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/contract.py0000644000175100001660000001067515046550310021223 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Contract(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'type': 'Type', 'properties': 'ContractProperties', } attribute_map = { 'type': 'type', 'properties': 'properties', } def __init__(self, type=None, properties=None, local_vars_configuration=None): # noqa: E501 """Contract - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._type = None self._properties = None self.discriminator = None if type is not None: self.type = type self.properties = properties @property def type(self): """Gets the type of this Contract. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this Contract. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Contract. The type of the resource. # noqa: E501 :param type: The type of this Contract. # noqa: E501 :type type: Type """ self._type = type @property def properties(self): """Gets the properties of this Contract. # noqa: E501 :return: The properties of this Contract. # noqa: E501 :rtype: ContractProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Contract. :param properties: The properties of this Contract. # noqa: E501 :type properties: ContractProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Contract): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Contract): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/contract_properties.py0000644000175100001660000001574615046550310023503 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ContractProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'contract_number': 'int', 'owner': 'str', 'status': 'str', 'reg_domain': 'str', 'resource_limits': 'ResourceLimits', } attribute_map = { 'contract_number': 'contractNumber', 'owner': 'owner', 'status': 'status', 'reg_domain': 'regDomain', 'resource_limits': 'resourceLimits', } def __init__(self, contract_number=None, owner=None, status=None, reg_domain=None, resource_limits=None, local_vars_configuration=None): # noqa: E501 """ContractProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._contract_number = None self._owner = None self._status = None self._reg_domain = None self._resource_limits = None self.discriminator = None if contract_number is not None: self.contract_number = contract_number if owner is not None: self.owner = owner if status is not None: self.status = status if reg_domain is not None: self.reg_domain = reg_domain if resource_limits is not None: self.resource_limits = resource_limits @property def contract_number(self): """Gets the contract_number of this ContractProperties. # noqa: E501 The contract number. # noqa: E501 :return: The contract_number of this ContractProperties. # noqa: E501 :rtype: int """ return self._contract_number @contract_number.setter def contract_number(self, contract_number): """Sets the contract_number of this ContractProperties. The contract number. # noqa: E501 :param contract_number: The contract_number of this ContractProperties. # noqa: E501 :type contract_number: int """ self._contract_number = contract_number @property def owner(self): """Gets the owner of this ContractProperties. # noqa: E501 The contract owner's user name. # noqa: E501 :return: The owner of this ContractProperties. # noqa: E501 :rtype: str """ return self._owner @owner.setter def owner(self, owner): """Sets the owner of this ContractProperties. The contract owner's user name. # noqa: E501 :param owner: The owner of this ContractProperties. # noqa: E501 :type owner: str """ self._owner = owner @property def status(self): """Gets the status of this ContractProperties. # noqa: E501 The contract status. # noqa: E501 :return: The status of this ContractProperties. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this ContractProperties. The contract status. # noqa: E501 :param status: The status of this ContractProperties. # noqa: E501 :type status: str """ self._status = status @property def reg_domain(self): """Gets the reg_domain of this ContractProperties. # noqa: E501 The registration domain of the contract. # noqa: E501 :return: The reg_domain of this ContractProperties. # noqa: E501 :rtype: str """ return self._reg_domain @reg_domain.setter def reg_domain(self, reg_domain): """Sets the reg_domain of this ContractProperties. The registration domain of the contract. # noqa: E501 :param reg_domain: The reg_domain of this ContractProperties. # noqa: E501 :type reg_domain: str """ self._reg_domain = reg_domain @property def resource_limits(self): """Gets the resource_limits of this ContractProperties. # noqa: E501 :return: The resource_limits of this ContractProperties. # noqa: E501 :rtype: ResourceLimits """ return self._resource_limits @resource_limits.setter def resource_limits(self, resource_limits): """Sets the resource_limits of this ContractProperties. :param resource_limits: The resource_limits of this ContractProperties. # noqa: E501 :type resource_limits: ResourceLimits """ self._resource_limits = resource_limits def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ContractProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ContractProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/contracts.py0000644000175100001660000001323215046550310021376 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Contracts(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Contract]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Contracts - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Contracts. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Contracts. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Contracts. The resource's unique identifier. # noqa: E501 :param id: The id of this Contracts. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Contracts. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Contracts. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Contracts. The type of object that has been created. # noqa: E501 :param type: The type of this Contracts. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Contracts. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this Contracts. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Contracts. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Contracts. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Contracts. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Contracts. # noqa: E501 :rtype: list[Contract] """ return self._items @items.setter def items(self, items): """Sets the items of this Contracts. Array of items in the collection. # noqa: E501 :param items: The items of this Contracts. # noqa: E501 :type items: list[Contract] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Contracts): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Contracts): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/cpu_architecture_properties.py0000644000175100001660000001427215046550310025210 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class CpuArchitectureProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'cpu_family': 'str', 'max_cores': 'int', 'max_ram': 'int', 'vendor': 'str', } attribute_map = { 'cpu_family': 'cpuFamily', 'max_cores': 'maxCores', 'max_ram': 'maxRam', 'vendor': 'vendor', } def __init__(self, cpu_family=None, max_cores=None, max_ram=None, vendor=None, local_vars_configuration=None): # noqa: E501 """CpuArchitectureProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._cpu_family = None self._max_cores = None self._max_ram = None self._vendor = None self.discriminator = None if cpu_family is not None: self.cpu_family = cpu_family if max_cores is not None: self.max_cores = max_cores if max_ram is not None: self.max_ram = max_ram if vendor is not None: self.vendor = vendor @property def cpu_family(self): """Gets the cpu_family of this CpuArchitectureProperties. # noqa: E501 A valid CPU family name. # noqa: E501 :return: The cpu_family of this CpuArchitectureProperties. # noqa: E501 :rtype: str """ return self._cpu_family @cpu_family.setter def cpu_family(self, cpu_family): """Sets the cpu_family of this CpuArchitectureProperties. A valid CPU family name. # noqa: E501 :param cpu_family: The cpu_family of this CpuArchitectureProperties. # noqa: E501 :type cpu_family: str """ self._cpu_family = cpu_family @property def max_cores(self): """Gets the max_cores of this CpuArchitectureProperties. # noqa: E501 The maximum number of cores available. # noqa: E501 :return: The max_cores of this CpuArchitectureProperties. # noqa: E501 :rtype: int """ return self._max_cores @max_cores.setter def max_cores(self, max_cores): """Sets the max_cores of this CpuArchitectureProperties. The maximum number of cores available. # noqa: E501 :param max_cores: The max_cores of this CpuArchitectureProperties. # noqa: E501 :type max_cores: int """ self._max_cores = max_cores @property def max_ram(self): """Gets the max_ram of this CpuArchitectureProperties. # noqa: E501 The maximum RAM size in MB. # noqa: E501 :return: The max_ram of this CpuArchitectureProperties. # noqa: E501 :rtype: int """ return self._max_ram @max_ram.setter def max_ram(self, max_ram): """Sets the max_ram of this CpuArchitectureProperties. The maximum RAM size in MB. # noqa: E501 :param max_ram: The max_ram of this CpuArchitectureProperties. # noqa: E501 :type max_ram: int """ self._max_ram = max_ram @property def vendor(self): """Gets the vendor of this CpuArchitectureProperties. # noqa: E501 A valid CPU vendor name. # noqa: E501 :return: The vendor of this CpuArchitectureProperties. # noqa: E501 :rtype: str """ return self._vendor @vendor.setter def vendor(self, vendor): """Sets the vendor of this CpuArchitectureProperties. A valid CPU vendor name. # noqa: E501 :param vendor: The vendor of this CpuArchitectureProperties. # noqa: E501 :type vendor: str """ self._vendor = vendor def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CpuArchitectureProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, CpuArchitectureProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/create_snapshot.py0000644000175100001660000000730415046550310022563 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class CreateSnapshot(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'CreateSnapshotProperties', } attribute_map = { 'properties': 'properties', } def __init__(self, properties=None, local_vars_configuration=None): # noqa: E501 """CreateSnapshot - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self.discriminator = None if properties is not None: self.properties = properties @property def properties(self): """Gets the properties of this CreateSnapshot. # noqa: E501 :return: The properties of this CreateSnapshot. # noqa: E501 :rtype: CreateSnapshotProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this CreateSnapshot. :param properties: The properties of this CreateSnapshot. # noqa: E501 :type properties: CreateSnapshotProperties """ self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CreateSnapshot): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, CreateSnapshot): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/create_snapshot_properties.py0000644000175100001660000002025515046550310025037 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class CreateSnapshotProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'sec_auth_protection': 'bool', 'licence_type': 'str', 'application_type': 'str', } attribute_map = { 'name': 'name', 'description': 'description', 'sec_auth_protection': 'secAuthProtection', 'licence_type': 'licenceType', 'application_type': 'applicationType', } def __init__(self, name=None, description=None, sec_auth_protection=None, licence_type=None, application_type=None, local_vars_configuration=None): # noqa: E501 """CreateSnapshotProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._sec_auth_protection = None self._licence_type = None self._application_type = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if licence_type is not None: self.licence_type = licence_type if application_type is not None: self.application_type = application_type @property def name(self): """Gets the name of this CreateSnapshotProperties. # noqa: E501 The name of the snapshot # noqa: E501 :return: The name of this CreateSnapshotProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this CreateSnapshotProperties. The name of the snapshot # noqa: E501 :param name: The name of this CreateSnapshotProperties. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this CreateSnapshotProperties. # noqa: E501 The description of the snapshot # noqa: E501 :return: The description of this CreateSnapshotProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this CreateSnapshotProperties. The description of the snapshot # noqa: E501 :param description: The description of this CreateSnapshotProperties. # noqa: E501 :type description: str """ self._description = description @property def sec_auth_protection(self): """Gets the sec_auth_protection of this CreateSnapshotProperties. # noqa: E501 Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. # noqa: E501 :return: The sec_auth_protection of this CreateSnapshotProperties. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this CreateSnapshotProperties. Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this CreateSnapshotProperties. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection @property def licence_type(self): """Gets the licence_type of this CreateSnapshotProperties. # noqa: E501 OS type of this Snapshot # noqa: E501 :return: The licence_type of this CreateSnapshotProperties. # noqa: E501 :rtype: str """ return self._licence_type @licence_type.setter def licence_type(self, licence_type): """Sets the licence_type of this CreateSnapshotProperties. OS type of this Snapshot # noqa: E501 :param licence_type: The licence_type of this CreateSnapshotProperties. # noqa: E501 :type licence_type: str """ allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2019", "WINDOWS2022", "WINDOWS2025", "RHEL", "LINUX", "OTHER"] # noqa: E501 if self.local_vars_configuration.client_side_validation and licence_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `licence_type` ({0}), must be one of {1}" # noqa: E501 .format(licence_type, allowed_values) ) self._licence_type = licence_type @property def application_type(self): """Gets the application_type of this CreateSnapshotProperties. # noqa: E501 The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :return: The application_type of this CreateSnapshotProperties. # noqa: E501 :rtype: str """ return self._application_type @application_type.setter def application_type(self, application_type): """Sets the application_type of this CreateSnapshotProperties. The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :param application_type: The application_type of this CreateSnapshotProperties. # noqa: E501 :type application_type: str """ self._application_type = application_type def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CreateSnapshotProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, CreateSnapshotProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/data_center_entities.py0000644000175100001660000002037415046550310023560 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DataCenterEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'servers': 'Servers', 'volumes': 'Volumes', 'loadbalancers': 'Loadbalancers', 'lans': 'Lans', 'networkloadbalancers': 'NetworkLoadBalancers', 'natgateways': 'NatGateways', 'securitygroups': 'SecurityGroups', } attribute_map = { 'servers': 'servers', 'volumes': 'volumes', 'loadbalancers': 'loadbalancers', 'lans': 'lans', 'networkloadbalancers': 'networkloadbalancers', 'natgateways': 'natgateways', 'securitygroups': 'securitygroups', } def __init__(self, servers=None, volumes=None, loadbalancers=None, lans=None, networkloadbalancers=None, natgateways=None, securitygroups=None, local_vars_configuration=None): # noqa: E501 """DataCenterEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._servers = None self._volumes = None self._loadbalancers = None self._lans = None self._networkloadbalancers = None self._natgateways = None self._securitygroups = None self.discriminator = None if servers is not None: self.servers = servers if volumes is not None: self.volumes = volumes if loadbalancers is not None: self.loadbalancers = loadbalancers if lans is not None: self.lans = lans if networkloadbalancers is not None: self.networkloadbalancers = networkloadbalancers if natgateways is not None: self.natgateways = natgateways if securitygroups is not None: self.securitygroups = securitygroups @property def servers(self): """Gets the servers of this DataCenterEntities. # noqa: E501 :return: The servers of this DataCenterEntities. # noqa: E501 :rtype: Servers """ return self._servers @servers.setter def servers(self, servers): """Sets the servers of this DataCenterEntities. :param servers: The servers of this DataCenterEntities. # noqa: E501 :type servers: Servers """ self._servers = servers @property def volumes(self): """Gets the volumes of this DataCenterEntities. # noqa: E501 :return: The volumes of this DataCenterEntities. # noqa: E501 :rtype: Volumes """ return self._volumes @volumes.setter def volumes(self, volumes): """Sets the volumes of this DataCenterEntities. :param volumes: The volumes of this DataCenterEntities. # noqa: E501 :type volumes: Volumes """ self._volumes = volumes @property def loadbalancers(self): """Gets the loadbalancers of this DataCenterEntities. # noqa: E501 :return: The loadbalancers of this DataCenterEntities. # noqa: E501 :rtype: Loadbalancers """ return self._loadbalancers @loadbalancers.setter def loadbalancers(self, loadbalancers): """Sets the loadbalancers of this DataCenterEntities. :param loadbalancers: The loadbalancers of this DataCenterEntities. # noqa: E501 :type loadbalancers: Loadbalancers """ self._loadbalancers = loadbalancers @property def lans(self): """Gets the lans of this DataCenterEntities. # noqa: E501 :return: The lans of this DataCenterEntities. # noqa: E501 :rtype: Lans """ return self._lans @lans.setter def lans(self, lans): """Sets the lans of this DataCenterEntities. :param lans: The lans of this DataCenterEntities. # noqa: E501 :type lans: Lans """ self._lans = lans @property def networkloadbalancers(self): """Gets the networkloadbalancers of this DataCenterEntities. # noqa: E501 :return: The networkloadbalancers of this DataCenterEntities. # noqa: E501 :rtype: NetworkLoadBalancers """ return self._networkloadbalancers @networkloadbalancers.setter def networkloadbalancers(self, networkloadbalancers): """Sets the networkloadbalancers of this DataCenterEntities. :param networkloadbalancers: The networkloadbalancers of this DataCenterEntities. # noqa: E501 :type networkloadbalancers: NetworkLoadBalancers """ self._networkloadbalancers = networkloadbalancers @property def natgateways(self): """Gets the natgateways of this DataCenterEntities. # noqa: E501 :return: The natgateways of this DataCenterEntities. # noqa: E501 :rtype: NatGateways """ return self._natgateways @natgateways.setter def natgateways(self, natgateways): """Sets the natgateways of this DataCenterEntities. :param natgateways: The natgateways of this DataCenterEntities. # noqa: E501 :type natgateways: NatGateways """ self._natgateways = natgateways @property def securitygroups(self): """Gets the securitygroups of this DataCenterEntities. # noqa: E501 :return: The securitygroups of this DataCenterEntities. # noqa: E501 :rtype: SecurityGroups """ return self._securitygroups @securitygroups.setter def securitygroups(self, securitygroups): """Sets the securitygroups of this DataCenterEntities. :param securitygroups: The securitygroups of this DataCenterEntities. # noqa: E501 :type securitygroups: SecurityGroups """ self._securitygroups = securitygroups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DataCenterEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DataCenterEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter.py0000644000175100001660000001635015046550310021514 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Datacenter(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'DatacenterProperties', 'entities': 'DataCenterEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Datacenter - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Datacenter. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Datacenter. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Datacenter. The resource's unique identifier. # noqa: E501 :param id: The id of this Datacenter. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Datacenter. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Datacenter. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Datacenter. The type of object that has been created. # noqa: E501 :param type: The type of this Datacenter. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Datacenter. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Datacenter. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Datacenter. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Datacenter. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Datacenter. # noqa: E501 :return: The metadata of this Datacenter. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Datacenter. :param metadata: The metadata of this Datacenter. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Datacenter. # noqa: E501 :return: The properties of this Datacenter. # noqa: E501 :rtype: DatacenterProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Datacenter. :param properties: The properties of this Datacenter. # noqa: E501 :type properties: DatacenterProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Datacenter. # noqa: E501 :return: The entities of this Datacenter. # noqa: E501 :rtype: DataCenterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Datacenter. :param entities: The entities of this Datacenter. # noqa: E501 :type entities: DataCenterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Datacenter): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Datacenter): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_element_metadata.py0000644000175100001660000003417315046550310025070 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterElementMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'etag': 'str', 'created_date': 'datetime', 'created_by': 'str', 'created_by_user_id': 'str', 'last_modified_date': 'datetime', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', 'state': 'str', } attribute_map = { 'etag': 'etag', 'created_date': 'createdDate', 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'last_modified_date': 'lastModifiedDate', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', 'state': 'state', } def __init__(self, etag=None, created_date=None, created_by=None, created_by_user_id=None, last_modified_date=None, last_modified_by=None, last_modified_by_user_id=None, state=None, local_vars_configuration=None): # noqa: E501 """DatacenterElementMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._etag = None self._created_date = None self._created_by = None self._created_by_user_id = None self._last_modified_date = None self._last_modified_by = None self._last_modified_by_user_id = None self._state = None self.discriminator = None if etag is not None: self.etag = etag if created_date is not None: self.created_date = created_date if created_by is not None: self.created_by = created_by if created_by_user_id is not None: self.created_by_user_id = created_by_user_id if last_modified_date is not None: self.last_modified_date = last_modified_date if last_modified_by is not None: self.last_modified_by = last_modified_by if last_modified_by_user_id is not None: self.last_modified_by_user_id = last_modified_by_user_id if state is not None: self.state = state @property def etag(self): """Gets the etag of this DatacenterElementMetadata. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this DatacenterElementMetadata. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this DatacenterElementMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def created_date(self): """Gets the created_date of this DatacenterElementMetadata. # noqa: E501 The last time the resource was created. # noqa: E501 :return: The created_date of this DatacenterElementMetadata. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this DatacenterElementMetadata. The last time the resource was created. # noqa: E501 :param created_date: The created_date of this DatacenterElementMetadata. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def created_by(self): """Gets the created_by of this DatacenterElementMetadata. # noqa: E501 The user who created the resource. # noqa: E501 :return: The created_by of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter def created_by(self, created_by): """Sets the created_by of this DatacenterElementMetadata. The user who created the resource. # noqa: E501 :param created_by: The created_by of this DatacenterElementMetadata. # noqa: E501 :type created_by: str """ self._created_by = created_by @property def created_by_user_id(self): """Gets the created_by_user_id of this DatacenterElementMetadata. # noqa: E501 The unique ID of the user who created the resource. # noqa: E501 :return: The created_by_user_id of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._created_by_user_id @created_by_user_id.setter def created_by_user_id(self, created_by_user_id): """Sets the created_by_user_id of this DatacenterElementMetadata. The unique ID of the user who created the resource. # noqa: E501 :param created_by_user_id: The created_by_user_id of this DatacenterElementMetadata. # noqa: E501 :type created_by_user_id: str """ self._created_by_user_id = created_by_user_id @property def last_modified_date(self): """Gets the last_modified_date of this DatacenterElementMetadata. # noqa: E501 The last time the resource was modified. # noqa: E501 :return: The last_modified_date of this DatacenterElementMetadata. # noqa: E501 :rtype: datetime """ return self._last_modified_date @last_modified_date.setter def last_modified_date(self, last_modified_date): """Sets the last_modified_date of this DatacenterElementMetadata. The last time the resource was modified. # noqa: E501 :param last_modified_date: The last_modified_date of this DatacenterElementMetadata. # noqa: E501 :type last_modified_date: datetime """ self._last_modified_date = last_modified_date @property def last_modified_by(self): """Gets the last_modified_by of this DatacenterElementMetadata. # noqa: E501 The user who last modified the resource. # noqa: E501 :return: The last_modified_by of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by @last_modified_by.setter def last_modified_by(self, last_modified_by): """Sets the last_modified_by of this DatacenterElementMetadata. The user who last modified the resource. # noqa: E501 :param last_modified_by: The last_modified_by of this DatacenterElementMetadata. # noqa: E501 :type last_modified_by: str """ self._last_modified_by = last_modified_by @property def last_modified_by_user_id(self): """Gets the last_modified_by_user_id of this DatacenterElementMetadata. # noqa: E501 The unique ID of the user who last modified the resource. # noqa: E501 :return: The last_modified_by_user_id of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by_user_id @last_modified_by_user_id.setter def last_modified_by_user_id(self, last_modified_by_user_id): """Sets the last_modified_by_user_id of this DatacenterElementMetadata. The unique ID of the user who last modified the resource. # noqa: E501 :param last_modified_by_user_id: The last_modified_by_user_id of this DatacenterElementMetadata. # noqa: E501 :type last_modified_by_user_id: str """ self._last_modified_by_user_id = last_modified_by_user_id @property def state(self): """Gets the state of this DatacenterElementMetadata. # noqa: E501 State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool. # noqa: E501 :return: The state of this DatacenterElementMetadata. # noqa: E501 :rtype: str """ return self._state @state.setter def state(self, state): """Sets the state of this DatacenterElementMetadata. State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool. # noqa: E501 :param state: The state of this DatacenterElementMetadata. # noqa: E501 :type state: str """ allowed_values = ["AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED", "HIBERNATING", "FAILED_HIBERNATING", "MAINTENANCE", "FAILED_MAINTENANCE", "UNKNOWN"] # noqa: E501 if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 .format(state, allowed_values) ) self._state = state def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterElementMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterElementMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_post.py0000644000175100001660000001106515046550310022557 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'DatacenterPropertiesPost', 'entities': 'DataCenterEntities', } attribute_map = { 'properties': 'properties', 'entities': 'entities', } def __init__(self, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """DatacenterPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self._entities = None self.discriminator = None self.properties = properties if entities is not None: self.entities = entities @property def properties(self): """Gets the properties of this DatacenterPost. # noqa: E501 :return: The properties of this DatacenterPost. # noqa: E501 :rtype: DatacenterPropertiesPost """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this DatacenterPost. :param properties: The properties of this DatacenterPost. # noqa: E501 :type properties: DatacenterPropertiesPost """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this DatacenterPost. # noqa: E501 :return: The entities of this DatacenterPost. # noqa: E501 :rtype: DataCenterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this DatacenterPost. :param entities: The entities of this DatacenterPost. # noqa: E501 :type entities: DataCenterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_properties.py0000644000175100001660000003026115046550310023765 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'location': 'str', 'version': 'int', 'features': 'list[str]', 'sec_auth_protection': 'bool', 'cpu_architecture': 'list[CpuArchitectureProperties]', 'ipv6_cidr_block': 'str', 'default_security_group_id': 'str', } attribute_map = { 'name': 'name', 'description': 'description', 'location': 'location', 'version': 'version', 'features': 'features', 'sec_auth_protection': 'secAuthProtection', 'cpu_architecture': 'cpuArchitecture', 'ipv6_cidr_block': 'ipv6CidrBlock', 'default_security_group_id': 'defaultSecurityGroupId', } def __init__(self, name=None, description=None, location=None, version=None, features=None, sec_auth_protection=None, cpu_architecture=None, ipv6_cidr_block=None, default_security_group_id=None, local_vars_configuration=None): # noqa: E501 """DatacenterProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._location = None self._version = None self._features = None self._sec_auth_protection = None self._cpu_architecture = None self._ipv6_cidr_block = None self._default_security_group_id = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description self.location = location if version is not None: self.version = version if features is not None: self.features = features if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if cpu_architecture is not None: self.cpu_architecture = cpu_architecture self.ipv6_cidr_block = ipv6_cidr_block if default_security_group_id is not None: self.default_security_group_id = default_security_group_id @property def name(self): """Gets the name of this DatacenterProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this DatacenterProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this DatacenterProperties. The name of the resource. # noqa: E501 :param name: The name of this DatacenterProperties. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this DatacenterProperties. # noqa: E501 A description for the datacenter, such as staging, production. # noqa: E501 :return: The description of this DatacenterProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this DatacenterProperties. A description for the datacenter, such as staging, production. # noqa: E501 :param description: The description of this DatacenterProperties. # noqa: E501 :type description: str """ self._description = description @property def location(self): """Gets the location of this DatacenterProperties. # noqa: E501 The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :return: The location of this DatacenterProperties. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this DatacenterProperties. The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :param location: The location of this DatacenterProperties. # noqa: E501 :type location: str """ if self.local_vars_configuration.client_side_validation and location is None: # noqa: E501 raise ValueError("Invalid value for `location`, must not be `None`") # noqa: E501 self._location = location @property def version(self): """Gets the version of this DatacenterProperties. # noqa: E501 The version of the data center; incremented with every change. # noqa: E501 :return: The version of this DatacenterProperties. # noqa: E501 :rtype: int """ return self._version @version.setter def version(self, version): """Sets the version of this DatacenterProperties. The version of the data center; incremented with every change. # noqa: E501 :param version: The version of this DatacenterProperties. # noqa: E501 :type version: int """ self._version = version @property def features(self): """Gets the features of this DatacenterProperties. # noqa: E501 List of features supported by the location where this data center is provisioned. # noqa: E501 :return: The features of this DatacenterProperties. # noqa: E501 :rtype: list[str] """ return self._features @features.setter def features(self, features): """Sets the features of this DatacenterProperties. List of features supported by the location where this data center is provisioned. # noqa: E501 :param features: The features of this DatacenterProperties. # noqa: E501 :type features: list[str] """ self._features = features @property def sec_auth_protection(self): """Gets the sec_auth_protection of this DatacenterProperties. # noqa: E501 Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :return: The sec_auth_protection of this DatacenterProperties. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this DatacenterProperties. Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this DatacenterProperties. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection @property def cpu_architecture(self): """Gets the cpu_architecture of this DatacenterProperties. # noqa: E501 Array of features and CPU families available in a location # noqa: E501 :return: The cpu_architecture of this DatacenterProperties. # noqa: E501 :rtype: list[CpuArchitectureProperties] """ return self._cpu_architecture @cpu_architecture.setter def cpu_architecture(self, cpu_architecture): """Sets the cpu_architecture of this DatacenterProperties. Array of features and CPU families available in a location # noqa: E501 :param cpu_architecture: The cpu_architecture of this DatacenterProperties. # noqa: E501 :type cpu_architecture: list[CpuArchitectureProperties] """ self._cpu_architecture = cpu_architecture @property def ipv6_cidr_block(self): """Gets the ipv6_cidr_block of this DatacenterProperties. # noqa: E501 This value is either 'null' or contains an automatically-assigned /56 IPv6 CIDR block if IPv6 is enabled on this virtual data center. It can neither be changed nor removed. # noqa: E501 :return: The ipv6_cidr_block of this DatacenterProperties. # noqa: E501 :rtype: str """ return self._ipv6_cidr_block @ipv6_cidr_block.setter def ipv6_cidr_block(self, ipv6_cidr_block): """Sets the ipv6_cidr_block of this DatacenterProperties. This value is either 'null' or contains an automatically-assigned /56 IPv6 CIDR block if IPv6 is enabled on this virtual data center. It can neither be changed nor removed. # noqa: E501 :param ipv6_cidr_block: The ipv6_cidr_block of this DatacenterProperties. # noqa: E501 :type ipv6_cidr_block: str """ self._ipv6_cidr_block = ipv6_cidr_block @property def default_security_group_id(self): """Gets the default_security_group_id of this DatacenterProperties. # noqa: E501 Optional property to define the default security group of the datacenter. # noqa: E501 :return: The default_security_group_id of this DatacenterProperties. # noqa: E501 :rtype: str """ return self._default_security_group_id @default_security_group_id.setter def default_security_group_id(self, default_security_group_id): """Sets the default_security_group_id of this DatacenterProperties. Optional property to define the default security group of the datacenter. # noqa: E501 :param default_security_group_id: The default_security_group_id of this DatacenterProperties. # noqa: E501 :type default_security_group_id: str """ self._default_security_group_id = default_security_group_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_properties_post.py0000644000175100001660000002651115046550310025035 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterPropertiesPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'location': 'str', 'version': 'int', 'features': 'list[str]', 'sec_auth_protection': 'bool', 'cpu_architecture': 'list[CpuArchitectureProperties]', 'create_default_security_group': 'bool', } attribute_map = { 'name': 'name', 'description': 'description', 'location': 'location', 'version': 'version', 'features': 'features', 'sec_auth_protection': 'secAuthProtection', 'cpu_architecture': 'cpuArchitecture', 'create_default_security_group': 'createDefaultSecurityGroup', } def __init__(self, name=None, description=None, location=None, version=None, features=None, sec_auth_protection=None, cpu_architecture=None, create_default_security_group=None, local_vars_configuration=None): # noqa: E501 """DatacenterPropertiesPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._location = None self._version = None self._features = None self._sec_auth_protection = None self._cpu_architecture = None self._create_default_security_group = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description self.location = location if version is not None: self.version = version if features is not None: self.features = features if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if cpu_architecture is not None: self.cpu_architecture = cpu_architecture if create_default_security_group is not None: self.create_default_security_group = create_default_security_group @property def name(self): """Gets the name of this DatacenterPropertiesPost. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this DatacenterPropertiesPost. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this DatacenterPropertiesPost. The name of the resource. # noqa: E501 :param name: The name of this DatacenterPropertiesPost. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this DatacenterPropertiesPost. # noqa: E501 A description for the datacenter, such as staging, production. # noqa: E501 :return: The description of this DatacenterPropertiesPost. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this DatacenterPropertiesPost. A description for the datacenter, such as staging, production. # noqa: E501 :param description: The description of this DatacenterPropertiesPost. # noqa: E501 :type description: str """ self._description = description @property def location(self): """Gets the location of this DatacenterPropertiesPost. # noqa: E501 The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :return: The location of this DatacenterPropertiesPost. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this DatacenterPropertiesPost. The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :param location: The location of this DatacenterPropertiesPost. # noqa: E501 :type location: str """ if self.local_vars_configuration.client_side_validation and location is None: # noqa: E501 raise ValueError("Invalid value for `location`, must not be `None`") # noqa: E501 self._location = location @property def version(self): """Gets the version of this DatacenterPropertiesPost. # noqa: E501 The version of the data center; incremented with every change. # noqa: E501 :return: The version of this DatacenterPropertiesPost. # noqa: E501 :rtype: int """ return self._version @version.setter def version(self, version): """Sets the version of this DatacenterPropertiesPost. The version of the data center; incremented with every change. # noqa: E501 :param version: The version of this DatacenterPropertiesPost. # noqa: E501 :type version: int """ self._version = version @property def features(self): """Gets the features of this DatacenterPropertiesPost. # noqa: E501 List of features supported by the location where this data center is provisioned. # noqa: E501 :return: The features of this DatacenterPropertiesPost. # noqa: E501 :rtype: list[str] """ return self._features @features.setter def features(self, features): """Sets the features of this DatacenterPropertiesPost. List of features supported by the location where this data center is provisioned. # noqa: E501 :param features: The features of this DatacenterPropertiesPost. # noqa: E501 :type features: list[str] """ self._features = features @property def sec_auth_protection(self): """Gets the sec_auth_protection of this DatacenterPropertiesPost. # noqa: E501 Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :return: The sec_auth_protection of this DatacenterPropertiesPost. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this DatacenterPropertiesPost. Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this DatacenterPropertiesPost. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection @property def cpu_architecture(self): """Gets the cpu_architecture of this DatacenterPropertiesPost. # noqa: E501 Array of features and CPU families available in a location # noqa: E501 :return: The cpu_architecture of this DatacenterPropertiesPost. # noqa: E501 :rtype: list[CpuArchitectureProperties] """ return self._cpu_architecture @cpu_architecture.setter def cpu_architecture(self, cpu_architecture): """Sets the cpu_architecture of this DatacenterPropertiesPost. Array of features and CPU families available in a location # noqa: E501 :param cpu_architecture: The cpu_architecture of this DatacenterPropertiesPost. # noqa: E501 :type cpu_architecture: list[CpuArchitectureProperties] """ self._cpu_architecture = cpu_architecture @property def create_default_security_group(self): """Gets the create_default_security_group of this DatacenterPropertiesPost. # noqa: E501 If true, a default security group, with predefined rules, will be created for the datacenter. Default value is false. # noqa: E501 :return: The create_default_security_group of this DatacenterPropertiesPost. # noqa: E501 :rtype: bool """ return self._create_default_security_group @create_default_security_group.setter def create_default_security_group(self, create_default_security_group): """Sets the create_default_security_group of this DatacenterPropertiesPost. If true, a default security group, with predefined rules, will be created for the datacenter. Default value is false. # noqa: E501 :param create_default_security_group: The create_default_security_group of this DatacenterPropertiesPost. # noqa: E501 :type create_default_security_group: bool """ self._create_default_security_group = create_default_security_group def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterPropertiesPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterPropertiesPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_properties_put.py0000644000175100001660000003217115046550310024657 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterPropertiesPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'location': 'str', 'version': 'int', 'features': 'list[str]', 'sec_auth_protection': 'bool', 'cpu_architecture': 'list[CpuArchitectureProperties]', 'default_security_group_id': 'str', 'create_default_security_group': 'bool', } attribute_map = { 'name': 'name', 'description': 'description', 'location': 'location', 'version': 'version', 'features': 'features', 'sec_auth_protection': 'secAuthProtection', 'cpu_architecture': 'cpuArchitecture', 'default_security_group_id': 'defaultSecurityGroupId', 'create_default_security_group': 'createDefaultSecurityGroup', } def __init__(self, name=None, description=None, location=None, version=None, features=None, sec_auth_protection=None, cpu_architecture=None, default_security_group_id=None, create_default_security_group=None, local_vars_configuration=None): # noqa: E501 """DatacenterPropertiesPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._location = None self._version = None self._features = None self._sec_auth_protection = None self._cpu_architecture = None self._default_security_group_id = None self._create_default_security_group = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description if location is not None: self.location = location if version is not None: self.version = version if features is not None: self.features = features if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if cpu_architecture is not None: self.cpu_architecture = cpu_architecture if default_security_group_id is not None: self.default_security_group_id = default_security_group_id if create_default_security_group is not None: self.create_default_security_group = create_default_security_group @property def name(self): """Gets the name of this DatacenterPropertiesPut. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this DatacenterPropertiesPut. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this DatacenterPropertiesPut. The name of the resource. # noqa: E501 :param name: The name of this DatacenterPropertiesPut. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this DatacenterPropertiesPut. # noqa: E501 A description for the datacenter, such as staging, production. # noqa: E501 :return: The description of this DatacenterPropertiesPut. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this DatacenterPropertiesPut. A description for the datacenter, such as staging, production. # noqa: E501 :param description: The description of this DatacenterPropertiesPut. # noqa: E501 :type description: str """ self._description = description @property def location(self): """Gets the location of this DatacenterPropertiesPut. # noqa: E501 The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :return: The location of this DatacenterPropertiesPut. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this DatacenterPropertiesPut. The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). # noqa: E501 :param location: The location of this DatacenterPropertiesPut. # noqa: E501 :type location: str """ self._location = location @property def version(self): """Gets the version of this DatacenterPropertiesPut. # noqa: E501 The version of the data center; incremented with every change. # noqa: E501 :return: The version of this DatacenterPropertiesPut. # noqa: E501 :rtype: int """ return self._version @version.setter def version(self, version): """Sets the version of this DatacenterPropertiesPut. The version of the data center; incremented with every change. # noqa: E501 :param version: The version of this DatacenterPropertiesPut. # noqa: E501 :type version: int """ self._version = version @property def features(self): """Gets the features of this DatacenterPropertiesPut. # noqa: E501 List of features supported by the location where this data center is provisioned. # noqa: E501 :return: The features of this DatacenterPropertiesPut. # noqa: E501 :rtype: list[str] """ return self._features @features.setter def features(self, features): """Sets the features of this DatacenterPropertiesPut. List of features supported by the location where this data center is provisioned. # noqa: E501 :param features: The features of this DatacenterPropertiesPut. # noqa: E501 :type features: list[str] """ self._features = features @property def sec_auth_protection(self): """Gets the sec_auth_protection of this DatacenterPropertiesPut. # noqa: E501 Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :return: The sec_auth_protection of this DatacenterPropertiesPut. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this DatacenterPropertiesPut. Boolean value representing if the data center requires extra protection, such as two-step verification. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this DatacenterPropertiesPut. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection @property def cpu_architecture(self): """Gets the cpu_architecture of this DatacenterPropertiesPut. # noqa: E501 Array of features and CPU families available in a location # noqa: E501 :return: The cpu_architecture of this DatacenterPropertiesPut. # noqa: E501 :rtype: list[CpuArchitectureProperties] """ return self._cpu_architecture @cpu_architecture.setter def cpu_architecture(self, cpu_architecture): """Sets the cpu_architecture of this DatacenterPropertiesPut. Array of features and CPU families available in a location # noqa: E501 :param cpu_architecture: The cpu_architecture of this DatacenterPropertiesPut. # noqa: E501 :type cpu_architecture: list[CpuArchitectureProperties] """ self._cpu_architecture = cpu_architecture @property def default_security_group_id(self): """Gets the default_security_group_id of this DatacenterPropertiesPut. # noqa: E501 This will become the default security group for the datacenter, replacing the old one if already exists. This security group must already exists prior to this request. Provide this field only if the `createDefaultSecurityGroup` field is missing. You cannot provide both of them # noqa: E501 :return: The default_security_group_id of this DatacenterPropertiesPut. # noqa: E501 :rtype: str """ return self._default_security_group_id @default_security_group_id.setter def default_security_group_id(self, default_security_group_id): """Sets the default_security_group_id of this DatacenterPropertiesPut. This will become the default security group for the datacenter, replacing the old one if already exists. This security group must already exists prior to this request. Provide this field only if the `createDefaultSecurityGroup` field is missing. You cannot provide both of them # noqa: E501 :param default_security_group_id: The default_security_group_id of this DatacenterPropertiesPut. # noqa: E501 :type default_security_group_id: str """ self._default_security_group_id = default_security_group_id @property def create_default_security_group(self): """Gets the create_default_security_group of this DatacenterPropertiesPut. # noqa: E501 If this field is set on true and this datacenter has no default security group then a default security group, with predefined rules, will be created for this datacenter. Default value is false. Provide this field only if the `defaultSecurityGroupId` field is missing. You cannot provide both of them # noqa: E501 :return: The create_default_security_group of this DatacenterPropertiesPut. # noqa: E501 :rtype: bool """ return self._create_default_security_group @create_default_security_group.setter def create_default_security_group(self, create_default_security_group): """Sets the create_default_security_group of this DatacenterPropertiesPut. If this field is set on true and this datacenter has no default security group then a default security group, with predefined rules, will be created for this datacenter. Default value is false. Provide this field only if the `defaultSecurityGroupId` field is missing. You cannot provide both of them # noqa: E501 :param create_default_security_group: The create_default_security_group of this DatacenterPropertiesPut. # noqa: E501 :type create_default_security_group: bool """ self._create_default_security_group = create_default_security_group def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterPropertiesPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterPropertiesPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenter_put.py0000644000175100001660000001104615046550310022401 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class DatacenterPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'DatacenterPropertiesPut', 'entities': 'DataCenterEntities', } attribute_map = { 'properties': 'properties', 'entities': 'entities', } def __init__(self, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """DatacenterPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self._entities = None self.discriminator = None self.properties = properties if entities is not None: self.entities = entities @property def properties(self): """Gets the properties of this DatacenterPut. # noqa: E501 :return: The properties of this DatacenterPut. # noqa: E501 :rtype: DatacenterPropertiesPut """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this DatacenterPut. :param properties: The properties of this DatacenterPut. # noqa: E501 :type properties: DatacenterPropertiesPut """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this DatacenterPut. # noqa: E501 :return: The entities of this DatacenterPut. # noqa: E501 :rtype: DataCenterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this DatacenterPut. :param entities: The entities of this DatacenterPut. # noqa: E501 :type entities: DataCenterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, DatacenterPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, DatacenterPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/datacenters.py0000644000175100001660000001741715046550310021704 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Datacenters(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Datacenter]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Datacenters - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Datacenters. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Datacenters. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Datacenters. The resource's unique identifier. # noqa: E501 :param id: The id of this Datacenters. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Datacenters. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Datacenters. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Datacenters. The type of object that has been created. # noqa: E501 :param type: The type of this Datacenters. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Datacenters. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Datacenters. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Datacenters. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Datacenters. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Datacenters. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Datacenters. # noqa: E501 :rtype: list[Datacenter] """ return self._items @items.setter def items(self, items): """Sets the items of this Datacenters. Array of items in the collection. # noqa: E501 :param items: The items of this Datacenters. # noqa: E501 :type items: list[Datacenter] """ self._items = items @property def offset(self): """Gets the offset of this Datacenters. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Datacenters. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Datacenters. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Datacenters. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Datacenters. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Datacenters. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Datacenters. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Datacenters. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Datacenters. # noqa: E501 :return: The links of this Datacenters. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Datacenters. :param links: The links of this Datacenters. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Datacenters): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Datacenters): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/error.py0000644000175100001660000001056015046550310020530 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Error(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'http_status': 'int', 'messages': 'list[ErrorMessage]', } attribute_map = { 'http_status': 'httpStatus', 'messages': 'messages', } def __init__(self, http_status=None, messages=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._http_status = None self._messages = None self.discriminator = None if http_status is not None: self.http_status = http_status if messages is not None: self.messages = messages @property def http_status(self): """Gets the http_status of this Error. # noqa: E501 HTTP status code of the operation. # noqa: E501 :return: The http_status of this Error. # noqa: E501 :rtype: int """ return self._http_status @http_status.setter def http_status(self, http_status): """Sets the http_status of this Error. HTTP status code of the operation. # noqa: E501 :param http_status: The http_status of this Error. # noqa: E501 :type http_status: int """ self._http_status = http_status @property def messages(self): """Gets the messages of this Error. # noqa: E501 :return: The messages of this Error. # noqa: E501 :rtype: list[ErrorMessage] """ return self._messages @messages.setter def messages(self, messages): """Sets the messages of this Error. :param messages: The messages of this Error. # noqa: E501 :type messages: list[ErrorMessage] """ self._messages = messages def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Error): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Error): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/error_message.py0000644000175100001660000001071115046550310022232 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ErrorMessage(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'error_code': 'str', 'message': 'str', } attribute_map = { 'error_code': 'errorCode', 'message': 'message', } def __init__(self, error_code=None, message=None, local_vars_configuration=None): # noqa: E501 """ErrorMessage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._error_code = None self._message = None self.discriminator = None if error_code is not None: self.error_code = error_code if message is not None: self.message = message @property def error_code(self): """Gets the error_code of this ErrorMessage. # noqa: E501 Application internal error code. # noqa: E501 :return: The error_code of this ErrorMessage. # noqa: E501 :rtype: str """ return self._error_code @error_code.setter def error_code(self, error_code): """Sets the error_code of this ErrorMessage. Application internal error code. # noqa: E501 :param error_code: The error_code of this ErrorMessage. # noqa: E501 :type error_code: str """ self._error_code = error_code @property def message(self): """Gets the message of this ErrorMessage. # noqa: E501 A human-readable message. # noqa: E501 :return: The message of this ErrorMessage. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): """Sets the message of this ErrorMessage. A human-readable message. # noqa: E501 :param message: The message of this ErrorMessage. # noqa: E501 :type message: str """ self._message = message def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ErrorMessage): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ErrorMessage): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/firewall_rule.py0000644000175100001660000001513515046550310022236 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FirewallRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'FirewallruleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """FirewallRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this FirewallRule. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this FirewallRule. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this FirewallRule. The resource's unique identifier. # noqa: E501 :param id: The id of this FirewallRule. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this FirewallRule. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this FirewallRule. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this FirewallRule. The type of object that has been created. # noqa: E501 :param type: The type of this FirewallRule. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this FirewallRule. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this FirewallRule. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this FirewallRule. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this FirewallRule. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this FirewallRule. # noqa: E501 :return: The metadata of this FirewallRule. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this FirewallRule. :param metadata: The metadata of this FirewallRule. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this FirewallRule. # noqa: E501 :return: The properties of this FirewallRule. # noqa: E501 :rtype: FirewallruleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this FirewallRule. :param properties: The properties of this FirewallRule. # noqa: E501 :type properties: FirewallruleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FirewallRule): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FirewallRule): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/firewall_rules.py0000644000175100001660000001752515046550310022426 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FirewallRules(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[FirewallRule]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """FirewallRules - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this FirewallRules. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this FirewallRules. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this FirewallRules. The resource's unique identifier. # noqa: E501 :param id: The id of this FirewallRules. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this FirewallRules. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this FirewallRules. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this FirewallRules. The type of object that has been created. # noqa: E501 :param type: The type of this FirewallRules. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this FirewallRules. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this FirewallRules. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this FirewallRules. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this FirewallRules. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this FirewallRules. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this FirewallRules. # noqa: E501 :rtype: list[FirewallRule] """ return self._items @items.setter def items(self, items): """Sets the items of this FirewallRules. Array of items in the collection. # noqa: E501 :param items: The items of this FirewallRules. # noqa: E501 :type items: list[FirewallRule] """ self._items = items @property def offset(self): """Gets the offset of this FirewallRules. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this FirewallRules. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this FirewallRules. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this FirewallRules. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this FirewallRules. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this FirewallRules. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this FirewallRules. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this FirewallRules. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this FirewallRules. # noqa: E501 :return: The links of this FirewallRules. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this FirewallRules. :param links: The links of this FirewallRules. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FirewallRules): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FirewallRules): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/firewallrule_properties.py0000644000175100001660000004335315046550310024356 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FirewallruleProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'protocol': 'str', 'source_mac': 'str', 'ip_version': 'str', 'source_ip': 'str', 'target_ip': 'str', 'icmp_code': 'int', 'icmp_type': 'int', 'port_range_start': 'int', 'port_range_end': 'int', 'type': 'str', } attribute_map = { 'name': 'name', 'protocol': 'protocol', 'source_mac': 'sourceMac', 'ip_version': 'ipVersion', 'source_ip': 'sourceIp', 'target_ip': 'targetIp', 'icmp_code': 'icmpCode', 'icmp_type': 'icmpType', 'port_range_start': 'portRangeStart', 'port_range_end': 'portRangeEnd', 'type': 'type', } def __init__(self, name=None, protocol=None, source_mac=None, ip_version=None, source_ip=None, target_ip=None, icmp_code=None, icmp_type=None, port_range_start=None, port_range_end=None, type=None, local_vars_configuration=None): # noqa: E501 """FirewallruleProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._protocol = None self._source_mac = None self._ip_version = None self._source_ip = None self._target_ip = None self._icmp_code = None self._icmp_type = None self._port_range_start = None self._port_range_end = None self._type = None self.discriminator = None if name is not None: self.name = name if protocol is not None: self.protocol = protocol self.source_mac = source_mac self.ip_version = ip_version self.source_ip = source_ip self.target_ip = target_ip self.icmp_code = icmp_code self.icmp_type = icmp_type if port_range_start is not None: self.port_range_start = port_range_start if port_range_end is not None: self.port_range_end = port_range_end if type is not None: self.type = type @property def name(self): """Gets the name of this FirewallruleProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this FirewallruleProperties. The name of the resource. # noqa: E501 :param name: The name of this FirewallruleProperties. # noqa: E501 :type name: str """ self._name = name @property def protocol(self): """Gets the protocol of this FirewallruleProperties. # noqa: E501 The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). # noqa: E501 :return: The protocol of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this FirewallruleProperties. The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). # noqa: E501 :param protocol: The protocol of this FirewallruleProperties. # noqa: E501 :type protocol: str """ allowed_values = ["TCP", "UDP", "ICMP", "ICMPv6", "GRE", "VRRP", "ESP", "AH", "ANY"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol @property def source_mac(self): """Gets the source_mac of this FirewallruleProperties. # noqa: E501 Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address. # noqa: E501 :return: The source_mac of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._source_mac @source_mac.setter def source_mac(self, source_mac): """Sets the source_mac of this FirewallruleProperties. Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address. # noqa: E501 :param source_mac: The source_mac of this FirewallruleProperties. # noqa: E501 :type source_mac: str """ self._source_mac = source_mac @property def ip_version(self): """Gets the ip_version of this FirewallruleProperties. # noqa: E501 The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic. # noqa: E501 :return: The ip_version of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._ip_version @ip_version.setter def ip_version(self, ip_version): """Sets the ip_version of this FirewallruleProperties. The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic. # noqa: E501 :param ip_version: The ip_version of this FirewallruleProperties. # noqa: E501 :type ip_version: str """ allowed_values = [None,"IPv4", "IPv6"] # noqa: E501 if self.local_vars_configuration.client_side_validation and ip_version not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `ip_version` ({0}), must be one of {1}" # noqa: E501 .format(ip_version, allowed_values) ) self._ip_version = ip_version @property def source_ip(self): """Gets the source_ip of this FirewallruleProperties. # noqa: E501 Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion). # noqa: E501 :return: The source_ip of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._source_ip @source_ip.setter def source_ip(self, source_ip): """Sets the source_ip of this FirewallruleProperties. Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion). # noqa: E501 :param source_ip: The source_ip of this FirewallruleProperties. # noqa: E501 :type source_ip: str """ self._source_ip = source_ip @property def target_ip(self): """Gets the target_ip of this FirewallruleProperties. # noqa: E501 If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion). # noqa: E501 :return: The target_ip of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._target_ip @target_ip.setter def target_ip(self, target_ip): """Sets the target_ip of this FirewallruleProperties. If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion). # noqa: E501 :param target_ip: The target_ip of this FirewallruleProperties. # noqa: E501 :type target_ip: str """ self._target_ip = target_ip @property def icmp_code(self): """Gets the icmp_code of this FirewallruleProperties. # noqa: E501 Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. # noqa: E501 :return: The icmp_code of this FirewallruleProperties. # noqa: E501 :rtype: int """ return self._icmp_code @icmp_code.setter def icmp_code(self, icmp_code): """Sets the icmp_code of this FirewallruleProperties. Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. # noqa: E501 :param icmp_code: The icmp_code of this FirewallruleProperties. # noqa: E501 :type icmp_code: int """ if (self.local_vars_configuration.client_side_validation and icmp_code is not None and icmp_code > 254): # noqa: E501 raise ValueError("Invalid value for `icmp_code`, must be a value less than or equal to `254`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and icmp_code is not None and icmp_code < 0): # noqa: E501 raise ValueError("Invalid value for `icmp_code`, must be a value greater than or equal to `0`") # noqa: E501 self._icmp_code = icmp_code @property def icmp_type(self): """Gets the icmp_type of this FirewallruleProperties. # noqa: E501 Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. # noqa: E501 :return: The icmp_type of this FirewallruleProperties. # noqa: E501 :rtype: int """ return self._icmp_type @icmp_type.setter def icmp_type(self, icmp_type): """Sets the icmp_type of this FirewallruleProperties. Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. # noqa: E501 :param icmp_type: The icmp_type of this FirewallruleProperties. # noqa: E501 :type icmp_type: int """ if (self.local_vars_configuration.client_side_validation and icmp_type is not None and icmp_type > 254): # noqa: E501 raise ValueError("Invalid value for `icmp_type`, must be a value less than or equal to `254`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and icmp_type is not None and icmp_type < 0): # noqa: E501 raise ValueError("Invalid value for `icmp_type`, must be a value greater than or equal to `0`") # noqa: E501 self._icmp_type = icmp_type @property def port_range_start(self): """Gets the port_range_start of this FirewallruleProperties. # noqa: E501 Defines the start range of the allowed port (from 1 to 65535) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. # noqa: E501 :return: The port_range_start of this FirewallruleProperties. # noqa: E501 :rtype: int """ return self._port_range_start @port_range_start.setter def port_range_start(self, port_range_start): """Sets the port_range_start of this FirewallruleProperties. Defines the start range of the allowed port (from 1 to 65535) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. # noqa: E501 :param port_range_start: The port_range_start of this FirewallruleProperties. # noqa: E501 :type port_range_start: int """ if (self.local_vars_configuration.client_side_validation and port_range_start is not None and port_range_start > 65535): # noqa: E501 raise ValueError("Invalid value for `port_range_start`, must be a value less than or equal to `65535`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and port_range_start is not None and port_range_start < 1): # noqa: E501 raise ValueError("Invalid value for `port_range_start`, must be a value greater than or equal to `1`") # noqa: E501 self._port_range_start = port_range_start @property def port_range_end(self): """Gets the port_range_end of this FirewallruleProperties. # noqa: E501 Defines the end range of the allowed port (from 1 to 65535) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. # noqa: E501 :return: The port_range_end of this FirewallruleProperties. # noqa: E501 :rtype: int """ return self._port_range_end @port_range_end.setter def port_range_end(self, port_range_end): """Sets the port_range_end of this FirewallruleProperties. Defines the end range of the allowed port (from 1 to 65535) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. # noqa: E501 :param port_range_end: The port_range_end of this FirewallruleProperties. # noqa: E501 :type port_range_end: int """ if (self.local_vars_configuration.client_side_validation and port_range_end is not None and port_range_end > 65535): # noqa: E501 raise ValueError("Invalid value for `port_range_end`, must be a value less than or equal to `65535`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and port_range_end is not None and port_range_end < 1): # noqa: E501 raise ValueError("Invalid value for `port_range_end`, must be a value greater than or equal to `1`") # noqa: E501 self._port_range_end = port_range_end @property def type(self): """Gets the type of this FirewallruleProperties. # noqa: E501 The type of the firewall rule. If not specified, the default INGRESS value is used. # noqa: E501 :return: The type of this FirewallruleProperties. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this FirewallruleProperties. The type of the firewall rule. If not specified, the default INGRESS value is used. # noqa: E501 :param type: The type of this FirewallruleProperties. # noqa: E501 :type type: str """ allowed_values = ["INGRESS", "EGRESS"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FirewallruleProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FirewallruleProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/flow_log.py0000644000175100001660000001473615046550310021220 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FlowLog(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'FlowLogProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """FlowLog - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this FlowLog. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this FlowLog. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this FlowLog. The resource's unique identifier. # noqa: E501 :param id: The id of this FlowLog. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this FlowLog. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this FlowLog. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this FlowLog. The type of object that has been created. # noqa: E501 :param type: The type of this FlowLog. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this FlowLog. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this FlowLog. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this FlowLog. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this FlowLog. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this FlowLog. # noqa: E501 :return: The metadata of this FlowLog. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this FlowLog. :param metadata: The metadata of this FlowLog. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this FlowLog. # noqa: E501 :return: The properties of this FlowLog. # noqa: E501 :rtype: FlowLogProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this FlowLog. :param properties: The properties of this FlowLog. # noqa: E501 :type properties: FlowLogProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FlowLog): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FlowLog): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/flow_log_properties.py0000644000175100001660000001647115046550310023472 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FlowLogProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'action': 'str', 'direction': 'str', 'bucket': 'str', } attribute_map = { 'name': 'name', 'action': 'action', 'direction': 'direction', 'bucket': 'bucket', } def __init__(self, name=None, action=None, direction=None, bucket=None, local_vars_configuration=None): # noqa: E501 """FlowLogProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._action = None self._direction = None self._bucket = None self.discriminator = None self.name = name self.action = action self.direction = direction self.bucket = bucket @property def name(self): """Gets the name of this FlowLogProperties. # noqa: E501 The resource name. # noqa: E501 :return: The name of this FlowLogProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this FlowLogProperties. The resource name. # noqa: E501 :param name: The name of this FlowLogProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def action(self): """Gets the action of this FlowLogProperties. # noqa: E501 Specifies the traffic action pattern. # noqa: E501 :return: The action of this FlowLogProperties. # noqa: E501 :rtype: str """ return self._action @action.setter def action(self, action): """Sets the action of this FlowLogProperties. Specifies the traffic action pattern. # noqa: E501 :param action: The action of this FlowLogProperties. # noqa: E501 :type action: str """ if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501 raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 allowed_values = ["ACCEPTED", "REJECTED", "ALL"] # noqa: E501 if self.local_vars_configuration.client_side_validation and action not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 .format(action, allowed_values) ) self._action = action @property def direction(self): """Gets the direction of this FlowLogProperties. # noqa: E501 Specifies the traffic direction pattern. # noqa: E501 :return: The direction of this FlowLogProperties. # noqa: E501 :rtype: str """ return self._direction @direction.setter def direction(self, direction): """Sets the direction of this FlowLogProperties. Specifies the traffic direction pattern. # noqa: E501 :param direction: The direction of this FlowLogProperties. # noqa: E501 :type direction: str """ if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 allowed_values = ["INGRESS", "EGRESS", "BIDIRECTIONAL"] # noqa: E501 if self.local_vars_configuration.client_side_validation and direction not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `direction` ({0}), must be one of {1}" # noqa: E501 .format(direction, allowed_values) ) self._direction = direction @property def bucket(self): """Gets the bucket of this FlowLogProperties. # noqa: E501 The bucket name of an existing IONOS Cloud Object storage bucket. # noqa: E501 :return: The bucket of this FlowLogProperties. # noqa: E501 :rtype: str """ return self._bucket @bucket.setter def bucket(self, bucket): """Sets the bucket of this FlowLogProperties. The bucket name of an existing IONOS Cloud Object storage bucket. # noqa: E501 :param bucket: The bucket of this FlowLogProperties. # noqa: E501 :type bucket: str """ if self.local_vars_configuration.client_side_validation and bucket is None: # noqa: E501 raise ValueError("Invalid value for `bucket`, must not be `None`") # noqa: E501 self._bucket = bucket def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FlowLogProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FlowLogProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/flow_log_put.py0000644000175100001660000001351015046550310022075 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FlowLogPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'FlowLogProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """FlowLogPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this FlowLogPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this FlowLogPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this FlowLogPut. The resource's unique identifier. # noqa: E501 :param id: The id of this FlowLogPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this FlowLogPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this FlowLogPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this FlowLogPut. The type of object that has been created. # noqa: E501 :param type: The type of this FlowLogPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this FlowLogPut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this FlowLogPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this FlowLogPut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this FlowLogPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this FlowLogPut. # noqa: E501 :return: The properties of this FlowLogPut. # noqa: E501 :rtype: FlowLogProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this FlowLogPut. :param properties: The properties of this FlowLogPut. # noqa: E501 :type properties: FlowLogProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FlowLogPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FlowLogPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/flow_logs.py0000644000175100001660000001725615046550310021403 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class FlowLogs(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[FlowLog]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """FlowLogs - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this FlowLogs. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this FlowLogs. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this FlowLogs. The resource's unique identifier. # noqa: E501 :param id: The id of this FlowLogs. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this FlowLogs. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this FlowLogs. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this FlowLogs. The type of object that has been created. # noqa: E501 :param type: The type of this FlowLogs. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this FlowLogs. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this FlowLogs. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this FlowLogs. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this FlowLogs. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this FlowLogs. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this FlowLogs. # noqa: E501 :rtype: list[FlowLog] """ return self._items @items.setter def items(self, items): """Sets the items of this FlowLogs. Array of items in the collection. # noqa: E501 :param items: The items of this FlowLogs. # noqa: E501 :type items: list[FlowLog] """ self._items = items @property def offset(self): """Gets the offset of this FlowLogs. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this FlowLogs. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this FlowLogs. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this FlowLogs. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this FlowLogs. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this FlowLogs. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this FlowLogs. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this FlowLogs. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this FlowLogs. # noqa: E501 :return: The links of this FlowLogs. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this FlowLogs. :param links: The links of this FlowLogs. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, FlowLogs): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, FlowLogs): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group.py0000644000175100001660000001453415046550310020540 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Group(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'GroupProperties', 'entities': 'GroupEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Group - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Group. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Group. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Group. The resource's unique identifier. # noqa: E501 :param id: The id of this Group. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Group. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this Group. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Group. The type of the resource. # noqa: E501 :param type: The type of this Group. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Group. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Group. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Group. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Group. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this Group. # noqa: E501 :return: The properties of this Group. # noqa: E501 :rtype: GroupProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Group. :param properties: The properties of this Group. # noqa: E501 :type properties: GroupProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Group. # noqa: E501 :return: The entities of this Group. # noqa: E501 :rtype: GroupEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Group. :param entities: The entities of this Group. # noqa: E501 :type entities: GroupEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Group): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Group): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_entities.py0000644000175100001660000001040515046550310022435 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'users': 'GroupMembers', 'resources': 'ResourceGroups', } attribute_map = { 'users': 'users', 'resources': 'resources', } def __init__(self, users=None, resources=None, local_vars_configuration=None): # noqa: E501 """GroupEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._users = None self._resources = None self.discriminator = None if users is not None: self.users = users if resources is not None: self.resources = resources @property def users(self): """Gets the users of this GroupEntities. # noqa: E501 :return: The users of this GroupEntities. # noqa: E501 :rtype: GroupMembers """ return self._users @users.setter def users(self, users): """Sets the users of this GroupEntities. :param users: The users of this GroupEntities. # noqa: E501 :type users: GroupMembers """ self._users = users @property def resources(self): """Gets the resources of this GroupEntities. # noqa: E501 :return: The resources of this GroupEntities. # noqa: E501 :rtype: ResourceGroups """ return self._resources @resources.setter def resources(self, resources): """Sets the resources of this GroupEntities. :param resources: The resources of this GroupEntities. # noqa: E501 :type resources: ResourceGroups """ self._resources = resources def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_members.py0000644000175100001660000001330215046550310022242 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupMembers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[User]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """GroupMembers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this GroupMembers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this GroupMembers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this GroupMembers. The resource's unique identifier. # noqa: E501 :param id: The id of this GroupMembers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this GroupMembers. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this GroupMembers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this GroupMembers. The type of object that has been created. # noqa: E501 :param type: The type of this GroupMembers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this GroupMembers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this GroupMembers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this GroupMembers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this GroupMembers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this GroupMembers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this GroupMembers. # noqa: E501 :rtype: list[User] """ return self._items @items.setter def items(self, items): """Sets the items of this GroupMembers. Array of items in the collection. # noqa: E501 :param items: The items of this GroupMembers. # noqa: E501 :type items: list[User] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupMembers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupMembers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_properties.py0000644000175100001660000007505015046550310023014 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'create_data_center': 'bool', 'create_snapshot': 'bool', 'reserve_ip': 'bool', 'access_activity_log': 'bool', 'create_pcc': 'bool', 's3_privilege': 'bool', 'create_backup_unit': 'bool', 'create_internet_access': 'bool', 'create_k8s_cluster': 'bool', 'create_flow_log': 'bool', 'access_and_manage_monitoring': 'bool', 'access_and_manage_certificates': 'bool', 'manage_dbaas': 'bool', 'access_and_manage_dns': 'bool', 'manage_registry': 'bool', 'manage_dataplatform': 'bool', 'access_and_manage_logging': 'bool', 'access_and_manage_cdn': 'bool', 'access_and_manage_vpn': 'bool', 'access_and_manage_api_gateway': 'bool', 'access_and_manage_kaas': 'bool', 'access_and_manage_network_file_storage': 'bool', 'access_and_manage_ai_model_hub': 'bool', 'access_and_manage_iam_resources': 'bool', 'create_network_security_groups': 'bool', } attribute_map = { 'name': 'name', 'create_data_center': 'createDataCenter', 'create_snapshot': 'createSnapshot', 'reserve_ip': 'reserveIp', 'access_activity_log': 'accessActivityLog', 'create_pcc': 'createPcc', 's3_privilege': 's3Privilege', 'create_backup_unit': 'createBackupUnit', 'create_internet_access': 'createInternetAccess', 'create_k8s_cluster': 'createK8sCluster', 'create_flow_log': 'createFlowLog', 'access_and_manage_monitoring': 'accessAndManageMonitoring', 'access_and_manage_certificates': 'accessAndManageCertificates', 'manage_dbaas': 'manageDBaaS', 'access_and_manage_dns': 'accessAndManageDns', 'manage_registry': 'manageRegistry', 'manage_dataplatform': 'manageDataplatform', 'access_and_manage_logging': 'accessAndManageLogging', 'access_and_manage_cdn': 'accessAndManageCdn', 'access_and_manage_vpn': 'accessAndManageVpn', 'access_and_manage_api_gateway': 'accessAndManageApiGateway', 'access_and_manage_kaas': 'accessAndManageKaas', 'access_and_manage_network_file_storage': 'accessAndManageNetworkFileStorage', 'access_and_manage_ai_model_hub': 'accessAndManageAiModelHub', 'access_and_manage_iam_resources': 'accessAndManageIamResources', 'create_network_security_groups': 'createNetworkSecurityGroups', } def __init__(self, name=None, create_data_center=None, create_snapshot=None, reserve_ip=None, access_activity_log=None, create_pcc=None, s3_privilege=None, create_backup_unit=None, create_internet_access=None, create_k8s_cluster=None, create_flow_log=None, access_and_manage_monitoring=None, access_and_manage_certificates=None, manage_dbaas=None, access_and_manage_dns=None, manage_registry=None, manage_dataplatform=None, access_and_manage_logging=None, access_and_manage_cdn=None, access_and_manage_vpn=None, access_and_manage_api_gateway=None, access_and_manage_kaas=None, access_and_manage_network_file_storage=None, access_and_manage_ai_model_hub=None, access_and_manage_iam_resources=None, create_network_security_groups=None, local_vars_configuration=None): # noqa: E501 """GroupProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._create_data_center = None self._create_snapshot = None self._reserve_ip = None self._access_activity_log = None self._create_pcc = None self._s3_privilege = None self._create_backup_unit = None self._create_internet_access = None self._create_k8s_cluster = None self._create_flow_log = None self._access_and_manage_monitoring = None self._access_and_manage_certificates = None self._manage_dbaas = None self._access_and_manage_dns = None self._manage_registry = None self._manage_dataplatform = None self._access_and_manage_logging = None self._access_and_manage_cdn = None self._access_and_manage_vpn = None self._access_and_manage_api_gateway = None self._access_and_manage_kaas = None self._access_and_manage_network_file_storage = None self._access_and_manage_ai_model_hub = None self._access_and_manage_iam_resources = None self._create_network_security_groups = None self.discriminator = None if name is not None: self.name = name if create_data_center is not None: self.create_data_center = create_data_center if create_snapshot is not None: self.create_snapshot = create_snapshot if reserve_ip is not None: self.reserve_ip = reserve_ip if access_activity_log is not None: self.access_activity_log = access_activity_log if create_pcc is not None: self.create_pcc = create_pcc if s3_privilege is not None: self.s3_privilege = s3_privilege if create_backup_unit is not None: self.create_backup_unit = create_backup_unit if create_internet_access is not None: self.create_internet_access = create_internet_access if create_k8s_cluster is not None: self.create_k8s_cluster = create_k8s_cluster if create_flow_log is not None: self.create_flow_log = create_flow_log if access_and_manage_monitoring is not None: self.access_and_manage_monitoring = access_and_manage_monitoring if access_and_manage_certificates is not None: self.access_and_manage_certificates = access_and_manage_certificates if manage_dbaas is not None: self.manage_dbaas = manage_dbaas if access_and_manage_dns is not None: self.access_and_manage_dns = access_and_manage_dns if manage_registry is not None: self.manage_registry = manage_registry if manage_dataplatform is not None: self.manage_dataplatform = manage_dataplatform if access_and_manage_logging is not None: self.access_and_manage_logging = access_and_manage_logging if access_and_manage_cdn is not None: self.access_and_manage_cdn = access_and_manage_cdn if access_and_manage_vpn is not None: self.access_and_manage_vpn = access_and_manage_vpn if access_and_manage_api_gateway is not None: self.access_and_manage_api_gateway = access_and_manage_api_gateway if access_and_manage_kaas is not None: self.access_and_manage_kaas = access_and_manage_kaas if access_and_manage_network_file_storage is not None: self.access_and_manage_network_file_storage = access_and_manage_network_file_storage if access_and_manage_ai_model_hub is not None: self.access_and_manage_ai_model_hub = access_and_manage_ai_model_hub if access_and_manage_iam_resources is not None: self.access_and_manage_iam_resources = access_and_manage_iam_resources if create_network_security_groups is not None: self.create_network_security_groups = create_network_security_groups @property def name(self): """Gets the name of this GroupProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this GroupProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this GroupProperties. The name of the resource. # noqa: E501 :param name: The name of this GroupProperties. # noqa: E501 :type name: str """ self._name = name @property def create_data_center(self): """Gets the create_data_center of this GroupProperties. # noqa: E501 Create data center privilege. # noqa: E501 :return: The create_data_center of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_data_center @create_data_center.setter def create_data_center(self, create_data_center): """Sets the create_data_center of this GroupProperties. Create data center privilege. # noqa: E501 :param create_data_center: The create_data_center of this GroupProperties. # noqa: E501 :type create_data_center: bool """ self._create_data_center = create_data_center @property def create_snapshot(self): """Gets the create_snapshot of this GroupProperties. # noqa: E501 Create snapshot privilege. # noqa: E501 :return: The create_snapshot of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_snapshot @create_snapshot.setter def create_snapshot(self, create_snapshot): """Sets the create_snapshot of this GroupProperties. Create snapshot privilege. # noqa: E501 :param create_snapshot: The create_snapshot of this GroupProperties. # noqa: E501 :type create_snapshot: bool """ self._create_snapshot = create_snapshot @property def reserve_ip(self): """Gets the reserve_ip of this GroupProperties. # noqa: E501 Reserve IP block privilege. # noqa: E501 :return: The reserve_ip of this GroupProperties. # noqa: E501 :rtype: bool """ return self._reserve_ip @reserve_ip.setter def reserve_ip(self, reserve_ip): """Sets the reserve_ip of this GroupProperties. Reserve IP block privilege. # noqa: E501 :param reserve_ip: The reserve_ip of this GroupProperties. # noqa: E501 :type reserve_ip: bool """ self._reserve_ip = reserve_ip @property def access_activity_log(self): """Gets the access_activity_log of this GroupProperties. # noqa: E501 Activity log access privilege. # noqa: E501 :return: The access_activity_log of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_activity_log @access_activity_log.setter def access_activity_log(self, access_activity_log): """Sets the access_activity_log of this GroupProperties. Activity log access privilege. # noqa: E501 :param access_activity_log: The access_activity_log of this GroupProperties. # noqa: E501 :type access_activity_log: bool """ self._access_activity_log = access_activity_log @property def create_pcc(self): """Gets the create_pcc of this GroupProperties. # noqa: E501 User privilege to create a cross connect. # noqa: E501 :return: The create_pcc of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_pcc @create_pcc.setter def create_pcc(self, create_pcc): """Sets the create_pcc of this GroupProperties. User privilege to create a cross connect. # noqa: E501 :param create_pcc: The create_pcc of this GroupProperties. # noqa: E501 :type create_pcc: bool """ self._create_pcc = create_pcc @property def s3_privilege(self): """Gets the s3_privilege of this GroupProperties. # noqa: E501 S3 privilege. # noqa: E501 :return: The s3_privilege of this GroupProperties. # noqa: E501 :rtype: bool """ return self._s3_privilege @s3_privilege.setter def s3_privilege(self, s3_privilege): """Sets the s3_privilege of this GroupProperties. S3 privilege. # noqa: E501 :param s3_privilege: The s3_privilege of this GroupProperties. # noqa: E501 :type s3_privilege: bool """ self._s3_privilege = s3_privilege @property def create_backup_unit(self): """Gets the create_backup_unit of this GroupProperties. # noqa: E501 Create backup unit privilege. # noqa: E501 :return: The create_backup_unit of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_backup_unit @create_backup_unit.setter def create_backup_unit(self, create_backup_unit): """Sets the create_backup_unit of this GroupProperties. Create backup unit privilege. # noqa: E501 :param create_backup_unit: The create_backup_unit of this GroupProperties. # noqa: E501 :type create_backup_unit: bool """ self._create_backup_unit = create_backup_unit @property def create_internet_access(self): """Gets the create_internet_access of this GroupProperties. # noqa: E501 Create internet access privilege. # noqa: E501 :return: The create_internet_access of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_internet_access @create_internet_access.setter def create_internet_access(self, create_internet_access): """Sets the create_internet_access of this GroupProperties. Create internet access privilege. # noqa: E501 :param create_internet_access: The create_internet_access of this GroupProperties. # noqa: E501 :type create_internet_access: bool """ self._create_internet_access = create_internet_access @property def create_k8s_cluster(self): """Gets the create_k8s_cluster of this GroupProperties. # noqa: E501 Create Kubernetes cluster privilege. # noqa: E501 :return: The create_k8s_cluster of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_k8s_cluster @create_k8s_cluster.setter def create_k8s_cluster(self, create_k8s_cluster): """Sets the create_k8s_cluster of this GroupProperties. Create Kubernetes cluster privilege. # noqa: E501 :param create_k8s_cluster: The create_k8s_cluster of this GroupProperties. # noqa: E501 :type create_k8s_cluster: bool """ self._create_k8s_cluster = create_k8s_cluster @property def create_flow_log(self): """Gets the create_flow_log of this GroupProperties. # noqa: E501 Create Flow Logs privilege. # noqa: E501 :return: The create_flow_log of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_flow_log @create_flow_log.setter def create_flow_log(self, create_flow_log): """Sets the create_flow_log of this GroupProperties. Create Flow Logs privilege. # noqa: E501 :param create_flow_log: The create_flow_log of this GroupProperties. # noqa: E501 :type create_flow_log: bool """ self._create_flow_log = create_flow_log @property def access_and_manage_monitoring(self): """Gets the access_and_manage_monitoring of this GroupProperties. # noqa: E501 Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). # noqa: E501 :return: The access_and_manage_monitoring of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_monitoring @access_and_manage_monitoring.setter def access_and_manage_monitoring(self, access_and_manage_monitoring): """Sets the access_and_manage_monitoring of this GroupProperties. Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). # noqa: E501 :param access_and_manage_monitoring: The access_and_manage_monitoring of this GroupProperties. # noqa: E501 :type access_and_manage_monitoring: bool """ self._access_and_manage_monitoring = access_and_manage_monitoring @property def access_and_manage_certificates(self): """Gets the access_and_manage_certificates of this GroupProperties. # noqa: E501 Privilege for a group to access and manage certificates. # noqa: E501 :return: The access_and_manage_certificates of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_certificates @access_and_manage_certificates.setter def access_and_manage_certificates(self, access_and_manage_certificates): """Sets the access_and_manage_certificates of this GroupProperties. Privilege for a group to access and manage certificates. # noqa: E501 :param access_and_manage_certificates: The access_and_manage_certificates of this GroupProperties. # noqa: E501 :type access_and_manage_certificates: bool """ self._access_and_manage_certificates = access_and_manage_certificates @property def manage_dbaas(self): """Gets the manage_dbaas of this GroupProperties. # noqa: E501 Privilege for a group to manage DBaaS related functionality. # noqa: E501 :return: The manage_dbaas of this GroupProperties. # noqa: E501 :rtype: bool """ return self._manage_dbaas @manage_dbaas.setter def manage_dbaas(self, manage_dbaas): """Sets the manage_dbaas of this GroupProperties. Privilege for a group to manage DBaaS related functionality. # noqa: E501 :param manage_dbaas: The manage_dbaas of this GroupProperties. # noqa: E501 :type manage_dbaas: bool """ self._manage_dbaas = manage_dbaas @property def access_and_manage_dns(self): """Gets the access_and_manage_dns of this GroupProperties. # noqa: E501 Privilege for a group to access and manage dns records. # noqa: E501 :return: The access_and_manage_dns of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_dns @access_and_manage_dns.setter def access_and_manage_dns(self, access_and_manage_dns): """Sets the access_and_manage_dns of this GroupProperties. Privilege for a group to access and manage dns records. # noqa: E501 :param access_and_manage_dns: The access_and_manage_dns of this GroupProperties. # noqa: E501 :type access_and_manage_dns: bool """ self._access_and_manage_dns = access_and_manage_dns @property def manage_registry(self): """Gets the manage_registry of this GroupProperties. # noqa: E501 Privilege for group accessing container registry related functionality. # noqa: E501 :return: The manage_registry of this GroupProperties. # noqa: E501 :rtype: bool """ return self._manage_registry @manage_registry.setter def manage_registry(self, manage_registry): """Sets the manage_registry of this GroupProperties. Privilege for group accessing container registry related functionality. # noqa: E501 :param manage_registry: The manage_registry of this GroupProperties. # noqa: E501 :type manage_registry: bool """ self._manage_registry = manage_registry @property def manage_dataplatform(self): """Gets the manage_dataplatform of this GroupProperties. # noqa: E501 Privilege for a group to access and manage the Data Platform. # noqa: E501 :return: The manage_dataplatform of this GroupProperties. # noqa: E501 :rtype: bool """ return self._manage_dataplatform @manage_dataplatform.setter def manage_dataplatform(self, manage_dataplatform): """Sets the manage_dataplatform of this GroupProperties. Privilege for a group to access and manage the Data Platform. # noqa: E501 :param manage_dataplatform: The manage_dataplatform of this GroupProperties. # noqa: E501 :type manage_dataplatform: bool """ self._manage_dataplatform = manage_dataplatform @property def access_and_manage_logging(self): """Gets the access_and_manage_logging of this GroupProperties. # noqa: E501 Privilege for a group to access and manage Logs. # noqa: E501 :return: The access_and_manage_logging of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_logging @access_and_manage_logging.setter def access_and_manage_logging(self, access_and_manage_logging): """Sets the access_and_manage_logging of this GroupProperties. Privilege for a group to access and manage Logs. # noqa: E501 :param access_and_manage_logging: The access_and_manage_logging of this GroupProperties. # noqa: E501 :type access_and_manage_logging: bool """ self._access_and_manage_logging = access_and_manage_logging @property def access_and_manage_cdn(self): """Gets the access_and_manage_cdn of this GroupProperties. # noqa: E501 Privilege for a group to access and manage CDN. # noqa: E501 :return: The access_and_manage_cdn of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_cdn @access_and_manage_cdn.setter def access_and_manage_cdn(self, access_and_manage_cdn): """Sets the access_and_manage_cdn of this GroupProperties. Privilege for a group to access and manage CDN. # noqa: E501 :param access_and_manage_cdn: The access_and_manage_cdn of this GroupProperties. # noqa: E501 :type access_and_manage_cdn: bool """ self._access_and_manage_cdn = access_and_manage_cdn @property def access_and_manage_vpn(self): """Gets the access_and_manage_vpn of this GroupProperties. # noqa: E501 Privilege for a group to access and manage VPN. # noqa: E501 :return: The access_and_manage_vpn of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_vpn @access_and_manage_vpn.setter def access_and_manage_vpn(self, access_and_manage_vpn): """Sets the access_and_manage_vpn of this GroupProperties. Privilege for a group to access and manage VPN. # noqa: E501 :param access_and_manage_vpn: The access_and_manage_vpn of this GroupProperties. # noqa: E501 :type access_and_manage_vpn: bool """ self._access_and_manage_vpn = access_and_manage_vpn @property def access_and_manage_api_gateway(self): """Gets the access_and_manage_api_gateway of this GroupProperties. # noqa: E501 Privilege for a group to access and manage API Gateway. # noqa: E501 :return: The access_and_manage_api_gateway of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_api_gateway @access_and_manage_api_gateway.setter def access_and_manage_api_gateway(self, access_and_manage_api_gateway): """Sets the access_and_manage_api_gateway of this GroupProperties. Privilege for a group to access and manage API Gateway. # noqa: E501 :param access_and_manage_api_gateway: The access_and_manage_api_gateway of this GroupProperties. # noqa: E501 :type access_and_manage_api_gateway: bool """ self._access_and_manage_api_gateway = access_and_manage_api_gateway @property def access_and_manage_kaas(self): """Gets the access_and_manage_kaas of this GroupProperties. # noqa: E501 Privilege for a group to access and manage KaaS. # noqa: E501 :return: The access_and_manage_kaas of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_kaas @access_and_manage_kaas.setter def access_and_manage_kaas(self, access_and_manage_kaas): """Sets the access_and_manage_kaas of this GroupProperties. Privilege for a group to access and manage KaaS. # noqa: E501 :param access_and_manage_kaas: The access_and_manage_kaas of this GroupProperties. # noqa: E501 :type access_and_manage_kaas: bool """ self._access_and_manage_kaas = access_and_manage_kaas @property def access_and_manage_network_file_storage(self): """Gets the access_and_manage_network_file_storage of this GroupProperties. # noqa: E501 Privilege for a group to access and manage Network File Storage. # noqa: E501 :return: The access_and_manage_network_file_storage of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_network_file_storage @access_and_manage_network_file_storage.setter def access_and_manage_network_file_storage(self, access_and_manage_network_file_storage): """Sets the access_and_manage_network_file_storage of this GroupProperties. Privilege for a group to access and manage Network File Storage. # noqa: E501 :param access_and_manage_network_file_storage: The access_and_manage_network_file_storage of this GroupProperties. # noqa: E501 :type access_and_manage_network_file_storage: bool """ self._access_and_manage_network_file_storage = access_and_manage_network_file_storage @property def access_and_manage_ai_model_hub(self): """Gets the access_and_manage_ai_model_hub of this GroupProperties. # noqa: E501 Privilege for a group to access and manage AI Model Hub. # noqa: E501 :return: The access_and_manage_ai_model_hub of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_ai_model_hub @access_and_manage_ai_model_hub.setter def access_and_manage_ai_model_hub(self, access_and_manage_ai_model_hub): """Sets the access_and_manage_ai_model_hub of this GroupProperties. Privilege for a group to access and manage AI Model Hub. # noqa: E501 :param access_and_manage_ai_model_hub: The access_and_manage_ai_model_hub of this GroupProperties. # noqa: E501 :type access_and_manage_ai_model_hub: bool """ self._access_and_manage_ai_model_hub = access_and_manage_ai_model_hub @property def access_and_manage_iam_resources(self): """Gets the access_and_manage_iam_resources of this GroupProperties. # noqa: E501 Privilege for a group to access and manage Password Policies. # noqa: E501 :return: The access_and_manage_iam_resources of this GroupProperties. # noqa: E501 :rtype: bool """ return self._access_and_manage_iam_resources @access_and_manage_iam_resources.setter def access_and_manage_iam_resources(self, access_and_manage_iam_resources): """Sets the access_and_manage_iam_resources of this GroupProperties. Privilege for a group to access and manage Password Policies. # noqa: E501 :param access_and_manage_iam_resources: The access_and_manage_iam_resources of this GroupProperties. # noqa: E501 :type access_and_manage_iam_resources: bool """ self._access_and_manage_iam_resources = access_and_manage_iam_resources @property def create_network_security_groups(self): """Gets the create_network_security_groups of this GroupProperties. # noqa: E501 Privilege for a group to access and manage Network Security Groups. # noqa: E501 :return: The create_network_security_groups of this GroupProperties. # noqa: E501 :rtype: bool """ return self._create_network_security_groups @create_network_security_groups.setter def create_network_security_groups(self, create_network_security_groups): """Sets the create_network_security_groups of this GroupProperties. Privilege for a group to access and manage Network Security Groups. # noqa: E501 :param create_network_security_groups: The create_network_security_groups of this GroupProperties. # noqa: E501 :type create_network_security_groups: bool """ self._create_network_security_groups = create_network_security_groups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_share.py0000644000175100001660000001345715046550310021725 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupShare(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'GroupShareProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """GroupShare - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this GroupShare. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this GroupShare. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this GroupShare. The resource's unique identifier. # noqa: E501 :param id: The id of this GroupShare. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this GroupShare. # noqa: E501 resource as generic type # noqa: E501 :return: The type of this GroupShare. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this GroupShare. resource as generic type # noqa: E501 :param type: The type of this GroupShare. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this GroupShare. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this GroupShare. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this GroupShare. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this GroupShare. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this GroupShare. # noqa: E501 :return: The properties of this GroupShare. # noqa: E501 :rtype: GroupShareProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this GroupShare. :param properties: The properties of this GroupShare. # noqa: E501 :type properties: GroupShareProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupShare): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupShare): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_share_properties.py0000644000175100001660000001145215046550310024172 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupShareProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'edit_privilege': 'bool', 'share_privilege': 'bool', } attribute_map = { 'edit_privilege': 'editPrivilege', 'share_privilege': 'sharePrivilege', } def __init__(self, edit_privilege=None, share_privilege=None, local_vars_configuration=None): # noqa: E501 """GroupShareProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._edit_privilege = None self._share_privilege = None self.discriminator = None if edit_privilege is not None: self.edit_privilege = edit_privilege if share_privilege is not None: self.share_privilege = share_privilege @property def edit_privilege(self): """Gets the edit_privilege of this GroupShareProperties. # noqa: E501 edit privilege on a resource # noqa: E501 :return: The edit_privilege of this GroupShareProperties. # noqa: E501 :rtype: bool """ return self._edit_privilege @edit_privilege.setter def edit_privilege(self, edit_privilege): """Sets the edit_privilege of this GroupShareProperties. edit privilege on a resource # noqa: E501 :param edit_privilege: The edit_privilege of this GroupShareProperties. # noqa: E501 :type edit_privilege: bool """ self._edit_privilege = edit_privilege @property def share_privilege(self): """Gets the share_privilege of this GroupShareProperties. # noqa: E501 share privilege on a resource # noqa: E501 :return: The share_privilege of this GroupShareProperties. # noqa: E501 :rtype: bool """ return self._share_privilege @share_privilege.setter def share_privilege(self, share_privilege): """Sets the share_privilege of this GroupShareProperties. share privilege on a resource # noqa: E501 :param share_privilege: The share_privilege of this GroupShareProperties. # noqa: E501 :type share_privilege: bool """ self._share_privilege = share_privilege def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupShareProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupShareProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_shares.py0000644000175100001660000001332415046550310022101 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupShares(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[GroupShare]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """GroupShares - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this GroupShares. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this GroupShares. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this GroupShares. The resource's unique identifier. # noqa: E501 :param id: The id of this GroupShares. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this GroupShares. # noqa: E501 Share representing groups and resource relationship # noqa: E501 :return: The type of this GroupShares. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this GroupShares. Share representing groups and resource relationship # noqa: E501 :param type: The type of this GroupShares. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this GroupShares. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this GroupShares. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this GroupShares. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this GroupShares. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this GroupShares. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this GroupShares. # noqa: E501 :rtype: list[GroupShare] """ return self._items @items.setter def items(self, items): """Sets the items of this GroupShares. Array of items in the collection. # noqa: E501 :param items: The items of this GroupShares. # noqa: E501 :type items: list[GroupShare] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupShares): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupShares): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/group_users.py0000644000175100001660000001317515046550310021761 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class GroupUsers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Group]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """GroupUsers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this GroupUsers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this GroupUsers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this GroupUsers. The resource's unique identifier. # noqa: E501 :param id: The id of this GroupUsers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this GroupUsers. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this GroupUsers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this GroupUsers. The type of the resource. # noqa: E501 :param type: The type of this GroupUsers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this GroupUsers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this GroupUsers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this GroupUsers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this GroupUsers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this GroupUsers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this GroupUsers. # noqa: E501 :rtype: list[Group] """ return self._items @items.setter def items(self, items): """Sets the items of this GroupUsers. Array of items in the collection. # noqa: E501 :param items: The items of this GroupUsers. # noqa: E501 :type items: list[Group] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, GroupUsers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, GroupUsers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/groups.py0000644000175100001660000001305515046550310020720 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Groups(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Group]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Groups - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Groups. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Groups. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Groups. The resource's unique identifier. # noqa: E501 :param id: The id of this Groups. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Groups. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this Groups. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Groups. The type of the resource. # noqa: E501 :param type: The type of this Groups. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Groups. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Groups. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Groups. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Groups. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Groups. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Groups. # noqa: E501 :rtype: list[Group] """ return self._items @items.setter def items(self, items): """Sets the items of this Groups. Array of items in the collection. # noqa: E501 :param items: The items of this Groups. # noqa: E501 :type items: list[Group] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Groups): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Groups): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/image.py0000644000175100001660000001464015046550310020464 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Image(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ImageProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Image - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Image. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Image. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Image. The resource's unique identifier. # noqa: E501 :param id: The id of this Image. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Image. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Image. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Image. The type of object that has been created. # noqa: E501 :param type: The type of this Image. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Image. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Image. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Image. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Image. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Image. # noqa: E501 :return: The metadata of this Image. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Image. :param metadata: The metadata of this Image. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Image. # noqa: E501 :return: The properties of this Image. # noqa: E501 :rtype: ImageProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Image. :param properties: The properties of this Image. # noqa: E501 :type properties: ImageProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Image): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Image): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/image_properties.py0000644000175100001660000006123315046550310022740 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ImageProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'location': 'str', 'size': 'float', 'cpu_hot_plug': 'bool', 'cpu_hot_unplug': 'bool', 'ram_hot_plug': 'bool', 'ram_hot_unplug': 'bool', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'disc_scsi_hot_plug': 'bool', 'disc_scsi_hot_unplug': 'bool', 'expose_serial': 'bool', 'require_legacy_bios': 'bool', 'licence_type': 'str', 'application_type': 'str', 'image_type': 'str', 'public': 'bool', 'image_aliases': 'list[str]', 'cloud_init': 'str', } attribute_map = { 'name': 'name', 'description': 'description', 'location': 'location', 'size': 'size', 'cpu_hot_plug': 'cpuHotPlug', 'cpu_hot_unplug': 'cpuHotUnplug', 'ram_hot_plug': 'ramHotPlug', 'ram_hot_unplug': 'ramHotUnplug', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'disc_scsi_hot_plug': 'discScsiHotPlug', 'disc_scsi_hot_unplug': 'discScsiHotUnplug', 'expose_serial': 'exposeSerial', 'require_legacy_bios': 'requireLegacyBios', 'licence_type': 'licenceType', 'application_type': 'applicationType', 'image_type': 'imageType', 'public': 'public', 'image_aliases': 'imageAliases', 'cloud_init': 'cloudInit', } def __init__(self, name=None, description=None, location=None, size=None, cpu_hot_plug=None, cpu_hot_unplug=None, ram_hot_plug=None, ram_hot_unplug=None, nic_hot_plug=None, nic_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, disc_scsi_hot_plug=None, disc_scsi_hot_unplug=None, expose_serial=False, require_legacy_bios=True, licence_type=None, application_type=None, image_type=None, public=None, image_aliases=None, cloud_init=None, local_vars_configuration=None): # noqa: E501 """ImageProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._location = None self._size = None self._cpu_hot_plug = None self._cpu_hot_unplug = None self._ram_hot_plug = None self._ram_hot_unplug = None self._nic_hot_plug = None self._nic_hot_unplug = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._disc_scsi_hot_plug = None self._disc_scsi_hot_unplug = None self._expose_serial = None self._require_legacy_bios = None self._licence_type = None self._application_type = None self._image_type = None self._public = None self._image_aliases = None self._cloud_init = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description if location is not None: self.location = location if size is not None: self.size = size if cpu_hot_plug is not None: self.cpu_hot_plug = cpu_hot_plug if cpu_hot_unplug is not None: self.cpu_hot_unplug = cpu_hot_unplug if ram_hot_plug is not None: self.ram_hot_plug = ram_hot_plug if ram_hot_unplug is not None: self.ram_hot_unplug = ram_hot_unplug if nic_hot_plug is not None: self.nic_hot_plug = nic_hot_plug if nic_hot_unplug is not None: self.nic_hot_unplug = nic_hot_unplug if disc_virtio_hot_plug is not None: self.disc_virtio_hot_plug = disc_virtio_hot_plug if disc_virtio_hot_unplug is not None: self.disc_virtio_hot_unplug = disc_virtio_hot_unplug if disc_scsi_hot_plug is not None: self.disc_scsi_hot_plug = disc_scsi_hot_plug if disc_scsi_hot_unplug is not None: self.disc_scsi_hot_unplug = disc_scsi_hot_unplug if expose_serial is not None: self.expose_serial = expose_serial if require_legacy_bios is not None: self.require_legacy_bios = require_legacy_bios self.licence_type = licence_type if application_type is not None: self.application_type = application_type if image_type is not None: self.image_type = image_type if public is not None: self.public = public if image_aliases is not None: self.image_aliases = image_aliases if cloud_init is not None: self.cloud_init = cloud_init @property def name(self): """Gets the name of this ImageProperties. # noqa: E501 The resource name. # noqa: E501 :return: The name of this ImageProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ImageProperties. The resource name. # noqa: E501 :param name: The name of this ImageProperties. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this ImageProperties. # noqa: E501 Human-readable description. # noqa: E501 :return: The description of this ImageProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this ImageProperties. Human-readable description. # noqa: E501 :param description: The description of this ImageProperties. # noqa: E501 :type description: str """ self._description = description @property def location(self): """Gets the location of this ImageProperties. # noqa: E501 The location of this image/snapshot. # noqa: E501 :return: The location of this ImageProperties. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this ImageProperties. The location of this image/snapshot. # noqa: E501 :param location: The location of this ImageProperties. # noqa: E501 :type location: str """ self._location = location @property def size(self): """Gets the size of this ImageProperties. # noqa: E501 The image size in GB. # noqa: E501 :return: The size of this ImageProperties. # noqa: E501 :rtype: float """ return self._size @size.setter def size(self, size): """Sets the size of this ImageProperties. The image size in GB. # noqa: E501 :param size: The size of this ImageProperties. # noqa: E501 :type size: float """ self._size = size @property def cpu_hot_plug(self): """Gets the cpu_hot_plug of this ImageProperties. # noqa: E501 Hot-plug capable CPU (no reboot required). # noqa: E501 :return: The cpu_hot_plug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._cpu_hot_plug @cpu_hot_plug.setter def cpu_hot_plug(self, cpu_hot_plug): """Sets the cpu_hot_plug of this ImageProperties. Hot-plug capable CPU (no reboot required). # noqa: E501 :param cpu_hot_plug: The cpu_hot_plug of this ImageProperties. # noqa: E501 :type cpu_hot_plug: bool """ self._cpu_hot_plug = cpu_hot_plug @property def cpu_hot_unplug(self): """Gets the cpu_hot_unplug of this ImageProperties. # noqa: E501 Hot-unplug capable CPU (no reboot required). # noqa: E501 :return: The cpu_hot_unplug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._cpu_hot_unplug @cpu_hot_unplug.setter def cpu_hot_unplug(self, cpu_hot_unplug): """Sets the cpu_hot_unplug of this ImageProperties. Hot-unplug capable CPU (no reboot required). # noqa: E501 :param cpu_hot_unplug: The cpu_hot_unplug of this ImageProperties. # noqa: E501 :type cpu_hot_unplug: bool """ self._cpu_hot_unplug = cpu_hot_unplug @property def ram_hot_plug(self): """Gets the ram_hot_plug of this ImageProperties. # noqa: E501 Hot-plug capable RAM (no reboot required). # noqa: E501 :return: The ram_hot_plug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._ram_hot_plug @ram_hot_plug.setter def ram_hot_plug(self, ram_hot_plug): """Sets the ram_hot_plug of this ImageProperties. Hot-plug capable RAM (no reboot required). # noqa: E501 :param ram_hot_plug: The ram_hot_plug of this ImageProperties. # noqa: E501 :type ram_hot_plug: bool """ self._ram_hot_plug = ram_hot_plug @property def ram_hot_unplug(self): """Gets the ram_hot_unplug of this ImageProperties. # noqa: E501 Hot-unplug capable RAM (no reboot required). # noqa: E501 :return: The ram_hot_unplug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._ram_hot_unplug @ram_hot_unplug.setter def ram_hot_unplug(self, ram_hot_unplug): """Sets the ram_hot_unplug of this ImageProperties. Hot-unplug capable RAM (no reboot required). # noqa: E501 :param ram_hot_unplug: The ram_hot_unplug of this ImageProperties. # noqa: E501 :type ram_hot_unplug: bool """ self._ram_hot_unplug = ram_hot_unplug @property def nic_hot_plug(self): """Gets the nic_hot_plug of this ImageProperties. # noqa: E501 Hot-plug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_plug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_plug @nic_hot_plug.setter def nic_hot_plug(self, nic_hot_plug): """Sets the nic_hot_plug of this ImageProperties. Hot-plug capable NIC (no reboot required). # noqa: E501 :param nic_hot_plug: The nic_hot_plug of this ImageProperties. # noqa: E501 :type nic_hot_plug: bool """ self._nic_hot_plug = nic_hot_plug @property def nic_hot_unplug(self): """Gets the nic_hot_unplug of this ImageProperties. # noqa: E501 Hot-unplug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_unplug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_unplug @nic_hot_unplug.setter def nic_hot_unplug(self, nic_hot_unplug): """Sets the nic_hot_unplug of this ImageProperties. Hot-unplug capable NIC (no reboot required). # noqa: E501 :param nic_hot_unplug: The nic_hot_unplug of this ImageProperties. # noqa: E501 :type nic_hot_unplug: bool """ self._nic_hot_unplug = nic_hot_unplug @property def disc_virtio_hot_plug(self): """Gets the disc_virtio_hot_plug of this ImageProperties. # noqa: E501 Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :return: The disc_virtio_hot_plug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_plug @disc_virtio_hot_plug.setter def disc_virtio_hot_plug(self, disc_virtio_hot_plug): """Sets the disc_virtio_hot_plug of this ImageProperties. Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :param disc_virtio_hot_plug: The disc_virtio_hot_plug of this ImageProperties. # noqa: E501 :type disc_virtio_hot_plug: bool """ self._disc_virtio_hot_plug = disc_virtio_hot_plug @property def disc_virtio_hot_unplug(self): """Gets the disc_virtio_hot_unplug of this ImageProperties. # noqa: E501 Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :return: The disc_virtio_hot_unplug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_unplug @disc_virtio_hot_unplug.setter def disc_virtio_hot_unplug(self, disc_virtio_hot_unplug): """Sets the disc_virtio_hot_unplug of this ImageProperties. Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :param disc_virtio_hot_unplug: The disc_virtio_hot_unplug of this ImageProperties. # noqa: E501 :type disc_virtio_hot_unplug: bool """ self._disc_virtio_hot_unplug = disc_virtio_hot_unplug @property def disc_scsi_hot_plug(self): """Gets the disc_scsi_hot_plug of this ImageProperties. # noqa: E501 Hot-plug capable SCSI drive (no reboot required). # noqa: E501 :return: The disc_scsi_hot_plug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._disc_scsi_hot_plug @disc_scsi_hot_plug.setter def disc_scsi_hot_plug(self, disc_scsi_hot_plug): """Sets the disc_scsi_hot_plug of this ImageProperties. Hot-plug capable SCSI drive (no reboot required). # noqa: E501 :param disc_scsi_hot_plug: The disc_scsi_hot_plug of this ImageProperties. # noqa: E501 :type disc_scsi_hot_plug: bool """ self._disc_scsi_hot_plug = disc_scsi_hot_plug @property def disc_scsi_hot_unplug(self): """Gets the disc_scsi_hot_unplug of this ImageProperties. # noqa: E501 Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :return: The disc_scsi_hot_unplug of this ImageProperties. # noqa: E501 :rtype: bool """ return self._disc_scsi_hot_unplug @disc_scsi_hot_unplug.setter def disc_scsi_hot_unplug(self, disc_scsi_hot_unplug): """Sets the disc_scsi_hot_unplug of this ImageProperties. Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :param disc_scsi_hot_unplug: The disc_scsi_hot_unplug of this ImageProperties. # noqa: E501 :type disc_scsi_hot_unplug: bool """ self._disc_scsi_hot_unplug = disc_scsi_hot_unplug @property def expose_serial(self): """Gets the expose_serial of this ImageProperties. # noqa: E501 If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :return: The expose_serial of this ImageProperties. # noqa: E501 :rtype: bool """ return self._expose_serial @expose_serial.setter def expose_serial(self, expose_serial): """Sets the expose_serial of this ImageProperties. If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :param expose_serial: The expose_serial of this ImageProperties. # noqa: E501 :type expose_serial: bool """ self._expose_serial = expose_serial @property def require_legacy_bios(self): """Gets the require_legacy_bios of this ImageProperties. # noqa: E501 Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :return: The require_legacy_bios of this ImageProperties. # noqa: E501 :rtype: bool """ return self._require_legacy_bios @require_legacy_bios.setter def require_legacy_bios(self, require_legacy_bios): """Sets the require_legacy_bios of this ImageProperties. Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :param require_legacy_bios: The require_legacy_bios of this ImageProperties. # noqa: E501 :type require_legacy_bios: bool """ self._require_legacy_bios = require_legacy_bios @property def licence_type(self): """Gets the licence_type of this ImageProperties. # noqa: E501 The OS type of this image. # noqa: E501 :return: The licence_type of this ImageProperties. # noqa: E501 :rtype: str """ return self._licence_type @licence_type.setter def licence_type(self, licence_type): """Sets the licence_type of this ImageProperties. The OS type of this image. # noqa: E501 :param licence_type: The licence_type of this ImageProperties. # noqa: E501 :type licence_type: str """ if self.local_vars_configuration.client_side_validation and licence_type is None: # noqa: E501 raise ValueError("Invalid value for `licence_type`, must not be `None`") # noqa: E501 allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2019", "WINDOWS2022", "WINDOWS2025", "RHEL", "LINUX", "OTHER"] # noqa: E501 if self.local_vars_configuration.client_side_validation and licence_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `licence_type` ({0}), must be one of {1}" # noqa: E501 .format(licence_type, allowed_values) ) self._licence_type = licence_type @property def application_type(self): """Gets the application_type of this ImageProperties. # noqa: E501 The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :return: The application_type of this ImageProperties. # noqa: E501 :rtype: str """ return self._application_type @application_type.setter def application_type(self, application_type): """Sets the application_type of this ImageProperties. The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :param application_type: The application_type of this ImageProperties. # noqa: E501 :type application_type: str """ self._application_type = application_type @property def image_type(self): """Gets the image_type of this ImageProperties. # noqa: E501 The image type. # noqa: E501 :return: The image_type of this ImageProperties. # noqa: E501 :rtype: str """ return self._image_type @image_type.setter def image_type(self, image_type): """Sets the image_type of this ImageProperties. The image type. # noqa: E501 :param image_type: The image_type of this ImageProperties. # noqa: E501 :type image_type: str """ allowed_values = ["HDD", "CDROM", "UNKNOWN"] # noqa: E501 if self.local_vars_configuration.client_side_validation and image_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `image_type` ({0}), must be one of {1}" # noqa: E501 .format(image_type, allowed_values) ) self._image_type = image_type @property def public(self): """Gets the public of this ImageProperties. # noqa: E501 Indicates whether the image is part of a public repository. # noqa: E501 :return: The public of this ImageProperties. # noqa: E501 :rtype: bool """ return self._public @public.setter def public(self, public): """Sets the public of this ImageProperties. Indicates whether the image is part of a public repository. # noqa: E501 :param public: The public of this ImageProperties. # noqa: E501 :type public: bool """ self._public = public @property def image_aliases(self): """Gets the image_aliases of this ImageProperties. # noqa: E501 List of image aliases mapped for this image # noqa: E501 :return: The image_aliases of this ImageProperties. # noqa: E501 :rtype: list[str] """ return self._image_aliases @image_aliases.setter def image_aliases(self, image_aliases): """Sets the image_aliases of this ImageProperties. List of image aliases mapped for this image # noqa: E501 :param image_aliases: The image_aliases of this ImageProperties. # noqa: E501 :type image_aliases: list[str] """ self._image_aliases = image_aliases @property def cloud_init(self): """Gets the cloud_init of this ImageProperties. # noqa: E501 Cloud init compatibility. # noqa: E501 :return: The cloud_init of this ImageProperties. # noqa: E501 :rtype: str """ return self._cloud_init @cloud_init.setter def cloud_init(self, cloud_init): """Sets the cloud_init of this ImageProperties. Cloud init compatibility. # noqa: E501 :param cloud_init: The cloud_init of this ImageProperties. # noqa: E501 :type cloud_init: str """ allowed_values = ["NONE", "V1"] # noqa: E501 if self.local_vars_configuration.client_side_validation and cloud_init not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `cloud_init` ({0}), must be one of {1}" # noqa: E501 .format(cloud_init, allowed_values) ) self._cloud_init = cloud_init def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ImageProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ImageProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/images.py0000644000175100001660000001312515046550310020644 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Images(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Image]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Images - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Images. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Images. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Images. The resource's unique identifier. # noqa: E501 :param id: The id of this Images. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Images. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Images. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Images. The type of object that has been created. # noqa: E501 :param type: The type of this Images. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Images. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this Images. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Images. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Images. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Images. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Images. # noqa: E501 :rtype: list[Image] """ return self._items @items.setter def items(self, items): """Sets the items of this Images. Array of items in the collection. # noqa: E501 :param items: The items of this Images. # noqa: E501 :type items: list[Image] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Images): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Images): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/info.py0000644000175100001660000001146215046550310020334 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Info(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'href': 'str', 'name': 'str', 'version': 'str', } attribute_map = { 'href': 'href', 'name': 'name', 'version': 'version', } def __init__(self, href=None, name=None, version=None, local_vars_configuration=None): # noqa: E501 """Info - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._href = None self._name = None self._version = None self.discriminator = None if href is not None: self.href = href if name is not None: self.name = name if version is not None: self.version = version @property def href(self): """Gets the href of this Info. # noqa: E501 The API entry point. # noqa: E501 :return: The href of this Info. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Info. The API entry point. # noqa: E501 :param href: The href of this Info. # noqa: E501 :type href: str """ self._href = href @property def name(self): """Gets the name of this Info. # noqa: E501 The API name. # noqa: E501 :return: The name of this Info. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Info. The API name. # noqa: E501 :param name: The name of this Info. # noqa: E501 :type name: str """ self._name = name @property def version(self): """Gets the version of this Info. # noqa: E501 The API version. # noqa: E501 :return: The version of this Info. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): """Sets the version of this Info. The API version. # noqa: E501 :param version: The version of this Info. # noqa: E501 :type version: str """ self._version = version def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Info): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Info): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/ip_block.py0000644000175100001660000001472615046550310021171 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class IpBlock(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'IpBlockProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """IpBlock - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this IpBlock. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this IpBlock. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this IpBlock. The resource's unique identifier. # noqa: E501 :param id: The id of this IpBlock. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this IpBlock. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this IpBlock. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this IpBlock. The type of object that has been created. # noqa: E501 :param type: The type of this IpBlock. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this IpBlock. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this IpBlock. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this IpBlock. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this IpBlock. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this IpBlock. # noqa: E501 :return: The metadata of this IpBlock. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this IpBlock. :param metadata: The metadata of this IpBlock. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this IpBlock. # noqa: E501 :return: The properties of this IpBlock. # noqa: E501 :rtype: IpBlockProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this IpBlock. :param properties: The properties of this IpBlock. # noqa: E501 :type properties: IpBlockProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, IpBlock): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, IpBlock): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/ip_block_properties.py0000644000175100001660000001635415046550311023445 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class IpBlockProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ips': 'list[str]', 'location': 'str', 'size': 'int', 'name': 'str', 'ip_consumers': 'list[IpConsumer]', } attribute_map = { 'ips': 'ips', 'location': 'location', 'size': 'size', 'name': 'name', 'ip_consumers': 'ipConsumers', } def __init__(self, ips=None, location=None, size=None, name=None, ip_consumers=None, local_vars_configuration=None): # noqa: E501 """IpBlockProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ips = None self._location = None self._size = None self._name = None self._ip_consumers = None self.discriminator = None if ips is not None: self.ips = ips self.location = location self.size = size if name is not None: self.name = name if ip_consumers is not None: self.ip_consumers = ip_consumers @property def ips(self): """Gets the ips of this IpBlockProperties. # noqa: E501 Collection of IPs, associated with the IP Block. # noqa: E501 :return: The ips of this IpBlockProperties. # noqa: E501 :rtype: list[str] """ return self._ips @ips.setter def ips(self, ips): """Sets the ips of this IpBlockProperties. Collection of IPs, associated with the IP Block. # noqa: E501 :param ips: The ips of this IpBlockProperties. # noqa: E501 :type ips: list[str] """ self._ips = ips @property def location(self): """Gets the location of this IpBlockProperties. # noqa: E501 Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). # noqa: E501 :return: The location of this IpBlockProperties. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this IpBlockProperties. Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). # noqa: E501 :param location: The location of this IpBlockProperties. # noqa: E501 :type location: str """ if self.local_vars_configuration.client_side_validation and location is None: # noqa: E501 raise ValueError("Invalid value for `location`, must not be `None`") # noqa: E501 self._location = location @property def size(self): """Gets the size of this IpBlockProperties. # noqa: E501 The size of the IP block. # noqa: E501 :return: The size of this IpBlockProperties. # noqa: E501 :rtype: int """ return self._size @size.setter def size(self, size): """Sets the size of this IpBlockProperties. The size of the IP block. # noqa: E501 :param size: The size of this IpBlockProperties. # noqa: E501 :type size: int """ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 self._size = size @property def name(self): """Gets the name of this IpBlockProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this IpBlockProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this IpBlockProperties. The name of the resource. # noqa: E501 :param name: The name of this IpBlockProperties. # noqa: E501 :type name: str """ self._name = name @property def ip_consumers(self): """Gets the ip_consumers of this IpBlockProperties. # noqa: E501 Read-Only attribute. Lists consumption detail for an individual IP # noqa: E501 :return: The ip_consumers of this IpBlockProperties. # noqa: E501 :rtype: list[IpConsumer] """ return self._ip_consumers @ip_consumers.setter def ip_consumers(self, ip_consumers): """Sets the ip_consumers of this IpBlockProperties. Read-Only attribute. Lists consumption detail for an individual IP # noqa: E501 :param ip_consumers: The ip_consumers of this IpBlockProperties. # noqa: E501 :type ip_consumers: list[IpConsumer] """ self._ip_consumers = ip_consumers def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, IpBlockProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, IpBlockProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/ip_blocks.py0000644000175100001660000001756615046550311021362 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class IpBlocks(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[IpBlock]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """IpBlocks - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this IpBlocks. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this IpBlocks. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this IpBlocks. The resource's unique identifier. # noqa: E501 :param id: The id of this IpBlocks. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this IpBlocks. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this IpBlocks. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this IpBlocks. The type of object that has been created. # noqa: E501 :param type: The type of this IpBlocks. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this IpBlocks. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this IpBlocks. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this IpBlocks. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this IpBlocks. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this IpBlocks. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this IpBlocks. # noqa: E501 :rtype: list[IpBlock] """ return self._items @items.setter def items(self, items): """Sets the items of this IpBlocks. Array of items in the collection. # noqa: E501 :param items: The items of this IpBlocks. # noqa: E501 :type items: list[IpBlock] """ self._items = items @property def offset(self): """Gets the offset of this IpBlocks. # noqa: E501 The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :return: The offset of this IpBlocks. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this IpBlocks. The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :param offset: The offset of this IpBlocks. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this IpBlocks. # noqa: E501 The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :return: The limit of this IpBlocks. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this IpBlocks. The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :param limit: The limit of this IpBlocks. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this IpBlocks. # noqa: E501 :return: The links of this IpBlocks. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this IpBlocks. :param links: The links of this IpBlocks. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, IpBlocks): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, IpBlocks): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/ip_consumer.py0000644000175100001660000002221215046550311021720 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class IpConsumer(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ip': 'str', 'mac': 'str', 'nic_id': 'str', 'server_id': 'str', 'server_name': 'str', 'datacenter_id': 'str', 'datacenter_name': 'str', 'k8s_node_pool_uuid': 'str', 'k8s_cluster_uuid': 'str', } attribute_map = { 'ip': 'ip', 'mac': 'mac', 'nic_id': 'nicId', 'server_id': 'serverId', 'server_name': 'serverName', 'datacenter_id': 'datacenterId', 'datacenter_name': 'datacenterName', 'k8s_node_pool_uuid': 'k8sNodePoolUuid', 'k8s_cluster_uuid': 'k8sClusterUuid', } def __init__(self, ip=None, mac=None, nic_id=None, server_id=None, server_name=None, datacenter_id=None, datacenter_name=None, k8s_node_pool_uuid=None, k8s_cluster_uuid=None, local_vars_configuration=None): # noqa: E501 """IpConsumer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ip = None self._mac = None self._nic_id = None self._server_id = None self._server_name = None self._datacenter_id = None self._datacenter_name = None self._k8s_node_pool_uuid = None self._k8s_cluster_uuid = None self.discriminator = None if ip is not None: self.ip = ip if mac is not None: self.mac = mac if nic_id is not None: self.nic_id = nic_id if server_id is not None: self.server_id = server_id if server_name is not None: self.server_name = server_name if datacenter_id is not None: self.datacenter_id = datacenter_id if datacenter_name is not None: self.datacenter_name = datacenter_name if k8s_node_pool_uuid is not None: self.k8s_node_pool_uuid = k8s_node_pool_uuid if k8s_cluster_uuid is not None: self.k8s_cluster_uuid = k8s_cluster_uuid @property def ip(self): """Gets the ip of this IpConsumer. # noqa: E501 :return: The ip of this IpConsumer. # noqa: E501 :rtype: str """ return self._ip @ip.setter def ip(self, ip): """Sets the ip of this IpConsumer. :param ip: The ip of this IpConsumer. # noqa: E501 :type ip: str """ self._ip = ip @property def mac(self): """Gets the mac of this IpConsumer. # noqa: E501 :return: The mac of this IpConsumer. # noqa: E501 :rtype: str """ return self._mac @mac.setter def mac(self, mac): """Sets the mac of this IpConsumer. :param mac: The mac of this IpConsumer. # noqa: E501 :type mac: str """ self._mac = mac @property def nic_id(self): """Gets the nic_id of this IpConsumer. # noqa: E501 :return: The nic_id of this IpConsumer. # noqa: E501 :rtype: str """ return self._nic_id @nic_id.setter def nic_id(self, nic_id): """Sets the nic_id of this IpConsumer. :param nic_id: The nic_id of this IpConsumer. # noqa: E501 :type nic_id: str """ self._nic_id = nic_id @property def server_id(self): """Gets the server_id of this IpConsumer. # noqa: E501 :return: The server_id of this IpConsumer. # noqa: E501 :rtype: str """ return self._server_id @server_id.setter def server_id(self, server_id): """Sets the server_id of this IpConsumer. :param server_id: The server_id of this IpConsumer. # noqa: E501 :type server_id: str """ self._server_id = server_id @property def server_name(self): """Gets the server_name of this IpConsumer. # noqa: E501 :return: The server_name of this IpConsumer. # noqa: E501 :rtype: str """ return self._server_name @server_name.setter def server_name(self, server_name): """Sets the server_name of this IpConsumer. :param server_name: The server_name of this IpConsumer. # noqa: E501 :type server_name: str """ self._server_name = server_name @property def datacenter_id(self): """Gets the datacenter_id of this IpConsumer. # noqa: E501 :return: The datacenter_id of this IpConsumer. # noqa: E501 :rtype: str """ return self._datacenter_id @datacenter_id.setter def datacenter_id(self, datacenter_id): """Sets the datacenter_id of this IpConsumer. :param datacenter_id: The datacenter_id of this IpConsumer. # noqa: E501 :type datacenter_id: str """ self._datacenter_id = datacenter_id @property def datacenter_name(self): """Gets the datacenter_name of this IpConsumer. # noqa: E501 :return: The datacenter_name of this IpConsumer. # noqa: E501 :rtype: str """ return self._datacenter_name @datacenter_name.setter def datacenter_name(self, datacenter_name): """Sets the datacenter_name of this IpConsumer. :param datacenter_name: The datacenter_name of this IpConsumer. # noqa: E501 :type datacenter_name: str """ self._datacenter_name = datacenter_name @property def k8s_node_pool_uuid(self): """Gets the k8s_node_pool_uuid of this IpConsumer. # noqa: E501 :return: The k8s_node_pool_uuid of this IpConsumer. # noqa: E501 :rtype: str """ return self._k8s_node_pool_uuid @k8s_node_pool_uuid.setter def k8s_node_pool_uuid(self, k8s_node_pool_uuid): """Sets the k8s_node_pool_uuid of this IpConsumer. :param k8s_node_pool_uuid: The k8s_node_pool_uuid of this IpConsumer. # noqa: E501 :type k8s_node_pool_uuid: str """ self._k8s_node_pool_uuid = k8s_node_pool_uuid @property def k8s_cluster_uuid(self): """Gets the k8s_cluster_uuid of this IpConsumer. # noqa: E501 :return: The k8s_cluster_uuid of this IpConsumer. # noqa: E501 :rtype: str """ return self._k8s_cluster_uuid @k8s_cluster_uuid.setter def k8s_cluster_uuid(self, k8s_cluster_uuid): """Sets the k8s_cluster_uuid of this IpConsumer. :param k8s_cluster_uuid: The k8s_cluster_uuid of this IpConsumer. # noqa: E501 :type k8s_cluster_uuid: str """ self._k8s_cluster_uuid = k8s_cluster_uuid def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, IpConsumer): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, IpConsumer): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976456.0 ionoscloud-6.1.13/ionoscloud/models/ip_failover.py0000644000175100001660000001012015046550310021666 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class IPFailover(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ip': 'str', 'nic_uuid': 'str', } attribute_map = { 'ip': 'ip', 'nic_uuid': 'nicUuid', } def __init__(self, ip=None, nic_uuid=None, local_vars_configuration=None): # noqa: E501 """IPFailover - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ip = None self._nic_uuid = None self.discriminator = None if ip is not None: self.ip = ip if nic_uuid is not None: self.nic_uuid = nic_uuid @property def ip(self): """Gets the ip of this IPFailover. # noqa: E501 :return: The ip of this IPFailover. # noqa: E501 :rtype: str """ return self._ip @ip.setter def ip(self, ip): """Sets the ip of this IPFailover. :param ip: The ip of this IPFailover. # noqa: E501 :type ip: str """ self._ip = ip @property def nic_uuid(self): """Gets the nic_uuid of this IPFailover. # noqa: E501 :return: The nic_uuid of this IPFailover. # noqa: E501 :rtype: str """ return self._nic_uuid @nic_uuid.setter def nic_uuid(self, nic_uuid): """Sets the nic_uuid of this IPFailover. :param nic_uuid: The nic_uuid of this IPFailover. # noqa: E501 :type nic_uuid: str """ self._nic_uuid = nic_uuid def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, IPFailover): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, IPFailover): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_auto_scaling.py0000644000175100001660000001311715046550311024300 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesAutoScaling(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'min_node_count': 'int', 'max_node_count': 'int', } attribute_map = { 'min_node_count': 'minNodeCount', 'max_node_count': 'maxNodeCount', } def __init__(self, min_node_count=None, max_node_count=None, local_vars_configuration=None): # noqa: E501 """KubernetesAutoScaling - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._min_node_count = None self._max_node_count = None self.discriminator = None self.min_node_count = min_node_count self.max_node_count = max_node_count @property def min_node_count(self): """Gets the min_node_count of this KubernetesAutoScaling. # noqa: E501 The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. # noqa: E501 :return: The min_node_count of this KubernetesAutoScaling. # noqa: E501 :rtype: int """ return self._min_node_count @min_node_count.setter def min_node_count(self, min_node_count): """Sets the min_node_count of this KubernetesAutoScaling. The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. # noqa: E501 :param min_node_count: The min_node_count of this KubernetesAutoScaling. # noqa: E501 :type min_node_count: int """ if self.local_vars_configuration.client_side_validation and min_node_count is None: # noqa: E501 raise ValueError("Invalid value for `min_node_count`, must not be `None`") # noqa: E501 self._min_node_count = min_node_count @property def max_node_count(self): """Gets the max_node_count of this KubernetesAutoScaling. # noqa: E501 The maximum number of worker nodes that the managed node pool can scale in. Must be >= minNodeCount and must be >= nodeCount. Required if autoScaling is specified. # noqa: E501 :return: The max_node_count of this KubernetesAutoScaling. # noqa: E501 :rtype: int """ return self._max_node_count @max_node_count.setter def max_node_count(self, max_node_count): """Sets the max_node_count of this KubernetesAutoScaling. The maximum number of worker nodes that the managed node pool can scale in. Must be >= minNodeCount and must be >= nodeCount. Required if autoScaling is specified. # noqa: E501 :param max_node_count: The max_node_count of this KubernetesAutoScaling. # noqa: E501 :type max_node_count: int """ if self.local_vars_configuration.client_side_validation and max_node_count is None: # noqa: E501 raise ValueError("Invalid value for `max_node_count`, must not be `None`") # noqa: E501 self._max_node_count = max_node_count def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesAutoScaling): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesAutoScaling): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster.py0000644000175100001660000001735715046550311023323 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesCluster(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterProperties', 'entities': 'KubernetesClusterEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """KubernetesCluster - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this KubernetesCluster. # noqa: E501 The resource unique identifier. # noqa: E501 :return: The id of this KubernetesCluster. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesCluster. The resource unique identifier. # noqa: E501 :param id: The id of this KubernetesCluster. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesCluster. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesCluster. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesCluster. The object type. # noqa: E501 :param type: The type of this KubernetesCluster. # noqa: E501 :type type: str """ allowed_values = ["k8s"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesCluster. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesCluster. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesCluster. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesCluster. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesCluster. # noqa: E501 :return: The metadata of this KubernetesCluster. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesCluster. :param metadata: The metadata of this KubernetesCluster. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesCluster. # noqa: E501 :return: The properties of this KubernetesCluster. # noqa: E501 :rtype: KubernetesClusterProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesCluster. :param properties: The properties of this KubernetesCluster. # noqa: E501 :type properties: KubernetesClusterProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this KubernetesCluster. # noqa: E501 :return: The entities of this KubernetesCluster. # noqa: E501 :rtype: KubernetesClusterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this KubernetesCluster. :param entities: The entities of this KubernetesCluster. # noqa: E501 :type entities: KubernetesClusterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesCluster): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesCluster): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_entities.py0000644000175100001660000000737015046550311025221 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'nodepools': 'KubernetesNodePools', } attribute_map = { 'nodepools': 'nodepools', } def __init__(self, nodepools=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._nodepools = None self.discriminator = None if nodepools is not None: self.nodepools = nodepools @property def nodepools(self): """Gets the nodepools of this KubernetesClusterEntities. # noqa: E501 :return: The nodepools of this KubernetesClusterEntities. # noqa: E501 :rtype: KubernetesNodePools """ return self._nodepools @nodepools.setter def nodepools(self, nodepools): """Sets the nodepools of this KubernetesClusterEntities. :param nodepools: The nodepools of this KubernetesClusterEntities. # noqa: E501 :type nodepools: KubernetesNodePools """ self._nodepools = nodepools def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_for_post.py0000644000175100001660000001771015046550311025227 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterForPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterPropertiesForPost', 'entities': 'KubernetesClusterEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterForPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this KubernetesClusterForPost. # noqa: E501 The resource unique identifier. # noqa: E501 :return: The id of this KubernetesClusterForPost. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesClusterForPost. The resource unique identifier. # noqa: E501 :param id: The id of this KubernetesClusterForPost. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesClusterForPost. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesClusterForPost. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesClusterForPost. The object type. # noqa: E501 :param type: The type of this KubernetesClusterForPost. # noqa: E501 :type type: str """ allowed_values = ["k8s"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesClusterForPost. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesClusterForPost. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesClusterForPost. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesClusterForPost. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesClusterForPost. # noqa: E501 :return: The metadata of this KubernetesClusterForPost. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesClusterForPost. :param metadata: The metadata of this KubernetesClusterForPost. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesClusterForPost. # noqa: E501 :return: The properties of this KubernetesClusterForPost. # noqa: E501 :rtype: KubernetesClusterPropertiesForPost """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesClusterForPost. :param properties: The properties of this KubernetesClusterForPost. # noqa: E501 :type properties: KubernetesClusterPropertiesForPost """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this KubernetesClusterForPost. # noqa: E501 :return: The entities of this KubernetesClusterForPost. # noqa: E501 :rtype: KubernetesClusterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this KubernetesClusterForPost. :param entities: The entities of this KubernetesClusterForPost. # noqa: E501 :type entities: KubernetesClusterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterForPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterForPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_for_put.py0000644000175100001660000001765315046550311025060 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterForPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterPropertiesForPut', 'entities': 'KubernetesClusterEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterForPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this KubernetesClusterForPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this KubernetesClusterForPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesClusterForPut. The resource's unique identifier. # noqa: E501 :param id: The id of this KubernetesClusterForPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesClusterForPut. # noqa: E501 The type of object. # noqa: E501 :return: The type of this KubernetesClusterForPut. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesClusterForPut. The type of object. # noqa: E501 :param type: The type of this KubernetesClusterForPut. # noqa: E501 :type type: str """ allowed_values = ["k8s"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesClusterForPut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesClusterForPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesClusterForPut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesClusterForPut. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesClusterForPut. # noqa: E501 :return: The metadata of this KubernetesClusterForPut. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesClusterForPut. :param metadata: The metadata of this KubernetesClusterForPut. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesClusterForPut. # noqa: E501 :return: The properties of this KubernetesClusterForPut. # noqa: E501 :rtype: KubernetesClusterPropertiesForPut """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesClusterForPut. :param properties: The properties of this KubernetesClusterForPut. # noqa: E501 :type properties: KubernetesClusterPropertiesForPut """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this KubernetesClusterForPut. # noqa: E501 :return: The entities of this KubernetesClusterForPut. # noqa: E501 :rtype: KubernetesClusterEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this KubernetesClusterForPut. :param entities: The entities of this KubernetesClusterForPut. # noqa: E501 :type entities: KubernetesClusterEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterForPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterForPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_properties.py0000644000175100001660000004043515046550311025570 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'available_upgrade_versions': 'list[str]', 'viable_node_pool_versions': 'list[str]', 'public': 'bool', 'location': 'str', 'nat_gateway_ip': 'str', 'node_subnet': 'str', 'api_subnet_allow_list': 'list[str]', 's3_buckets': 'list[S3Bucket]', } attribute_map = { 'name': 'name', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'available_upgrade_versions': 'availableUpgradeVersions', 'viable_node_pool_versions': 'viableNodePoolVersions', 'public': 'public', 'location': 'location', 'nat_gateway_ip': 'natGatewayIp', 'node_subnet': 'nodeSubnet', 'api_subnet_allow_list': 'apiSubnetAllowList', 's3_buckets': 's3Buckets', } def __init__(self, name=None, k8s_version=None, maintenance_window=None, available_upgrade_versions=None, viable_node_pool_versions=None, public=True, location=None, nat_gateway_ip=None, node_subnet=None, api_subnet_allow_list=None, s3_buckets=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._k8s_version = None self._maintenance_window = None self._available_upgrade_versions = None self._viable_node_pool_versions = None self._public = None self._location = None self._nat_gateway_ip = None self._node_subnet = None self._api_subnet_allow_list = None self._s3_buckets = None self.discriminator = None self.name = name if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if available_upgrade_versions is not None: self.available_upgrade_versions = available_upgrade_versions if viable_node_pool_versions is not None: self.viable_node_pool_versions = viable_node_pool_versions if public is not None: self.public = public if location is not None: self.location = location if nat_gateway_ip is not None: self.nat_gateway_ip = nat_gateway_ip if node_subnet is not None: self.node_subnet = node_subnet if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if s3_buckets is not None: self.s3_buckets = s3_buckets @property def name(self): """Gets the name of this KubernetesClusterProperties. # noqa: E501 A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesClusterProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesClusterProperties. A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesClusterProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def k8s_version(self): """Gets the k8s_version of this KubernetesClusterProperties. # noqa: E501 The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. # noqa: E501 :return: The k8s_version of this KubernetesClusterProperties. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesClusterProperties. The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesClusterProperties. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesClusterProperties. # noqa: E501 :return: The maintenance_window of this KubernetesClusterProperties. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesClusterProperties. :param maintenance_window: The maintenance_window of this KubernetesClusterProperties. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def available_upgrade_versions(self): """Gets the available_upgrade_versions of this KubernetesClusterProperties. # noqa: E501 List of available versions for upgrading the cluster # noqa: E501 :return: The available_upgrade_versions of this KubernetesClusterProperties. # noqa: E501 :rtype: list[str] """ return self._available_upgrade_versions @available_upgrade_versions.setter def available_upgrade_versions(self, available_upgrade_versions): """Sets the available_upgrade_versions of this KubernetesClusterProperties. List of available versions for upgrading the cluster # noqa: E501 :param available_upgrade_versions: The available_upgrade_versions of this KubernetesClusterProperties. # noqa: E501 :type available_upgrade_versions: list[str] """ self._available_upgrade_versions = available_upgrade_versions @property def viable_node_pool_versions(self): """Gets the viable_node_pool_versions of this KubernetesClusterProperties. # noqa: E501 List of versions that may be used for node pools under this cluster # noqa: E501 :return: The viable_node_pool_versions of this KubernetesClusterProperties. # noqa: E501 :rtype: list[str] """ return self._viable_node_pool_versions @viable_node_pool_versions.setter def viable_node_pool_versions(self, viable_node_pool_versions): """Sets the viable_node_pool_versions of this KubernetesClusterProperties. List of versions that may be used for node pools under this cluster # noqa: E501 :param viable_node_pool_versions: The viable_node_pool_versions of this KubernetesClusterProperties. # noqa: E501 :type viable_node_pool_versions: list[str] """ self._viable_node_pool_versions = viable_node_pool_versions @property def public(self): """Gets the public of this KubernetesClusterProperties. # noqa: E501 The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. # noqa: E501 :return: The public of this KubernetesClusterProperties. # noqa: E501 :rtype: bool """ return self._public @public.setter def public(self, public): """Sets the public of this KubernetesClusterProperties. The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. # noqa: E501 :param public: The public of this KubernetesClusterProperties. # noqa: E501 :type public: bool """ self._public = public @property def location(self): """Gets the location of this KubernetesClusterProperties. # noqa: E501 The location of the cluster if the cluster is private. This property is immutable. The location must be enabled for your contract or you must have a Datacenter within that location. This attribute is mandatory if the cluster is private. # noqa: E501 :return: The location of this KubernetesClusterProperties. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this KubernetesClusterProperties. The location of the cluster if the cluster is private. This property is immutable. The location must be enabled for your contract or you must have a Datacenter within that location. This attribute is mandatory if the cluster is private. # noqa: E501 :param location: The location of this KubernetesClusterProperties. # noqa: E501 :type location: str """ self._location = location @property def nat_gateway_ip(self): """Gets the nat_gateway_ip of this KubernetesClusterProperties. # noqa: E501 The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. # noqa: E501 :return: The nat_gateway_ip of this KubernetesClusterProperties. # noqa: E501 :rtype: str """ return self._nat_gateway_ip @nat_gateway_ip.setter def nat_gateway_ip(self, nat_gateway_ip): """Sets the nat_gateway_ip of this KubernetesClusterProperties. The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. # noqa: E501 :param nat_gateway_ip: The nat_gateway_ip of this KubernetesClusterProperties. # noqa: E501 :type nat_gateway_ip: str """ self._nat_gateway_ip = nat_gateway_ip @property def node_subnet(self): """Gets the node_subnet of this KubernetesClusterProperties. # noqa: E501 The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. # noqa: E501 :return: The node_subnet of this KubernetesClusterProperties. # noqa: E501 :rtype: str """ return self._node_subnet @node_subnet.setter def node_subnet(self, node_subnet): """Sets the node_subnet of this KubernetesClusterProperties. The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. # noqa: E501 :param node_subnet: The node_subnet of this KubernetesClusterProperties. # noqa: E501 :type node_subnet: str """ self._node_subnet = node_subnet @property def api_subnet_allow_list(self): """Gets the api_subnet_allow_list of this KubernetesClusterProperties. # noqa: E501 Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. # noqa: E501 :return: The api_subnet_allow_list of this KubernetesClusterProperties. # noqa: E501 :rtype: list[str] """ return self._api_subnet_allow_list @api_subnet_allow_list.setter def api_subnet_allow_list(self, api_subnet_allow_list): """Sets the api_subnet_allow_list of this KubernetesClusterProperties. Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. # noqa: E501 :param api_subnet_allow_list: The api_subnet_allow_list of this KubernetesClusterProperties. # noqa: E501 :type api_subnet_allow_list: list[str] """ self._api_subnet_allow_list = api_subnet_allow_list @property def s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterProperties. # noqa: E501 List of Object storage buckets configured for K8s usage. For now it contains only one bucket used to store K8s API audit logs # noqa: E501 :return: The s3_buckets of this KubernetesClusterProperties. # noqa: E501 :rtype: list[S3Bucket] """ return self._s3_buckets @s3_buckets.setter def s3_buckets(self, s3_buckets): """Sets the s3_buckets of this KubernetesClusterProperties. List of Object storage buckets configured for K8s usage. For now it contains only one bucket used to store K8s API audit logs # noqa: E501 :param s3_buckets: The s3_buckets of this KubernetesClusterProperties. # noqa: E501 :type s3_buckets: list[S3Bucket] """ self._s3_buckets = s3_buckets def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_properties_for_post.py0000644000175100001660000003376715046550311027515 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterPropertiesForPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'public': 'bool', 'location': 'str', 'nat_gateway_ip': 'str', 'node_subnet': 'str', 'api_subnet_allow_list': 'list[str]', 's3_buckets': 'list[S3Bucket]', } attribute_map = { 'name': 'name', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'public': 'public', 'location': 'location', 'nat_gateway_ip': 'natGatewayIp', 'node_subnet': 'nodeSubnet', 'api_subnet_allow_list': 'apiSubnetAllowList', 's3_buckets': 's3Buckets', } def __init__(self, name=None, k8s_version=None, maintenance_window=None, public=True, location=None, nat_gateway_ip=None, node_subnet=None, api_subnet_allow_list=None, s3_buckets=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterPropertiesForPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._k8s_version = None self._maintenance_window = None self._public = None self._location = None self._nat_gateway_ip = None self._node_subnet = None self._api_subnet_allow_list = None self._s3_buckets = None self.discriminator = None self.name = name if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if public is not None: self.public = public if location is not None: self.location = location if nat_gateway_ip is not None: self.nat_gateway_ip = nat_gateway_ip if node_subnet is not None: self.node_subnet = node_subnet if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if s3_buckets is not None: self.s3_buckets = s3_buckets @property def name(self): """Gets the name of this KubernetesClusterPropertiesForPost. # noqa: E501 A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesClusterPropertiesForPost. A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesClusterPropertiesForPost. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def k8s_version(self): """Gets the k8s_version of this KubernetesClusterPropertiesForPost. # noqa: E501 The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesClusterPropertiesForPost. The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesClusterPropertiesForPost. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesClusterPropertiesForPost. # noqa: E501 :return: The maintenance_window of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesClusterPropertiesForPost. :param maintenance_window: The maintenance_window of this KubernetesClusterPropertiesForPost. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def public(self): """Gets the public of this KubernetesClusterPropertiesForPost. # noqa: E501 The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. # noqa: E501 :return: The public of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: bool """ return self._public @public.setter def public(self, public): """Sets the public of this KubernetesClusterPropertiesForPost. The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. # noqa: E501 :param public: The public of this KubernetesClusterPropertiesForPost. # noqa: E501 :type public: bool """ self._public = public @property def location(self): """Gets the location of this KubernetesClusterPropertiesForPost. # noqa: E501 This attribute is mandatory if the cluster is private and optional if the cluster is public. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. # noqa: E501 :return: The location of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this KubernetesClusterPropertiesForPost. This attribute is mandatory if the cluster is private and optional if the cluster is public. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. # noqa: E501 :param location: The location of this KubernetesClusterPropertiesForPost. # noqa: E501 :type location: str """ self._location = location @property def nat_gateway_ip(self): """Gets the nat_gateway_ip of this KubernetesClusterPropertiesForPost. # noqa: E501 The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. # noqa: E501 :return: The nat_gateway_ip of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: str """ return self._nat_gateway_ip @nat_gateway_ip.setter def nat_gateway_ip(self, nat_gateway_ip): """Sets the nat_gateway_ip of this KubernetesClusterPropertiesForPost. The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. # noqa: E501 :param nat_gateway_ip: The nat_gateway_ip of this KubernetesClusterPropertiesForPost. # noqa: E501 :type nat_gateway_ip: str """ self._nat_gateway_ip = nat_gateway_ip @property def node_subnet(self): """Gets the node_subnet of this KubernetesClusterPropertiesForPost. # noqa: E501 The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. # noqa: E501 :return: The node_subnet of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: str """ return self._node_subnet @node_subnet.setter def node_subnet(self, node_subnet): """Sets the node_subnet of this KubernetesClusterPropertiesForPost. The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. # noqa: E501 :param node_subnet: The node_subnet of this KubernetesClusterPropertiesForPost. # noqa: E501 :type node_subnet: str """ self._node_subnet = node_subnet @property def api_subnet_allow_list(self): """Gets the api_subnet_allow_list of this KubernetesClusterPropertiesForPost. # noqa: E501 Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. # noqa: E501 :return: The api_subnet_allow_list of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: list[str] """ return self._api_subnet_allow_list @api_subnet_allow_list.setter def api_subnet_allow_list(self, api_subnet_allow_list): """Sets the api_subnet_allow_list of this KubernetesClusterPropertiesForPost. Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. # noqa: E501 :param api_subnet_allow_list: The api_subnet_allow_list of this KubernetesClusterPropertiesForPost. # noqa: E501 :type api_subnet_allow_list: list[str] """ self._api_subnet_allow_list = api_subnet_allow_list @property def s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterPropertiesForPost. # noqa: E501 List of Object storage buckets configured for K8s usage. At the moment, it contains only one bucket that is used to store K8s API audit logs. # noqa: E501 :return: The s3_buckets of this KubernetesClusterPropertiesForPost. # noqa: E501 :rtype: list[S3Bucket] """ return self._s3_buckets @s3_buckets.setter def s3_buckets(self, s3_buckets): """Sets the s3_buckets of this KubernetesClusterPropertiesForPost. List of Object storage buckets configured for K8s usage. At the moment, it contains only one bucket that is used to store K8s API audit logs. # noqa: E501 :param s3_buckets: The s3_buckets of this KubernetesClusterPropertiesForPost. # noqa: E501 :type s3_buckets: list[S3Bucket] """ self._s3_buckets = s3_buckets def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterPropertiesForPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterPropertiesForPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_cluster_properties_for_put.py0000644000175100001660000002244415046550311027326 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusterPropertiesForPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'api_subnet_allow_list': 'list[str]', 's3_buckets': 'list[S3Bucket]', } attribute_map = { 'name': 'name', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'api_subnet_allow_list': 'apiSubnetAllowList', 's3_buckets': 's3Buckets', } def __init__(self, name=None, k8s_version=None, maintenance_window=None, api_subnet_allow_list=None, s3_buckets=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusterPropertiesForPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._k8s_version = None self._maintenance_window = None self._api_subnet_allow_list = None self._s3_buckets = None self.discriminator = None self.name = name if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if s3_buckets is not None: self.s3_buckets = s3_buckets @property def name(self): """Gets the name of this KubernetesClusterPropertiesForPut. # noqa: E501 A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesClusterPropertiesForPut. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesClusterPropertiesForPut. A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesClusterPropertiesForPut. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def k8s_version(self): """Gets the k8s_version of this KubernetesClusterPropertiesForPut. # noqa: E501 The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesClusterPropertiesForPut. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesClusterPropertiesForPut. The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesClusterPropertiesForPut. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesClusterPropertiesForPut. # noqa: E501 :return: The maintenance_window of this KubernetesClusterPropertiesForPut. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesClusterPropertiesForPut. :param maintenance_window: The maintenance_window of this KubernetesClusterPropertiesForPut. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def api_subnet_allow_list(self): """Gets the api_subnet_allow_list of this KubernetesClusterPropertiesForPut. # noqa: E501 Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. # noqa: E501 :return: The api_subnet_allow_list of this KubernetesClusterPropertiesForPut. # noqa: E501 :rtype: list[str] """ return self._api_subnet_allow_list @api_subnet_allow_list.setter def api_subnet_allow_list(self, api_subnet_allow_list): """Sets the api_subnet_allow_list of this KubernetesClusterPropertiesForPut. Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. # noqa: E501 :param api_subnet_allow_list: The api_subnet_allow_list of this KubernetesClusterPropertiesForPut. # noqa: E501 :type api_subnet_allow_list: list[str] """ self._api_subnet_allow_list = api_subnet_allow_list @property def s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterPropertiesForPut. # noqa: E501 List of Object storage buckets configured for K8s usage. At the moment, it contains only one bucket that is used to store K8s API audit logs. # noqa: E501 :return: The s3_buckets of this KubernetesClusterPropertiesForPut. # noqa: E501 :rtype: list[S3Bucket] """ return self._s3_buckets @s3_buckets.setter def s3_buckets(self, s3_buckets): """Sets the s3_buckets of this KubernetesClusterPropertiesForPut. List of Object storage buckets configured for K8s usage. At the moment, it contains only one bucket that is used to store K8s API audit logs. # noqa: E501 :param s3_buckets: The s3_buckets of this KubernetesClusterPropertiesForPut. # noqa: E501 :type s3_buckets: list[S3Bucket] """ self._s3_buckets = s3_buckets def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusterPropertiesForPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusterPropertiesForPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_clusters.py0000644000175100001660000001442115046550311023473 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesClusters(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[KubernetesCluster]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """KubernetesClusters - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this KubernetesClusters. # noqa: E501 The unique representation of the K8s cluster as a resource collection. # noqa: E501 :return: The id of this KubernetesClusters. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesClusters. The unique representation of the K8s cluster as a resource collection. # noqa: E501 :param id: The id of this KubernetesClusters. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesClusters. # noqa: E501 The resource type within a collection. # noqa: E501 :return: The type of this KubernetesClusters. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesClusters. The resource type within a collection. # noqa: E501 :param type: The type of this KubernetesClusters. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesClusters. # noqa: E501 The URL to the collection representation (absolute path). # noqa: E501 :return: The href of this KubernetesClusters. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesClusters. The URL to the collection representation (absolute path). # noqa: E501 :param href: The href of this KubernetesClusters. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this KubernetesClusters. # noqa: E501 Array of K8s clusters in the collection. # noqa: E501 :return: The items of this KubernetesClusters. # noqa: E501 :rtype: list[KubernetesCluster] """ return self._items @items.setter def items(self, items): """Sets the items of this KubernetesClusters. Array of K8s clusters in the collection. # noqa: E501 :param items: The items of this KubernetesClusters. # noqa: E501 :type items: list[KubernetesCluster] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesClusters): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesClusters): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_maintenance_window.py0000644000175100001660000001317015046550311025500 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesMaintenanceWindow(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'day_of_the_week': 'str', 'time': 'str', } attribute_map = { 'day_of_the_week': 'dayOfTheWeek', 'time': 'time', } def __init__(self, day_of_the_week=None, time=None, local_vars_configuration=None): # noqa: E501 """KubernetesMaintenanceWindow - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._day_of_the_week = None self._time = None self.discriminator = None self.day_of_the_week = day_of_the_week self.time = time @property def day_of_the_week(self): """Gets the day_of_the_week of this KubernetesMaintenanceWindow. # noqa: E501 The weekday for a maintenance window. # noqa: E501 :return: The day_of_the_week of this KubernetesMaintenanceWindow. # noqa: E501 :rtype: str """ return self._day_of_the_week @day_of_the_week.setter def day_of_the_week(self, day_of_the_week): """Sets the day_of_the_week of this KubernetesMaintenanceWindow. The weekday for a maintenance window. # noqa: E501 :param day_of_the_week: The day_of_the_week of this KubernetesMaintenanceWindow. # noqa: E501 :type day_of_the_week: str """ if self.local_vars_configuration.client_side_validation and day_of_the_week is None: # noqa: E501 raise ValueError("Invalid value for `day_of_the_week`, must not be `None`") # noqa: E501 allowed_values = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] # noqa: E501 if self.local_vars_configuration.client_side_validation and day_of_the_week not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `day_of_the_week` ({0}), must be one of {1}" # noqa: E501 .format(day_of_the_week, allowed_values) ) self._day_of_the_week = day_of_the_week @property def time(self): """Gets the time of this KubernetesMaintenanceWindow. # noqa: E501 The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may vary by 15 minutes. # noqa: E501 :return: The time of this KubernetesMaintenanceWindow. # noqa: E501 :rtype: str """ return self._time @time.setter def time(self, time): """Sets the time of this KubernetesMaintenanceWindow. The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may vary by 15 minutes. # noqa: E501 :param time: The time of this KubernetesMaintenanceWindow. # noqa: E501 :type time: str """ if self.local_vars_configuration.client_side_validation and time is None: # noqa: E501 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 self._time = time def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesMaintenanceWindow): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesMaintenanceWindow): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node.py0000644000175100001660000001565015046550311022561 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNode(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'KubernetesNodeMetadata', 'properties': 'KubernetesNodeProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """KubernetesNode - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this KubernetesNode. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this KubernetesNode. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNode. The resource's unique identifier. # noqa: E501 :param id: The id of this KubernetesNode. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNode. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesNode. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNode. The object type. # noqa: E501 :param type: The type of this KubernetesNode. # noqa: E501 :type type: str """ allowed_values = ["node"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNode. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesNode. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNode. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNode. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesNode. # noqa: E501 :return: The metadata of this KubernetesNode. # noqa: E501 :rtype: KubernetesNodeMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesNode. :param metadata: The metadata of this KubernetesNode. # noqa: E501 :type metadata: KubernetesNodeMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesNode. # noqa: E501 :return: The properties of this KubernetesNode. # noqa: E501 :rtype: KubernetesNodeProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesNode. :param properties: The properties of this KubernetesNode. # noqa: E501 :type properties: KubernetesNodeProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNode): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNode): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_metadata.py0000644000175100001660000002043415046550311024415 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodeMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'etag': 'str', 'created_date': 'datetime', 'last_modified_date': 'datetime', 'state': 'str', 'last_software_updated_date': 'datetime', } attribute_map = { 'etag': 'etag', 'created_date': 'createdDate', 'last_modified_date': 'lastModifiedDate', 'state': 'state', 'last_software_updated_date': 'lastSoftwareUpdatedDate', } def __init__(self, etag=None, created_date=None, last_modified_date=None, state=None, last_software_updated_date=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodeMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._etag = None self._created_date = None self._last_modified_date = None self._state = None self._last_software_updated_date = None self.discriminator = None if etag is not None: self.etag = etag if created_date is not None: self.created_date = created_date if last_modified_date is not None: self.last_modified_date = last_modified_date if state is not None: self.state = state if last_software_updated_date is not None: self.last_software_updated_date = last_software_updated_date @property def etag(self): """Gets the etag of this KubernetesNodeMetadata. # noqa: E501 The resource entity tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity tags are also added as 'ETag' response headers to requests that do not use the 'depth' parameter. # noqa: E501 :return: The etag of this KubernetesNodeMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this KubernetesNodeMetadata. The resource entity tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity tags are also added as 'ETag' response headers to requests that do not use the 'depth' parameter. # noqa: E501 :param etag: The etag of this KubernetesNodeMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def created_date(self): """Gets the created_date of this KubernetesNodeMetadata. # noqa: E501 The date the resource was created. # noqa: E501 :return: The created_date of this KubernetesNodeMetadata. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this KubernetesNodeMetadata. The date the resource was created. # noqa: E501 :param created_date: The created_date of this KubernetesNodeMetadata. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def last_modified_date(self): """Gets the last_modified_date of this KubernetesNodeMetadata. # noqa: E501 The date the resource was last modified. # noqa: E501 :return: The last_modified_date of this KubernetesNodeMetadata. # noqa: E501 :rtype: datetime """ return self._last_modified_date @last_modified_date.setter def last_modified_date(self, last_modified_date): """Sets the last_modified_date of this KubernetesNodeMetadata. The date the resource was last modified. # noqa: E501 :param last_modified_date: The last_modified_date of this KubernetesNodeMetadata. # noqa: E501 :type last_modified_date: datetime """ self._last_modified_date = last_modified_date @property def state(self): """Gets the state of this KubernetesNodeMetadata. # noqa: E501 The resource state. # noqa: E501 :return: The state of this KubernetesNodeMetadata. # noqa: E501 :rtype: str """ return self._state @state.setter def state(self, state): """Sets the state of this KubernetesNodeMetadata. The resource state. # noqa: E501 :param state: The state of this KubernetesNodeMetadata. # noqa: E501 :type state: str """ allowed_values = ["PROVISIONING", "PROVISIONED", "READY", "TERMINATING", "REBUILDING", "BUSY"] # noqa: E501 if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 .format(state, allowed_values) ) self._state = state @property def last_software_updated_date(self): """Gets the last_software_updated_date of this KubernetesNodeMetadata. # noqa: E501 The date when the software on the node was last updated. # noqa: E501 :return: The last_software_updated_date of this KubernetesNodeMetadata. # noqa: E501 :rtype: datetime """ return self._last_software_updated_date @last_software_updated_date.setter def last_software_updated_date(self, last_software_updated_date): """Sets the last_software_updated_date of this KubernetesNodeMetadata. The date when the software on the node was last updated. # noqa: E501 :param last_software_updated_date: The last_software_updated_date of this KubernetesNodeMetadata. # noqa: E501 :type last_software_updated_date: datetime """ self._last_software_updated_date = last_software_updated_date def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodeMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodeMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool.py0000644000175100001660000001604115046550311023605 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePool(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePool - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this KubernetesNodePool. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this KubernetesNodePool. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodePool. The resource's unique identifier. # noqa: E501 :param id: The id of this KubernetesNodePool. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNodePool. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesNodePool. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNodePool. The object type. # noqa: E501 :param type: The type of this KubernetesNodePool. # noqa: E501 :type type: str """ allowed_values = ["nodepool"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNodePool. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesNodePool. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNodePool. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNodePool. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesNodePool. # noqa: E501 :return: The metadata of this KubernetesNodePool. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesNodePool. :param metadata: The metadata of this KubernetesNodePool. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesNodePool. # noqa: E501 :return: The properties of this KubernetesNodePool. # noqa: E501 :rtype: KubernetesNodePoolProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesNodePool. :param properties: The properties of this KubernetesNodePool. # noqa: E501 :type properties: KubernetesNodePoolProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePool): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePool): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_for_post.py0000644000175100001660000001633615046550311025527 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolForPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolPropertiesForPost', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolForPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this KubernetesNodePoolForPost. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this KubernetesNodePoolForPost. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodePoolForPost. The resource's unique identifier. # noqa: E501 :param id: The id of this KubernetesNodePoolForPost. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNodePoolForPost. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesNodePoolForPost. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNodePoolForPost. The object type. # noqa: E501 :param type: The type of this KubernetesNodePoolForPost. # noqa: E501 :type type: str """ allowed_values = ["nodepool"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNodePoolForPost. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesNodePoolForPost. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNodePoolForPost. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNodePoolForPost. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesNodePoolForPost. # noqa: E501 :return: The metadata of this KubernetesNodePoolForPost. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesNodePoolForPost. :param metadata: The metadata of this KubernetesNodePoolForPost. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesNodePoolForPost. # noqa: E501 :return: The properties of this KubernetesNodePoolForPost. # noqa: E501 :rtype: KubernetesNodePoolPropertiesForPost """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesNodePoolForPost. :param properties: The properties of this KubernetesNodePoolForPost. # noqa: E501 :type properties: KubernetesNodePoolPropertiesForPost """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolForPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolForPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_for_put.py0000644000175100001660000001630315046550311025344 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolForPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolPropertiesForPut', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolForPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this KubernetesNodePoolForPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this KubernetesNodePoolForPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodePoolForPut. The resource's unique identifier. # noqa: E501 :param id: The id of this KubernetesNodePoolForPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNodePoolForPut. # noqa: E501 The object type. # noqa: E501 :return: The type of this KubernetesNodePoolForPut. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNodePoolForPut. The object type. # noqa: E501 :param type: The type of this KubernetesNodePoolForPut. # noqa: E501 :type type: str """ allowed_values = ["nodepool"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNodePoolForPut. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this KubernetesNodePoolForPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNodePoolForPut. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNodePoolForPut. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this KubernetesNodePoolForPut. # noqa: E501 :return: The metadata of this KubernetesNodePoolForPut. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this KubernetesNodePoolForPut. :param metadata: The metadata of this KubernetesNodePoolForPut. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this KubernetesNodePoolForPut. # noqa: E501 :return: The properties of this KubernetesNodePoolForPut. # noqa: E501 :rtype: KubernetesNodePoolPropertiesForPut """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this KubernetesNodePoolForPut. :param properties: The properties of this KubernetesNodePoolForPut. # noqa: E501 :type properties: KubernetesNodePoolPropertiesForPut """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolForPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolForPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_lan.py0000644000175100001660000001300015046550311024427 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolLan(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'int', 'dhcp': 'bool', 'routes': 'list[KubernetesNodePoolLanRoutes]', } attribute_map = { 'id': 'id', 'dhcp': 'dhcp', 'routes': 'routes', } def __init__(self, id=None, dhcp=None, routes=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolLan - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._dhcp = None self._routes = None self.discriminator = None self.id = id if dhcp is not None: self.dhcp = dhcp if routes is not None: self.routes = routes @property def id(self): """Gets the id of this KubernetesNodePoolLan. # noqa: E501 The LAN ID of an existing LAN at the related data center # noqa: E501 :return: The id of this KubernetesNodePoolLan. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodePoolLan. The LAN ID of an existing LAN at the related data center # noqa: E501 :param id: The id of this KubernetesNodePoolLan. # noqa: E501 :type id: int """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @property def dhcp(self): """Gets the dhcp of this KubernetesNodePoolLan. # noqa: E501 Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. # noqa: E501 :return: The dhcp of this KubernetesNodePoolLan. # noqa: E501 :rtype: bool """ return self._dhcp @dhcp.setter def dhcp(self, dhcp): """Sets the dhcp of this KubernetesNodePoolLan. Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. # noqa: E501 :param dhcp: The dhcp of this KubernetesNodePoolLan. # noqa: E501 :type dhcp: bool """ self._dhcp = dhcp @property def routes(self): """Gets the routes of this KubernetesNodePoolLan. # noqa: E501 The array of additional LANs attached to worker nodes. # noqa: E501 :return: The routes of this KubernetesNodePoolLan. # noqa: E501 :rtype: list[KubernetesNodePoolLanRoutes] """ return self._routes @routes.setter def routes(self, routes): """Sets the routes of this KubernetesNodePoolLan. The array of additional LANs attached to worker nodes. # noqa: E501 :param routes: The routes of this KubernetesNodePoolLan. # noqa: E501 :type routes: list[KubernetesNodePoolLanRoutes] """ self._routes = routes def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolLan): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolLan): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_lan_routes.py0000644000175100001660000001127115046550311026040 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolLanRoutes(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'network': 'str', 'gateway_ip': 'str', } attribute_map = { 'network': 'network', 'gateway_ip': 'gatewayIp', } def __init__(self, network=None, gateway_ip=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolLanRoutes - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._network = None self._gateway_ip = None self.discriminator = None if network is not None: self.network = network if gateway_ip is not None: self.gateway_ip = gateway_ip @property def network(self): """Gets the network of this KubernetesNodePoolLanRoutes. # noqa: E501 IPv4 or IPv6 CIDR to be routed via the interface. # noqa: E501 :return: The network of this KubernetesNodePoolLanRoutes. # noqa: E501 :rtype: str """ return self._network @network.setter def network(self, network): """Sets the network of this KubernetesNodePoolLanRoutes. IPv4 or IPv6 CIDR to be routed via the interface. # noqa: E501 :param network: The network of this KubernetesNodePoolLanRoutes. # noqa: E501 :type network: str """ self._network = network @property def gateway_ip(self): """Gets the gateway_ip of this KubernetesNodePoolLanRoutes. # noqa: E501 IPv4 or IPv6 Gateway IP for the route. # noqa: E501 :return: The gateway_ip of this KubernetesNodePoolLanRoutes. # noqa: E501 :rtype: str """ return self._gateway_ip @gateway_ip.setter def gateway_ip(self, gateway_ip): """Sets the gateway_ip of this KubernetesNodePoolLanRoutes. IPv4 or IPv6 Gateway IP for the route. # noqa: E501 :param gateway_ip: The gateway_ip of this KubernetesNodePoolLanRoutes. # noqa: E501 :type gateway_ip: str """ self._gateway_ip = gateway_ip def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolLanRoutes): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolLanRoutes): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_properties.py0000644000175100001660000005667315046550311026100 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'datacenter_id': 'str', 'node_count': 'int', 'cpu_family': 'str', 'server_type': 'KubernetesNodePoolServerType', 'cores_count': 'int', 'ram_size': 'int', 'availability_zone': 'str', 'storage_type': 'str', 'storage_size': 'int', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'auto_scaling': 'KubernetesAutoScaling', 'lans': 'list[KubernetesNodePoolLan]', 'labels': 'dict(str, str)', 'annotations': 'dict(str, str)', 'public_ips': 'list[str]', 'available_upgrade_versions': 'list[str]', } attribute_map = { 'name': 'name', 'datacenter_id': 'datacenterId', 'node_count': 'nodeCount', 'cpu_family': 'cpuFamily', 'server_type': 'serverType', 'cores_count': 'coresCount', 'ram_size': 'ramSize', 'availability_zone': 'availabilityZone', 'storage_type': 'storageType', 'storage_size': 'storageSize', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'auto_scaling': 'autoScaling', 'lans': 'lans', 'labels': 'labels', 'annotations': 'annotations', 'public_ips': 'publicIps', 'available_upgrade_versions': 'availableUpgradeVersions', } def __init__(self, name=None, datacenter_id=None, node_count=None, cpu_family=None, server_type=None, cores_count=None, ram_size=None, availability_zone=None, storage_type=None, storage_size=None, k8s_version=None, maintenance_window=None, auto_scaling=None, lans=None, labels=None, annotations=None, public_ips=None, available_upgrade_versions=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._datacenter_id = None self._node_count = None self._cpu_family = None self._server_type = None self._cores_count = None self._ram_size = None self._availability_zone = None self._storage_type = None self._storage_size = None self._k8s_version = None self._maintenance_window = None self._auto_scaling = None self._lans = None self._labels = None self._annotations = None self._public_ips = None self._available_upgrade_versions = None self.discriminator = None self.name = name self.datacenter_id = datacenter_id self.node_count = node_count if cpu_family is not None: self.cpu_family = cpu_family if server_type is not None: self.server_type = server_type self.cores_count = cores_count self.ram_size = ram_size self.availability_zone = availability_zone self.storage_type = storage_type self.storage_size = storage_size if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if auto_scaling is not None: self.auto_scaling = auto_scaling if lans is not None: self.lans = lans if labels is not None: self.labels = labels if annotations is not None: self.annotations = annotations if public_ips is not None: self.public_ips = public_ips if available_upgrade_versions is not None: self.available_upgrade_versions = available_upgrade_versions @property def name(self): """Gets the name of this KubernetesNodePoolProperties. # noqa: E501 A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesNodePoolProperties. A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesNodePoolProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def datacenter_id(self): """Gets the datacenter_id of this KubernetesNodePoolProperties. # noqa: E501 The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501 :return: The datacenter_id of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._datacenter_id @datacenter_id.setter def datacenter_id(self, datacenter_id): """Sets the datacenter_id of this KubernetesNodePoolProperties. The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501 :param datacenter_id: The datacenter_id of this KubernetesNodePoolProperties. # noqa: E501 :type datacenter_id: str """ if self.local_vars_configuration.client_side_validation and datacenter_id is None: # noqa: E501 raise ValueError("Invalid value for `datacenter_id`, must not be `None`") # noqa: E501 self._datacenter_id = datacenter_id @property def node_count(self): """Gets the node_count of this KubernetesNodePoolProperties. # noqa: E501 The number of worker nodes of the node pool. # noqa: E501 :return: The node_count of this KubernetesNodePoolProperties. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this KubernetesNodePoolProperties. The number of worker nodes of the node pool. # noqa: E501 :param node_count: The node_count of this KubernetesNodePoolProperties. # noqa: E501 :type node_count: int """ if self.local_vars_configuration.client_side_validation and node_count is None: # noqa: E501 raise ValueError("Invalid value for `node_count`, must not be `None`") # noqa: E501 self._node_count = node_count @property def cpu_family(self): """Gets the cpu_family of this KubernetesNodePoolProperties. # noqa: E501 The CPU type for the nodes. # noqa: E501 :return: The cpu_family of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._cpu_family @cpu_family.setter def cpu_family(self, cpu_family): """Sets the cpu_family of this KubernetesNodePoolProperties. The CPU type for the nodes. # noqa: E501 :param cpu_family: The cpu_family of this KubernetesNodePoolProperties. # noqa: E501 :type cpu_family: str """ self._cpu_family = cpu_family @property def server_type(self): """Gets the server_type of this KubernetesNodePoolProperties. # noqa: E501 :return: The server_type of this KubernetesNodePoolProperties. # noqa: E501 :rtype: KubernetesNodePoolServerType """ return self._server_type @server_type.setter def server_type(self, server_type): """Sets the server_type of this KubernetesNodePoolProperties. :param server_type: The server_type of this KubernetesNodePoolProperties. # noqa: E501 :type server_type: KubernetesNodePoolServerType """ self._server_type = server_type @property def cores_count(self): """Gets the cores_count of this KubernetesNodePoolProperties. # noqa: E501 The total number of cores for the nodes. # noqa: E501 :return: The cores_count of this KubernetesNodePoolProperties. # noqa: E501 :rtype: int """ return self._cores_count @cores_count.setter def cores_count(self, cores_count): """Sets the cores_count of this KubernetesNodePoolProperties. The total number of cores for the nodes. # noqa: E501 :param cores_count: The cores_count of this KubernetesNodePoolProperties. # noqa: E501 :type cores_count: int """ if self.local_vars_configuration.client_side_validation and cores_count is None: # noqa: E501 raise ValueError("Invalid value for `cores_count`, must not be `None`") # noqa: E501 self._cores_count = cores_count @property def ram_size(self): """Gets the ram_size of this KubernetesNodePoolProperties. # noqa: E501 The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501 :return: The ram_size of this KubernetesNodePoolProperties. # noqa: E501 :rtype: int """ return self._ram_size @ram_size.setter def ram_size(self, ram_size): """Sets the ram_size of this KubernetesNodePoolProperties. The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501 :param ram_size: The ram_size of this KubernetesNodePoolProperties. # noqa: E501 :type ram_size: int """ if self.local_vars_configuration.client_side_validation and ram_size is None: # noqa: E501 raise ValueError("Invalid value for `ram_size`, must not be `None`") # noqa: E501 self._ram_size = ram_size @property def availability_zone(self): """Gets the availability_zone of this KubernetesNodePoolProperties. # noqa: E501 The availability zone in which the target VM should be provisioned. # noqa: E501 :return: The availability_zone of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._availability_zone @availability_zone.setter def availability_zone(self, availability_zone): """Sets the availability_zone of this KubernetesNodePoolProperties. The availability zone in which the target VM should be provisioned. # noqa: E501 :param availability_zone: The availability_zone of this KubernetesNodePoolProperties. # noqa: E501 :type availability_zone: str """ if self.local_vars_configuration.client_side_validation and availability_zone is None: # noqa: E501 raise ValueError("Invalid value for `availability_zone`, must not be `None`") # noqa: E501 allowed_values = ["AUTO", "ZONE_1", "ZONE_2"] # noqa: E501 if self.local_vars_configuration.client_side_validation and availability_zone not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `availability_zone` ({0}), must be one of {1}" # noqa: E501 .format(availability_zone, allowed_values) ) self._availability_zone = availability_zone @property def storage_type(self): """Gets the storage_type of this KubernetesNodePoolProperties. # noqa: E501 The storage type for the nodes. # noqa: E501 :return: The storage_type of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._storage_type @storage_type.setter def storage_type(self, storage_type): """Sets the storage_type of this KubernetesNodePoolProperties. The storage type for the nodes. # noqa: E501 :param storage_type: The storage_type of this KubernetesNodePoolProperties. # noqa: E501 :type storage_type: str """ if self.local_vars_configuration.client_side_validation and storage_type is None: # noqa: E501 raise ValueError("Invalid value for `storage_type`, must not be `None`") # noqa: E501 allowed_values = ["HDD", "SSD"] # noqa: E501 if self.local_vars_configuration.client_side_validation and storage_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `storage_type` ({0}), must be one of {1}" # noqa: E501 .format(storage_type, allowed_values) ) self._storage_type = storage_type @property def storage_size(self): """Gets the storage_size of this KubernetesNodePoolProperties. # noqa: E501 The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501 :return: The storage_size of this KubernetesNodePoolProperties. # noqa: E501 :rtype: int """ return self._storage_size @storage_size.setter def storage_size(self, storage_size): """Sets the storage_size of this KubernetesNodePoolProperties. The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501 :param storage_size: The storage_size of this KubernetesNodePoolProperties. # noqa: E501 :type storage_size: int """ if self.local_vars_configuration.client_side_validation and storage_size is None: # noqa: E501 raise ValueError("Invalid value for `storage_size`, must not be `None`") # noqa: E501 self._storage_size = storage_size @property def k8s_version(self): """Gets the k8s_version of this KubernetesNodePoolProperties. # noqa: E501 The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesNodePoolProperties. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesNodePoolProperties. The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesNodePoolProperties. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesNodePoolProperties. # noqa: E501 :return: The maintenance_window of this KubernetesNodePoolProperties. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesNodePoolProperties. :param maintenance_window: The maintenance_window of this KubernetesNodePoolProperties. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def auto_scaling(self): """Gets the auto_scaling of this KubernetesNodePoolProperties. # noqa: E501 :return: The auto_scaling of this KubernetesNodePoolProperties. # noqa: E501 :rtype: KubernetesAutoScaling """ return self._auto_scaling @auto_scaling.setter def auto_scaling(self, auto_scaling): """Sets the auto_scaling of this KubernetesNodePoolProperties. :param auto_scaling: The auto_scaling of this KubernetesNodePoolProperties. # noqa: E501 :type auto_scaling: KubernetesAutoScaling """ self._auto_scaling = auto_scaling @property def lans(self): """Gets the lans of this KubernetesNodePoolProperties. # noqa: E501 The array of existing private LANs to attach to worker nodes. # noqa: E501 :return: The lans of this KubernetesNodePoolProperties. # noqa: E501 :rtype: list[KubernetesNodePoolLan] """ return self._lans @lans.setter def lans(self, lans): """Sets the lans of this KubernetesNodePoolProperties. The array of existing private LANs to attach to worker nodes. # noqa: E501 :param lans: The lans of this KubernetesNodePoolProperties. # noqa: E501 :type lans: list[KubernetesNodePoolLan] """ self._lans = lans @property def labels(self): """Gets the labels of this KubernetesNodePoolProperties. # noqa: E501 The labels attached to the node pool. # noqa: E501 :return: The labels of this KubernetesNodePoolProperties. # noqa: E501 :rtype: dict(str, str) """ return self._labels @labels.setter def labels(self, labels): """Sets the labels of this KubernetesNodePoolProperties. The labels attached to the node pool. # noqa: E501 :param labels: The labels of this KubernetesNodePoolProperties. # noqa: E501 :type labels: dict(str, str) """ self._labels = labels @property def annotations(self): """Gets the annotations of this KubernetesNodePoolProperties. # noqa: E501 The annotations attached to the node pool. # noqa: E501 :return: The annotations of this KubernetesNodePoolProperties. # noqa: E501 :rtype: dict(str, str) """ return self._annotations @annotations.setter def annotations(self, annotations): """Sets the annotations of this KubernetesNodePoolProperties. The annotations attached to the node pool. # noqa: E501 :param annotations: The annotations of this KubernetesNodePoolProperties. # noqa: E501 :type annotations: dict(str, str) """ self._annotations = annotations @property def public_ips(self): """Gets the public_ips of this KubernetesNodePoolProperties. # noqa: E501 Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :return: The public_ips of this KubernetesNodePoolProperties. # noqa: E501 :rtype: list[str] """ return self._public_ips @public_ips.setter def public_ips(self, public_ips): """Sets the public_ips of this KubernetesNodePoolProperties. Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :param public_ips: The public_ips of this KubernetesNodePoolProperties. # noqa: E501 :type public_ips: list[str] """ self._public_ips = public_ips @property def available_upgrade_versions(self): """Gets the available_upgrade_versions of this KubernetesNodePoolProperties. # noqa: E501 The list of available versions for upgrading the node pool. # noqa: E501 :return: The available_upgrade_versions of this KubernetesNodePoolProperties. # noqa: E501 :rtype: list[str] """ return self._available_upgrade_versions @available_upgrade_versions.setter def available_upgrade_versions(self, available_upgrade_versions): """Sets the available_upgrade_versions of this KubernetesNodePoolProperties. The list of available versions for upgrading the node pool. # noqa: E501 :param available_upgrade_versions: The available_upgrade_versions of this KubernetesNodePoolProperties. # noqa: E501 :type available_upgrade_versions: list[str] """ self._available_upgrade_versions = available_upgrade_versions def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_properties_for_post.py0000644000175100001660000005525115046550311030002 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolPropertiesForPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'datacenter_id': 'str', 'node_count': 'int', 'cpu_family': 'str', 'server_type': 'KubernetesNodePoolServerType', 'cores_count': 'int', 'ram_size': 'int', 'availability_zone': 'str', 'storage_type': 'str', 'storage_size': 'int', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'auto_scaling': 'KubernetesAutoScaling', 'lans': 'list[KubernetesNodePoolLan]', 'labels': 'dict(str, str)', 'annotations': 'dict(str, str)', 'public_ips': 'list[str]', } attribute_map = { 'name': 'name', 'datacenter_id': 'datacenterId', 'node_count': 'nodeCount', 'cpu_family': 'cpuFamily', 'server_type': 'serverType', 'cores_count': 'coresCount', 'ram_size': 'ramSize', 'availability_zone': 'availabilityZone', 'storage_type': 'storageType', 'storage_size': 'storageSize', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'auto_scaling': 'autoScaling', 'lans': 'lans', 'labels': 'labels', 'annotations': 'annotations', 'public_ips': 'publicIps', } def __init__(self, name=None, datacenter_id=None, node_count=None, cpu_family=None, server_type=None, cores_count=None, ram_size=None, availability_zone=None, storage_type=None, storage_size=None, k8s_version=None, maintenance_window=None, auto_scaling=None, lans=None, labels=None, annotations=None, public_ips=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolPropertiesForPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._datacenter_id = None self._node_count = None self._cpu_family = None self._server_type = None self._cores_count = None self._ram_size = None self._availability_zone = None self._storage_type = None self._storage_size = None self._k8s_version = None self._maintenance_window = None self._auto_scaling = None self._lans = None self._labels = None self._annotations = None self._public_ips = None self.discriminator = None self.name = name self.datacenter_id = datacenter_id self.node_count = node_count if cpu_family is not None: self.cpu_family = cpu_family if server_type is not None: self.server_type = server_type self.cores_count = cores_count self.ram_size = ram_size self.availability_zone = availability_zone self.storage_type = storage_type self.storage_size = storage_size if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if auto_scaling is not None: self.auto_scaling = auto_scaling if lans is not None: self.lans = lans if labels is not None: self.labels = labels if annotations is not None: self.annotations = annotations if public_ips is not None: self.public_ips = public_ips @property def name(self): """Gets the name of this KubernetesNodePoolPropertiesForPost. # noqa: E501 A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesNodePoolPropertiesForPost. A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def datacenter_id(self): """Gets the datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501 :return: The datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._datacenter_id @datacenter_id.setter def datacenter_id(self, datacenter_id): """Sets the datacenter_id of this KubernetesNodePoolPropertiesForPost. The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501 :param datacenter_id: The datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type datacenter_id: str """ if self.local_vars_configuration.client_side_validation and datacenter_id is None: # noqa: E501 raise ValueError("Invalid value for `datacenter_id`, must not be `None`") # noqa: E501 self._datacenter_id = datacenter_id @property def node_count(self): """Gets the node_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The number of worker nodes of the node pool. # noqa: E501 :return: The node_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this KubernetesNodePoolPropertiesForPost. The number of worker nodes of the node pool. # noqa: E501 :param node_count: The node_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type node_count: int """ if self.local_vars_configuration.client_side_validation and node_count is None: # noqa: E501 raise ValueError("Invalid value for `node_count`, must not be `None`") # noqa: E501 self._node_count = node_count @property def cpu_family(self): """Gets the cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The CPU type for the nodes. # noqa: E501 :return: The cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._cpu_family @cpu_family.setter def cpu_family(self, cpu_family): """Sets the cpu_family of this KubernetesNodePoolPropertiesForPost. The CPU type for the nodes. # noqa: E501 :param cpu_family: The cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type cpu_family: str """ self._cpu_family = cpu_family @property def server_type(self): """Gets the server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :return: The server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: KubernetesNodePoolServerType """ return self._server_type @server_type.setter def server_type(self, server_type): """Sets the server_type of this KubernetesNodePoolPropertiesForPost. :param server_type: The server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type server_type: KubernetesNodePoolServerType """ self._server_type = server_type @property def cores_count(self): """Gets the cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The total number of cores for the nodes. # noqa: E501 :return: The cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: int """ return self._cores_count @cores_count.setter def cores_count(self, cores_count): """Sets the cores_count of this KubernetesNodePoolPropertiesForPost. The total number of cores for the nodes. # noqa: E501 :param cores_count: The cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type cores_count: int """ if self.local_vars_configuration.client_side_validation and cores_count is None: # noqa: E501 raise ValueError("Invalid value for `cores_count`, must not be `None`") # noqa: E501 self._cores_count = cores_count @property def ram_size(self): """Gets the ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501 :return: The ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: int """ return self._ram_size @ram_size.setter def ram_size(self, ram_size): """Sets the ram_size of this KubernetesNodePoolPropertiesForPost. The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501 :param ram_size: The ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type ram_size: int """ if self.local_vars_configuration.client_side_validation and ram_size is None: # noqa: E501 raise ValueError("Invalid value for `ram_size`, must not be `None`") # noqa: E501 self._ram_size = ram_size @property def availability_zone(self): """Gets the availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The availability zone in which the target VM should be provisioned. # noqa: E501 :return: The availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._availability_zone @availability_zone.setter def availability_zone(self, availability_zone): """Sets the availability_zone of this KubernetesNodePoolPropertiesForPost. The availability zone in which the target VM should be provisioned. # noqa: E501 :param availability_zone: The availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type availability_zone: str """ if self.local_vars_configuration.client_side_validation and availability_zone is None: # noqa: E501 raise ValueError("Invalid value for `availability_zone`, must not be `None`") # noqa: E501 allowed_values = ["AUTO", "ZONE_1", "ZONE_2"] # noqa: E501 if self.local_vars_configuration.client_side_validation and availability_zone not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `availability_zone` ({0}), must be one of {1}" # noqa: E501 .format(availability_zone, allowed_values) ) self._availability_zone = availability_zone @property def storage_type(self): """Gets the storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The storage type for the nodes. # noqa: E501 :return: The storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._storage_type @storage_type.setter def storage_type(self, storage_type): """Sets the storage_type of this KubernetesNodePoolPropertiesForPost. The storage type for the nodes. # noqa: E501 :param storage_type: The storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type storage_type: str """ if self.local_vars_configuration.client_side_validation and storage_type is None: # noqa: E501 raise ValueError("Invalid value for `storage_type`, must not be `None`") # noqa: E501 allowed_values = ["HDD", "SSD"] # noqa: E501 if self.local_vars_configuration.client_side_validation and storage_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `storage_type` ({0}), must be one of {1}" # noqa: E501 .format(storage_type, allowed_values) ) self._storage_type = storage_type @property def storage_size(self): """Gets the storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501 :return: The storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: int """ return self._storage_size @storage_size.setter def storage_size(self, storage_size): """Sets the storage_size of this KubernetesNodePoolPropertiesForPost. The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501 :param storage_size: The storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type storage_size: int """ if self.local_vars_configuration.client_side_validation and storage_size is None: # noqa: E501 raise ValueError("Invalid value for `storage_size`, must not be `None`") # noqa: E501 self._storage_size = storage_size @property def k8s_version(self): """Gets the k8s_version of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesNodePoolPropertiesForPost. The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :return: The maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesNodePoolPropertiesForPost. :param maintenance_window: The maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def auto_scaling(self): """Gets the auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :return: The auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: KubernetesAutoScaling """ return self._auto_scaling @auto_scaling.setter def auto_scaling(self, auto_scaling): """Sets the auto_scaling of this KubernetesNodePoolPropertiesForPost. :param auto_scaling: The auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type auto_scaling: KubernetesAutoScaling """ self._auto_scaling = auto_scaling @property def lans(self): """Gets the lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The array of existing private LANs to attach to worker nodes. # noqa: E501 :return: The lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: list[KubernetesNodePoolLan] """ return self._lans @lans.setter def lans(self, lans): """Sets the lans of this KubernetesNodePoolPropertiesForPost. The array of existing private LANs to attach to worker nodes. # noqa: E501 :param lans: The lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type lans: list[KubernetesNodePoolLan] """ self._lans = lans @property def labels(self): """Gets the labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The labels attached to the node pool. # noqa: E501 :return: The labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: dict(str, str) """ return self._labels @labels.setter def labels(self, labels): """Sets the labels of this KubernetesNodePoolPropertiesForPost. The labels attached to the node pool. # noqa: E501 :param labels: The labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type labels: dict(str, str) """ self._labels = labels @property def annotations(self): """Gets the annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501 The annotations attached to the node pool. # noqa: E501 :return: The annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: dict(str, str) """ return self._annotations @annotations.setter def annotations(self, annotations): """Sets the annotations of this KubernetesNodePoolPropertiesForPost. The annotations attached to the node pool. # noqa: E501 :param annotations: The annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type annotations: dict(str, str) """ self._annotations = annotations @property def public_ips(self): """Gets the public_ips of this KubernetesNodePoolPropertiesForPost. # noqa: E501 Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :return: The public_ips of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :rtype: list[str] """ return self._public_ips @public_ips.setter def public_ips(self, public_ips): """Sets the public_ips of this KubernetesNodePoolPropertiesForPost. Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :param public_ips: The public_ips of this KubernetesNodePoolPropertiesForPost. # noqa: E501 :type public_ips: list[str] """ self._public_ips = public_ips def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolPropertiesForPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolPropertiesForPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_properties_for_put.py0000644000175100001660000003305715046550311027625 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolPropertiesForPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'node_count': 'int', 'server_type': 'KubernetesNodePoolServerType', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'auto_scaling': 'KubernetesAutoScaling', 'lans': 'list[KubernetesNodePoolLan]', 'labels': 'dict(str, str)', 'annotations': 'dict(str, str)', 'public_ips': 'list[str]', } attribute_map = { 'name': 'name', 'node_count': 'nodeCount', 'server_type': 'serverType', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'auto_scaling': 'autoScaling', 'lans': 'lans', 'labels': 'labels', 'annotations': 'annotations', 'public_ips': 'publicIps', } def __init__(self, name=None, node_count=None, server_type=None, k8s_version=None, maintenance_window=None, auto_scaling=None, lans=None, labels=None, annotations=None, public_ips=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolPropertiesForPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._node_count = None self._server_type = None self._k8s_version = None self._maintenance_window = None self._auto_scaling = None self._lans = None self._labels = None self._annotations = None self._public_ips = None self.discriminator = None if name is not None: self.name = name self.node_count = node_count if server_type is not None: self.server_type = server_type if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window if auto_scaling is not None: self.auto_scaling = auto_scaling if lans is not None: self.lans = lans if labels is not None: self.labels = labels if annotations is not None: self.annotations = annotations if public_ips is not None: self.public_ips = public_ips @property def name(self): """Gets the name of this KubernetesNodePoolPropertiesForPut. # noqa: E501 A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :return: The name of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesNodePoolPropertiesForPut. A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. # noqa: E501 :param name: The name of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type name: str """ self._name = name @property def node_count(self): """Gets the node_count of this KubernetesNodePoolPropertiesForPut. # noqa: E501 The number of worker nodes of the node pool. # noqa: E501 :return: The node_count of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this KubernetesNodePoolPropertiesForPut. The number of worker nodes of the node pool. # noqa: E501 :param node_count: The node_count of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type node_count: int """ if self.local_vars_configuration.client_side_validation and node_count is None: # noqa: E501 raise ValueError("Invalid value for `node_count`, must not be `None`") # noqa: E501 self._node_count = node_count @property def server_type(self): """Gets the server_type of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :return: The server_type of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: KubernetesNodePoolServerType """ return self._server_type @server_type.setter def server_type(self, server_type): """Sets the server_type of this KubernetesNodePoolPropertiesForPut. :param server_type: The server_type of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type server_type: KubernetesNodePoolServerType """ self._server_type = server_type @property def k8s_version(self): """Gets the k8s_version of this KubernetesNodePoolPropertiesForPut. # noqa: E501 The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesNodePoolPropertiesForPut. The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type k8s_version: str """ self._k8s_version = k8s_version @property def maintenance_window(self): """Gets the maintenance_window of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :return: The maintenance_window of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: KubernetesMaintenanceWindow """ return self._maintenance_window @maintenance_window.setter def maintenance_window(self, maintenance_window): """Sets the maintenance_window of this KubernetesNodePoolPropertiesForPut. :param maintenance_window: The maintenance_window of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type maintenance_window: KubernetesMaintenanceWindow """ self._maintenance_window = maintenance_window @property def auto_scaling(self): """Gets the auto_scaling of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :return: The auto_scaling of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: KubernetesAutoScaling """ return self._auto_scaling @auto_scaling.setter def auto_scaling(self, auto_scaling): """Sets the auto_scaling of this KubernetesNodePoolPropertiesForPut. :param auto_scaling: The auto_scaling of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type auto_scaling: KubernetesAutoScaling """ self._auto_scaling = auto_scaling @property def lans(self): """Gets the lans of this KubernetesNodePoolPropertiesForPut. # noqa: E501 The array of existing private LANs to attach to worker nodes. # noqa: E501 :return: The lans of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: list[KubernetesNodePoolLan] """ return self._lans @lans.setter def lans(self, lans): """Sets the lans of this KubernetesNodePoolPropertiesForPut. The array of existing private LANs to attach to worker nodes. # noqa: E501 :param lans: The lans of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type lans: list[KubernetesNodePoolLan] """ self._lans = lans @property def labels(self): """Gets the labels of this KubernetesNodePoolPropertiesForPut. # noqa: E501 The labels attached to the node pool. # noqa: E501 :return: The labels of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: dict(str, str) """ return self._labels @labels.setter def labels(self, labels): """Sets the labels of this KubernetesNodePoolPropertiesForPut. The labels attached to the node pool. # noqa: E501 :param labels: The labels of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type labels: dict(str, str) """ self._labels = labels @property def annotations(self): """Gets the annotations of this KubernetesNodePoolPropertiesForPut. # noqa: E501 The annotations attached to the node pool. # noqa: E501 :return: The annotations of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: dict(str, str) """ return self._annotations @annotations.setter def annotations(self, annotations): """Sets the annotations of this KubernetesNodePoolPropertiesForPut. The annotations attached to the node pool. # noqa: E501 :param annotations: The annotations of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type annotations: dict(str, str) """ self._annotations = annotations @property def public_ips(self): """Gets the public_ips of this KubernetesNodePoolPropertiesForPut. # noqa: E501 Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :return: The public_ips of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :rtype: list[str] """ return self._public_ips @public_ips.setter def public_ips(self, public_ips): """Sets the public_ips of this KubernetesNodePoolPropertiesForPut. Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. # noqa: E501 :param public_ips: The public_ips of this KubernetesNodePoolPropertiesForPut. # noqa: E501 :type public_ips: list[str] """ self._public_ips = public_ips def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolPropertiesForPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolPropertiesForPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pool_server_type.py0000644000175100001660000000621015046550311026231 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePoolServerType(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ allowed enum values """ DEDICATEDCORE = "DedicatedCore" VCPU = "VCPU" allowable_values = [DEDICATEDCORE, VCPU] # noqa: E501 """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { } attribute_map = { } def __init__(self, local_vars_configuration=None): # noqa: E501 """KubernetesNodePoolServerType - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePoolServerType): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePoolServerType): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_pools.py0000644000175100001660000001445015046550311023772 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodePools(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[KubernetesNodePool]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodePools - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this KubernetesNodePools. # noqa: E501 A unique representation of the Kubernetes node pool as a resource collection. # noqa: E501 :return: The id of this KubernetesNodePools. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodePools. A unique representation of the Kubernetes node pool as a resource collection. # noqa: E501 :param id: The id of this KubernetesNodePools. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNodePools. # noqa: E501 The resource type within a collection. # noqa: E501 :return: The type of this KubernetesNodePools. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNodePools. The resource type within a collection. # noqa: E501 :param type: The type of this KubernetesNodePools. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNodePools. # noqa: E501 The URL to the collection representation (absolute path). # noqa: E501 :return: The href of this KubernetesNodePools. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNodePools. The URL to the collection representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNodePools. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this KubernetesNodePools. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this KubernetesNodePools. # noqa: E501 :rtype: list[KubernetesNodePool] """ return self._items @items.setter def items(self, items): """Sets the items of this KubernetesNodePools. Array of items in the collection. # noqa: E501 :param items: The items of this KubernetesNodePools. # noqa: E501 :type items: list[KubernetesNodePool] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodePools): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodePools): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_node_properties.py0000644000175100001660000001573515046550311025041 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodeProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'public_ip': 'str', 'private_ip': 'str', 'k8s_version': 'str', } attribute_map = { 'name': 'name', 'public_ip': 'publicIP', 'private_ip': 'privateIP', 'k8s_version': 'k8sVersion', } def __init__(self, name=None, public_ip=None, private_ip=None, k8s_version=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodeProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._public_ip = None self._private_ip = None self._k8s_version = None self.discriminator = None self.name = name if public_ip is not None: self.public_ip = public_ip if private_ip is not None: self.private_ip = private_ip self.k8s_version = k8s_version @property def name(self): """Gets the name of this KubernetesNodeProperties. # noqa: E501 The Kubernetes node name. # noqa: E501 :return: The name of this KubernetesNodeProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this KubernetesNodeProperties. The Kubernetes node name. # noqa: E501 :param name: The name of this KubernetesNodeProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def public_ip(self): """Gets the public_ip of this KubernetesNodeProperties. # noqa: E501 The public IP associated with the node. # noqa: E501 :return: The public_ip of this KubernetesNodeProperties. # noqa: E501 :rtype: str """ return self._public_ip @public_ip.setter def public_ip(self, public_ip): """Sets the public_ip of this KubernetesNodeProperties. The public IP associated with the node. # noqa: E501 :param public_ip: The public_ip of this KubernetesNodeProperties. # noqa: E501 :type public_ip: str """ self._public_ip = public_ip @property def private_ip(self): """Gets the private_ip of this KubernetesNodeProperties. # noqa: E501 The private IP associated with the node. # noqa: E501 :return: The private_ip of this KubernetesNodeProperties. # noqa: E501 :rtype: str """ return self._private_ip @private_ip.setter def private_ip(self, private_ip): """Sets the private_ip of this KubernetesNodeProperties. The private IP associated with the node. # noqa: E501 :param private_ip: The private_ip of this KubernetesNodeProperties. # noqa: E501 :type private_ip: str """ self._private_ip = private_ip @property def k8s_version(self): """Gets the k8s_version of this KubernetesNodeProperties. # noqa: E501 The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :return: The k8s_version of this KubernetesNodeProperties. # noqa: E501 :rtype: str """ return self._k8s_version @k8s_version.setter def k8s_version(self, k8s_version): """Sets the k8s_version of this KubernetesNodeProperties. The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. # noqa: E501 :param k8s_version: The k8s_version of this KubernetesNodeProperties. # noqa: E501 :type k8s_version: str """ if self.local_vars_configuration.client_side_validation and k8s_version is None: # noqa: E501 raise ValueError("Invalid value for `k8s_version`, must not be `None`") # noqa: E501 self._k8s_version = k8s_version def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodeProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodeProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/kubernetes_nodes.py0000644000175100001660000001431415046550311022740 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class KubernetesNodes(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[KubernetesNode]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """KubernetesNodes - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this KubernetesNodes. # noqa: E501 A unique representation of the Kubernetes node pool as a resource collection. # noqa: E501 :return: The id of this KubernetesNodes. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this KubernetesNodes. A unique representation of the Kubernetes node pool as a resource collection. # noqa: E501 :param id: The id of this KubernetesNodes. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this KubernetesNodes. # noqa: E501 The resource type within a collection. # noqa: E501 :return: The type of this KubernetesNodes. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this KubernetesNodes. The resource type within a collection. # noqa: E501 :param type: The type of this KubernetesNodes. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this KubernetesNodes. # noqa: E501 The URL to the collection representation (absolute path). # noqa: E501 :return: The href of this KubernetesNodes. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this KubernetesNodes. The URL to the collection representation (absolute path). # noqa: E501 :param href: The href of this KubernetesNodes. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this KubernetesNodes. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this KubernetesNodes. # noqa: E501 :rtype: list[KubernetesNode] """ return self._items @items.setter def items(self, items): """Sets the items of this KubernetesNodes. Array of items in the collection. # noqa: E501 :param items: The items of this KubernetesNodes. # noqa: E501 :type items: list[KubernetesNode] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KubernetesNodes): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KubernetesNodes): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/label.py0000644000175100001660000001532715046550311020465 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Label(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'NoStateMetaData', 'properties': 'LabelProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Label - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Label. # noqa: E501 Label is identified using standard URN. # noqa: E501 :return: The id of this Label. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Label. Label is identified using standard URN. # noqa: E501 :param id: The id of this Label. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Label. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Label. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Label. The type of object that has been created. # noqa: E501 :param type: The type of this Label. # noqa: E501 :type type: str """ allowed_values = ["label"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this Label. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Label. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Label. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Label. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Label. # noqa: E501 :return: The metadata of this Label. # noqa: E501 :rtype: NoStateMetaData """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Label. :param metadata: The metadata of this Label. # noqa: E501 :type metadata: NoStateMetaData """ self._metadata = metadata @property def properties(self): """Gets the properties of this Label. # noqa: E501 :return: The properties of this Label. # noqa: E501 :rtype: LabelProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Label. :param properties: The properties of this Label. # noqa: E501 :type properties: LabelProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Label): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Label): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/label_properties.py0000644000175100001660000001563715046550311022745 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LabelProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'key': 'str', 'value': 'str', 'resource_id': 'str', 'resource_type': 'str', 'resource_href': 'str', } attribute_map = { 'key': 'key', 'value': 'value', 'resource_id': 'resourceId', 'resource_type': 'resourceType', 'resource_href': 'resourceHref', } def __init__(self, key=None, value=None, resource_id=None, resource_type=None, resource_href=None, local_vars_configuration=None): # noqa: E501 """LabelProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._key = None self._value = None self._resource_id = None self._resource_type = None self._resource_href = None self.discriminator = None if key is not None: self.key = key if value is not None: self.value = value if resource_id is not None: self.resource_id = resource_id if resource_type is not None: self.resource_type = resource_type if resource_href is not None: self.resource_href = resource_href @property def key(self): """Gets the key of this LabelProperties. # noqa: E501 A label key # noqa: E501 :return: The key of this LabelProperties. # noqa: E501 :rtype: str """ return self._key @key.setter def key(self, key): """Sets the key of this LabelProperties. A label key # noqa: E501 :param key: The key of this LabelProperties. # noqa: E501 :type key: str """ self._key = key @property def value(self): """Gets the value of this LabelProperties. # noqa: E501 A label value # noqa: E501 :return: The value of this LabelProperties. # noqa: E501 :rtype: str """ return self._value @value.setter def value(self, value): """Sets the value of this LabelProperties. A label value # noqa: E501 :param value: The value of this LabelProperties. # noqa: E501 :type value: str """ self._value = value @property def resource_id(self): """Gets the resource_id of this LabelProperties. # noqa: E501 The ID of the resource. # noqa: E501 :return: The resource_id of this LabelProperties. # noqa: E501 :rtype: str """ return self._resource_id @resource_id.setter def resource_id(self, resource_id): """Sets the resource_id of this LabelProperties. The ID of the resource. # noqa: E501 :param resource_id: The resource_id of this LabelProperties. # noqa: E501 :type resource_id: str """ self._resource_id = resource_id @property def resource_type(self): """Gets the resource_type of this LabelProperties. # noqa: E501 The type of the resource on which the label is applied. # noqa: E501 :return: The resource_type of this LabelProperties. # noqa: E501 :rtype: str """ return self._resource_type @resource_type.setter def resource_type(self, resource_type): """Sets the resource_type of this LabelProperties. The type of the resource on which the label is applied. # noqa: E501 :param resource_type: The resource_type of this LabelProperties. # noqa: E501 :type resource_type: str """ self._resource_type = resource_type @property def resource_href(self): """Gets the resource_href of this LabelProperties. # noqa: E501 URL to the Resource (absolute path) on which the label is applied. # noqa: E501 :return: The resource_href of this LabelProperties. # noqa: E501 :rtype: str """ return self._resource_href @resource_href.setter def resource_href(self, resource_href): """Sets the resource_href of this LabelProperties. URL to the Resource (absolute path) on which the label is applied. # noqa: E501 :param resource_href: The resource_href of this LabelProperties. # noqa: E501 :type resource_href: str """ self._resource_href = resource_href def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LabelProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LabelProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/label_resource.py0000644000175100001660000001570515046550311022374 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LabelResource(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'metadata': 'NoStateMetaData', 'properties': 'LabelResourceProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """LabelResource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this LabelResource. # noqa: E501 Label on a resource is identified using label key. # noqa: E501 :return: The id of this LabelResource. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this LabelResource. Label on a resource is identified using label key. # noqa: E501 :param id: The id of this LabelResource. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this LabelResource. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this LabelResource. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this LabelResource. The type of object that has been created. # noqa: E501 :param type: The type of this LabelResource. # noqa: E501 :type type: str """ allowed_values = ["label"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this LabelResource. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this LabelResource. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this LabelResource. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this LabelResource. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this LabelResource. # noqa: E501 :return: The metadata of this LabelResource. # noqa: E501 :rtype: NoStateMetaData """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this LabelResource. :param metadata: The metadata of this LabelResource. # noqa: E501 :type metadata: NoStateMetaData """ self._metadata = metadata @property def properties(self): """Gets the properties of this LabelResource. # noqa: E501 :return: The properties of this LabelResource. # noqa: E501 :rtype: LabelResourceProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this LabelResource. :param properties: The properties of this LabelResource. # noqa: E501 :type properties: LabelResourceProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LabelResource): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LabelResource): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/label_resource_properties.py0000644000175100001660000001051715046550311024644 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LabelResourceProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'key': 'str', 'value': 'str', } attribute_map = { 'key': 'key', 'value': 'value', } def __init__(self, key=None, value=None, local_vars_configuration=None): # noqa: E501 """LabelResourceProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._key = None self._value = None self.discriminator = None if key is not None: self.key = key if value is not None: self.value = value @property def key(self): """Gets the key of this LabelResourceProperties. # noqa: E501 A label key # noqa: E501 :return: The key of this LabelResourceProperties. # noqa: E501 :rtype: str """ return self._key @key.setter def key(self, key): """Sets the key of this LabelResourceProperties. A label key # noqa: E501 :param key: The key of this LabelResourceProperties. # noqa: E501 :type key: str """ self._key = key @property def value(self): """Gets the value of this LabelResourceProperties. # noqa: E501 A label value # noqa: E501 :return: The value of this LabelResourceProperties. # noqa: E501 :rtype: str """ return self._value @value.setter def value(self, value): """Sets the value of this LabelResourceProperties. A label value # noqa: E501 :param value: The value of this LabelResourceProperties. # noqa: E501 :type value: str """ self._value = value def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LabelResourceProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LabelResourceProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/label_resources.py0000644000175100001660000002041015046550311022544 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LabelResources(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[LabelResource]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """LabelResources - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this LabelResources. # noqa: E501 A unique representation of the label as a resource collection. # noqa: E501 :return: The id of this LabelResources. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this LabelResources. A unique representation of the label as a resource collection. # noqa: E501 :param id: The id of this LabelResources. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this LabelResources. # noqa: E501 The type of resource within a collection. # noqa: E501 :return: The type of this LabelResources. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this LabelResources. The type of resource within a collection. # noqa: E501 :param type: The type of this LabelResources. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this LabelResources. # noqa: E501 URL to the collection representation (absolute path). # noqa: E501 :return: The href of this LabelResources. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this LabelResources. URL to the collection representation (absolute path). # noqa: E501 :param href: The href of this LabelResources. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this LabelResources. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this LabelResources. # noqa: E501 :rtype: list[LabelResource] """ return self._items @items.setter def items(self, items): """Sets the items of this LabelResources. Array of items in the collection. # noqa: E501 :param items: The items of this LabelResources. # noqa: E501 :type items: list[LabelResource] """ self._items = items @property def offset(self): """Gets the offset of this LabelResources. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this LabelResources. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this LabelResources. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this LabelResources. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this LabelResources. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this LabelResources. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this LabelResources. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this LabelResources. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this LabelResources. # noqa: E501 :return: The links of this LabelResources. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this LabelResources. :param links: The links of this LabelResources. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LabelResources): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LabelResources): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/labels.py0000644000175100001660000001373515046550311020651 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Labels(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'str', 'href': 'str', 'items': 'list[Label]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Labels - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Labels. # noqa: E501 A unique representation of the label as a resource collection. # noqa: E501 :return: The id of this Labels. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Labels. A unique representation of the label as a resource collection. # noqa: E501 :param id: The id of this Labels. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Labels. # noqa: E501 The type of resource within a collection. # noqa: E501 :return: The type of this Labels. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Labels. The type of resource within a collection. # noqa: E501 :param type: The type of this Labels. # noqa: E501 :type type: str """ allowed_values = ["collection"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def href(self): """Gets the href of this Labels. # noqa: E501 URL to the collection representation (absolute path). # noqa: E501 :return: The href of this Labels. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Labels. URL to the collection representation (absolute path). # noqa: E501 :param href: The href of this Labels. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Labels. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Labels. # noqa: E501 :rtype: list[Label] """ return self._items @items.setter def items(self, items): """Sets the items of this Labels. Array of items in the collection. # noqa: E501 :param items: The items of this Labels. # noqa: E501 :type items: list[Label] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Labels): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Labels): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/lan.py0000644000175100001660000001577215046550311020164 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Lan(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LanProperties', 'entities': 'LanEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Lan - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Lan. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Lan. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Lan. The resource's unique identifier. # noqa: E501 :param id: The id of this Lan. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Lan. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Lan. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Lan. The type of object that has been created. # noqa: E501 :param type: The type of this Lan. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Lan. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Lan. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Lan. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Lan. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Lan. # noqa: E501 :return: The metadata of this Lan. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Lan. :param metadata: The metadata of this Lan. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Lan. # noqa: E501 :return: The properties of this Lan. # noqa: E501 :rtype: LanProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Lan. :param properties: The properties of this Lan. # noqa: E501 :type properties: LanProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Lan. # noqa: E501 :return: The entities of this Lan. # noqa: E501 :rtype: LanEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Lan. :param entities: The entities of this Lan. # noqa: E501 :type entities: LanEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Lan): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Lan): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/lan_entities.py0000644000175100001660000000677315046550311022071 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LanEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'nics': 'LanNics', } attribute_map = { 'nics': 'nics', } def __init__(self, nics=None, local_vars_configuration=None): # noqa: E501 """LanEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._nics = None self.discriminator = None if nics is not None: self.nics = nics @property def nics(self): """Gets the nics of this LanEntities. # noqa: E501 :return: The nics of this LanEntities. # noqa: E501 :rtype: LanNics """ return self._nics @nics.setter def nics(self, nics): """Sets the nics of this LanEntities. :param nics: The nics of this LanEntities. # noqa: E501 :type nics: LanNics """ self._nics = nics def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LanEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LanEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/lan_nics.py0000644000175100001660000001717215046550311021174 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LanNics(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Nic]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """LanNics - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this LanNics. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this LanNics. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this LanNics. The resource's unique identifier. # noqa: E501 :param id: The id of this LanNics. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this LanNics. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this LanNics. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this LanNics. The type of object that has been created. # noqa: E501 :param type: The type of this LanNics. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this LanNics. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this LanNics. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this LanNics. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this LanNics. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this LanNics. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this LanNics. # noqa: E501 :rtype: list[Nic] """ return self._items @items.setter def items(self, items): """Sets the items of this LanNics. Array of items in the collection. # noqa: E501 :param items: The items of this LanNics. # noqa: E501 :type items: list[Nic] """ self._items = items @property def offset(self): """Gets the offset of this LanNics. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this LanNics. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this LanNics. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this LanNics. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this LanNics. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this LanNics. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this LanNics. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this LanNics. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this LanNics. # noqa: E501 :return: The links of this LanNics. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this LanNics. :param links: The links of this LanNics. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LanNics): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LanNics): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/lan_properties.py0000644000175100001660000002346015046550311022431 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LanProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'ip_failover': 'list[IPFailover]', 'ipv4_cidr_block': 'str', 'ipv6_cidr_block': 'str', 'pcc': 'str', 'public': 'bool', } attribute_map = { 'name': 'name', 'ip_failover': 'ipFailover', 'ipv4_cidr_block': 'ipv4CidrBlock', 'ipv6_cidr_block': 'ipv6CidrBlock', 'pcc': 'pcc', 'public': 'public', } def __init__(self, name=None, ip_failover=None, ipv4_cidr_block=None, ipv6_cidr_block=None, pcc=None, public=None, local_vars_configuration=None): # noqa: E501 """LanProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._ip_failover = None self._ipv4_cidr_block = None self._ipv6_cidr_block = None self._pcc = None self._public = None self.discriminator = None if name is not None: self.name = name if ip_failover is not None: self.ip_failover = ip_failover if ipv4_cidr_block is not None: self.ipv4_cidr_block = ipv4_cidr_block self.ipv6_cidr_block = ipv6_cidr_block if pcc is not None: self.pcc = pcc if public is not None: self.public = public @property def name(self): """Gets the name of this LanProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this LanProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this LanProperties. The name of the resource. # noqa: E501 :param name: The name of this LanProperties. # noqa: E501 :type name: str """ self._name = name @property def ip_failover(self): """Gets the ip_failover of this LanProperties. # noqa: E501 IP failover configurations for lan # noqa: E501 :return: The ip_failover of this LanProperties. # noqa: E501 :rtype: list[IPFailover] """ return self._ip_failover @ip_failover.setter def ip_failover(self, ip_failover): """Sets the ip_failover of this LanProperties. IP failover configurations for lan # noqa: E501 :param ip_failover: The ip_failover of this LanProperties. # noqa: E501 :type ip_failover: list[IPFailover] """ self._ip_failover = ip_failover @property def ipv4_cidr_block(self): """Gets the ipv4_cidr_block of this LanProperties. # noqa: E501 For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range. This property is a read only property. # noqa: E501 :return: The ipv4_cidr_block of this LanProperties. # noqa: E501 :rtype: str """ return self._ipv4_cidr_block @ipv4_cidr_block.setter def ipv4_cidr_block(self, ipv4_cidr_block): """Sets the ipv4_cidr_block of this LanProperties. For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range. This property is a read only property. # noqa: E501 :param ipv4_cidr_block: The ipv4_cidr_block of this LanProperties. # noqa: E501 :type ipv4_cidr_block: str """ self._ipv4_cidr_block = ipv4_cidr_block @property def ipv6_cidr_block(self): """Gets the ipv6_cidr_block of this LanProperties. # noqa: E501 For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN and /80 IPv6 CIDR blocks to the NICs and one /128 IPv6 address to each connected NIC. If you choose the IPv6 CIDR block for the LAN on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the LAN and on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. # noqa: E501 :return: The ipv6_cidr_block of this LanProperties. # noqa: E501 :rtype: str """ return self._ipv6_cidr_block @ipv6_cidr_block.setter def ipv6_cidr_block(self, ipv6_cidr_block): """Sets the ipv6_cidr_block of this LanProperties. For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN and /80 IPv6 CIDR blocks to the NICs and one /128 IPv6 address to each connected NIC. If you choose the IPv6 CIDR block for the LAN on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the LAN and on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. # noqa: E501 :param ipv6_cidr_block: The ipv6_cidr_block of this LanProperties. # noqa: E501 :type ipv6_cidr_block: str """ self._ipv6_cidr_block = ipv6_cidr_block @property def pcc(self): """Gets the pcc of this LanProperties. # noqa: E501 The unique identifier of the Cross Connect the LAN is connected to, if any. It needs to be ensured that IP addresses of the NICs of all LANs connected to a given Cross Connect is not duplicated and belongs to the same subnet range. # noqa: E501 :return: The pcc of this LanProperties. # noqa: E501 :rtype: str """ return self._pcc @pcc.setter def pcc(self, pcc): """Sets the pcc of this LanProperties. The unique identifier of the Cross Connect the LAN is connected to, if any. It needs to be ensured that IP addresses of the NICs of all LANs connected to a given Cross Connect is not duplicated and belongs to the same subnet range. # noqa: E501 :param pcc: The pcc of this LanProperties. # noqa: E501 :type pcc: str """ self._pcc = pcc @property def public(self): """Gets the public of this LanProperties. # noqa: E501 Indicates if the LAN is connected to the internet or not. # noqa: E501 :return: The public of this LanProperties. # noqa: E501 :rtype: bool """ return self._public @public.setter def public(self, public): """Sets the public of this LanProperties. Indicates if the LAN is connected to the internet or not. # noqa: E501 :param public: The public of this LanProperties. # noqa: E501 :type public: bool """ self._public = public def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LanProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LanProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/lans.py0000644000175100001660000001703215046550311020336 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Lans(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Lan]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Lans - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Lans. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Lans. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Lans. The resource's unique identifier. # noqa: E501 :param id: The id of this Lans. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Lans. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Lans. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Lans. The type of object that has been created. # noqa: E501 :param type: The type of this Lans. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Lans. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Lans. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Lans. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Lans. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Lans. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Lans. # noqa: E501 :rtype: list[Lan] """ return self._items @items.setter def items(self, items): """Sets the items of this Lans. Array of items in the collection. # noqa: E501 :param items: The items of this Lans. # noqa: E501 :type items: list[Lan] """ self._items = items @property def offset(self): """Gets the offset of this Lans. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Lans. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Lans. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Lans. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Lans. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Lans. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Lans. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Lans. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Lans. # noqa: E501 :return: The links of this Lans. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Lans. :param links: The links of this Lans. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Lans): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Lans): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/list_of_ids.py0000644000175100001660000000730115046550311021675 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ListOfIds(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ids': 'list[str]', } attribute_map = { 'ids': 'ids', } def __init__(self, ids=None, local_vars_configuration=None): # noqa: E501 """ListOfIds - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ids = None self.discriminator = None self.ids = ids @property def ids(self): """Gets the ids of this ListOfIds. # noqa: E501 The list of IDs # noqa: E501 :return: The ids of this ListOfIds. # noqa: E501 :rtype: list[str] """ return self._ids @ids.setter def ids(self, ids): """Sets the ids of this ListOfIds. The list of IDs # noqa: E501 :param ids: The ids of this ListOfIds. # noqa: E501 :type ids: list[str] """ if self.local_vars_configuration.client_side_validation and ids is None: # noqa: E501 raise ValueError("Invalid value for `ids`, must not be `None`") # noqa: E501 self._ids = ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ListOfIds): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ListOfIds): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/loadbalancer.py0000644000175100001660000001645415046550311022017 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Loadbalancer(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LoadbalancerProperties', 'entities': 'LoadbalancerEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Loadbalancer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Loadbalancer. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Loadbalancer. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Loadbalancer. The resource's unique identifier. # noqa: E501 :param id: The id of this Loadbalancer. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Loadbalancer. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Loadbalancer. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Loadbalancer. The type of object that has been created. # noqa: E501 :param type: The type of this Loadbalancer. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Loadbalancer. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Loadbalancer. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Loadbalancer. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Loadbalancer. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Loadbalancer. # noqa: E501 :return: The metadata of this Loadbalancer. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Loadbalancer. :param metadata: The metadata of this Loadbalancer. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Loadbalancer. # noqa: E501 :return: The properties of this Loadbalancer. # noqa: E501 :rtype: LoadbalancerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Loadbalancer. :param properties: The properties of this Loadbalancer. # noqa: E501 :type properties: LoadbalancerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Loadbalancer. # noqa: E501 :return: The entities of this Loadbalancer. # noqa: E501 :rtype: LoadbalancerEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Loadbalancer. :param entities: The entities of this Loadbalancer. # noqa: E501 :type entities: LoadbalancerEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Loadbalancer): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Loadbalancer): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/loadbalancer_entities.py0000644000175100001660000000737215046550311023722 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LoadbalancerEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'balancednics': 'BalancedNics', } attribute_map = { 'balancednics': 'balancednics', } def __init__(self, balancednics=None, local_vars_configuration=None): # noqa: E501 """LoadbalancerEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._balancednics = None self.discriminator = None if balancednics is not None: self.balancednics = balancednics @property def balancednics(self): """Gets the balancednics of this LoadbalancerEntities. # noqa: E501 :return: The balancednics of this LoadbalancerEntities. # noqa: E501 :rtype: BalancedNics """ return self._balancednics @balancednics.setter def balancednics(self, balancednics): """Sets the balancednics of this LoadbalancerEntities. :param balancednics: The balancednics of this LoadbalancerEntities. # noqa: E501 :type balancednics: BalancedNics """ self._balancednics = balancednics def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LoadbalancerEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LoadbalancerEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/loadbalancer_properties.py0000644000175100001660000001241315046550311024262 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LoadbalancerProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'ip': 'str', 'dhcp': 'bool', } attribute_map = { 'name': 'name', 'ip': 'ip', 'dhcp': 'dhcp', } def __init__(self, name=None, ip=None, dhcp=None, local_vars_configuration=None): # noqa: E501 """LoadbalancerProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._ip = None self._dhcp = None self.discriminator = None if name is not None: self.name = name self.ip = ip if dhcp is not None: self.dhcp = dhcp @property def name(self): """Gets the name of this LoadbalancerProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this LoadbalancerProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this LoadbalancerProperties. The name of the resource. # noqa: E501 :param name: The name of this LoadbalancerProperties. # noqa: E501 :type name: str """ self._name = name @property def ip(self): """Gets the ip of this LoadbalancerProperties. # noqa: E501 IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. # noqa: E501 :return: The ip of this LoadbalancerProperties. # noqa: E501 :rtype: str """ return self._ip @ip.setter def ip(self, ip): """Sets the ip of this LoadbalancerProperties. IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. # noqa: E501 :param ip: The ip of this LoadbalancerProperties. # noqa: E501 :type ip: str """ self._ip = ip @property def dhcp(self): """Gets the dhcp of this LoadbalancerProperties. # noqa: E501 Indicates if the loadbalancer will reserve an IP using DHCP. # noqa: E501 :return: The dhcp of this LoadbalancerProperties. # noqa: E501 :rtype: bool """ return self._dhcp @dhcp.setter def dhcp(self, dhcp): """Sets the dhcp of this LoadbalancerProperties. Indicates if the loadbalancer will reserve an IP using DHCP. # noqa: E501 :param dhcp: The dhcp of this LoadbalancerProperties. # noqa: E501 :type dhcp: bool """ self._dhcp = dhcp def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LoadbalancerProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LoadbalancerProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/loadbalancers.py0000644000175100001660000001752515046550311022202 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Loadbalancers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Loadbalancer]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Loadbalancers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Loadbalancers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Loadbalancers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Loadbalancers. The resource's unique identifier. # noqa: E501 :param id: The id of this Loadbalancers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Loadbalancers. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Loadbalancers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Loadbalancers. The type of object that has been created. # noqa: E501 :param type: The type of this Loadbalancers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Loadbalancers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Loadbalancers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Loadbalancers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Loadbalancers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Loadbalancers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Loadbalancers. # noqa: E501 :rtype: list[Loadbalancer] """ return self._items @items.setter def items(self, items): """Sets the items of this Loadbalancers. Array of items in the collection. # noqa: E501 :param items: The items of this Loadbalancers. # noqa: E501 :type items: list[Loadbalancer] """ self._items = items @property def offset(self): """Gets the offset of this Loadbalancers. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Loadbalancers. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Loadbalancers. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Loadbalancers. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Loadbalancers. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Loadbalancers. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Loadbalancers. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Loadbalancers. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Loadbalancers. # noqa: E501 :return: The links of this Loadbalancers. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Loadbalancers. :param links: The links of this Loadbalancers. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Loadbalancers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Loadbalancers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/location.py0000644000175100001660000001476115046550311021217 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Location(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LocationProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Location - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Location. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Location. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Location. The resource's unique identifier. # noqa: E501 :param id: The id of this Location. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Location. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Location. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Location. The type of object that has been created. # noqa: E501 :param type: The type of this Location. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Location. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Location. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Location. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Location. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Location. # noqa: E501 :return: The metadata of this Location. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Location. :param metadata: The metadata of this Location. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Location. # noqa: E501 :return: The properties of this Location. # noqa: E501 :rtype: LocationProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Location. :param properties: The properties of this Location. # noqa: E501 :type properties: LocationProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Location): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Location): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/location_properties.py0000644000175100001660000001500015046550311023456 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class LocationProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'features': 'list[str]', 'image_aliases': 'list[str]', 'cpu_architecture': 'list[CpuArchitectureProperties]', } attribute_map = { 'name': 'name', 'features': 'features', 'image_aliases': 'imageAliases', 'cpu_architecture': 'cpuArchitecture', } def __init__(self, name=None, features=None, image_aliases=None, cpu_architecture=None, local_vars_configuration=None): # noqa: E501 """LocationProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._features = None self._image_aliases = None self._cpu_architecture = None self.discriminator = None if name is not None: self.name = name if features is not None: self.features = features if image_aliases is not None: self.image_aliases = image_aliases if cpu_architecture is not None: self.cpu_architecture = cpu_architecture @property def name(self): """Gets the name of this LocationProperties. # noqa: E501 The location name. # noqa: E501 :return: The name of this LocationProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this LocationProperties. The location name. # noqa: E501 :param name: The name of this LocationProperties. # noqa: E501 :type name: str """ self._name = name @property def features(self): """Gets the features of this LocationProperties. # noqa: E501 A list of available features in the location. # noqa: E501 :return: The features of this LocationProperties. # noqa: E501 :rtype: list[str] """ return self._features @features.setter def features(self, features): """Sets the features of this LocationProperties. A list of available features in the location. # noqa: E501 :param features: The features of this LocationProperties. # noqa: E501 :type features: list[str] """ self._features = features @property def image_aliases(self): """Gets the image_aliases of this LocationProperties. # noqa: E501 A list of image aliases available in the location. # noqa: E501 :return: The image_aliases of this LocationProperties. # noqa: E501 :rtype: list[str] """ return self._image_aliases @image_aliases.setter def image_aliases(self, image_aliases): """Sets the image_aliases of this LocationProperties. A list of image aliases available in the location. # noqa: E501 :param image_aliases: The image_aliases of this LocationProperties. # noqa: E501 :type image_aliases: list[str] """ self._image_aliases = image_aliases @property def cpu_architecture(self): """Gets the cpu_architecture of this LocationProperties. # noqa: E501 A list of available CPU types and related resources available in the location. # noqa: E501 :return: The cpu_architecture of this LocationProperties. # noqa: E501 :rtype: list[CpuArchitectureProperties] """ return self._cpu_architecture @cpu_architecture.setter def cpu_architecture(self, cpu_architecture): """Sets the cpu_architecture of this LocationProperties. A list of available CPU types and related resources available in the location. # noqa: E501 :param cpu_architecture: The cpu_architecture of this LocationProperties. # noqa: E501 :type cpu_architecture: list[CpuArchitectureProperties] """ self._cpu_architecture = cpu_architecture def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, LocationProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, LocationProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/locations.py0000644000175100001660000001322215046550311021371 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Locations(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Location]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Locations - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Locations. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Locations. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Locations. The resource's unique identifier. # noqa: E501 :param id: The id of this Locations. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Locations. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Locations. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Locations. The type of object that has been created. # noqa: E501 :param type: The type of this Locations. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Locations. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Locations. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Locations. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Locations. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Locations. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Locations. # noqa: E501 :rtype: list[Location] """ return self._items @items.setter def items(self, items): """Sets the items of this Locations. Array of items in the collection. # noqa: E501 :param items: The items of this Locations. # noqa: E501 :type items: list[Location] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Locations): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Locations): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway.py0000644000175100001660000001635015046550311021706 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGateway(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NatGatewayProperties', 'entities': 'NatGatewayEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """NatGateway - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this NatGateway. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGateway. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGateway. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGateway. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGateway. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGateway. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGateway. The type of object that has been created. # noqa: E501 :param type: The type of this NatGateway. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGateway. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGateway. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGateway. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGateway. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this NatGateway. # noqa: E501 :return: The metadata of this NatGateway. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this NatGateway. :param metadata: The metadata of this NatGateway. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this NatGateway. # noqa: E501 :return: The properties of this NatGateway. # noqa: E501 :rtype: NatGatewayProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NatGateway. :param properties: The properties of this NatGateway. # noqa: E501 :type properties: NatGatewayProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this NatGateway. # noqa: E501 :return: The entities of this NatGateway. # noqa: E501 :rtype: NatGatewayEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this NatGateway. :param entities: The entities of this NatGateway. # noqa: E501 :type entities: NatGatewayEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGateway): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGateway): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_entities.py0000644000175100001660000001044315046550311023607 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'rules': 'NatGatewayRules', 'flowlogs': 'FlowLogs', } attribute_map = { 'rules': 'rules', 'flowlogs': 'flowlogs', } def __init__(self, rules=None, flowlogs=None, local_vars_configuration=None): # noqa: E501 """NatGatewayEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._rules = None self._flowlogs = None self.discriminator = None if rules is not None: self.rules = rules if flowlogs is not None: self.flowlogs = flowlogs @property def rules(self): """Gets the rules of this NatGatewayEntities. # noqa: E501 :return: The rules of this NatGatewayEntities. # noqa: E501 :rtype: NatGatewayRules """ return self._rules @rules.setter def rules(self, rules): """Sets the rules of this NatGatewayEntities. :param rules: The rules of this NatGatewayEntities. # noqa: E501 :type rules: NatGatewayRules """ self._rules = rules @property def flowlogs(self): """Gets the flowlogs of this NatGatewayEntities. # noqa: E501 :return: The flowlogs of this NatGatewayEntities. # noqa: E501 :rtype: FlowLogs """ return self._flowlogs @flowlogs.setter def flowlogs(self, flowlogs): """Sets the flowlogs of this NatGatewayEntities. :param flowlogs: The flowlogs of this NatGatewayEntities. # noqa: E501 :type flowlogs: FlowLogs """ self._flowlogs = flowlogs def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_lan_properties.py0000644000175100001660000001170315046550311025011 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayLanProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'int', 'gateway_ips': 'list[str]', } attribute_map = { 'id': 'id', 'gateway_ips': 'gatewayIps', } def __init__(self, id=None, gateway_ips=None, local_vars_configuration=None): # noqa: E501 """NatGatewayLanProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._gateway_ips = None self.discriminator = None self.id = id if gateway_ips is not None: self.gateway_ips = gateway_ips @property def id(self): """Gets the id of this NatGatewayLanProperties. # noqa: E501 Id for the LAN connected to the NAT Gateway # noqa: E501 :return: The id of this NatGatewayLanProperties. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): """Sets the id of this NatGatewayLanProperties. Id for the LAN connected to the NAT Gateway # noqa: E501 :param id: The id of this NatGatewayLanProperties. # noqa: E501 :type id: int """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @property def gateway_ips(self): """Gets the gateway_ips of this NatGatewayLanProperties. # noqa: E501 Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN # noqa: E501 :return: The gateway_ips of this NatGatewayLanProperties. # noqa: E501 :rtype: list[str] """ return self._gateway_ips @gateway_ips.setter def gateway_ips(self, gateway_ips): """Sets the gateway_ips of this NatGatewayLanProperties. Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN # noqa: E501 :param gateway_ips: The gateway_ips of this NatGatewayLanProperties. # noqa: E501 :type gateway_ips: list[str] """ self._gateway_ips = gateway_ips def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayLanProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayLanProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_properties.py0000644000175100001660000001376015046550311024164 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'public_ips': 'list[str]', 'lans': 'list[NatGatewayLanProperties]', } attribute_map = { 'name': 'name', 'public_ips': 'publicIps', 'lans': 'lans', } def __init__(self, name=None, public_ips=None, lans=None, local_vars_configuration=None): # noqa: E501 """NatGatewayProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._public_ips = None self._lans = None self.discriminator = None self.name = name self.public_ips = public_ips if lans is not None: self.lans = lans @property def name(self): """Gets the name of this NatGatewayProperties. # noqa: E501 Name of the NAT Gateway. # noqa: E501 :return: The name of this NatGatewayProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NatGatewayProperties. Name of the NAT Gateway. # noqa: E501 :param name: The name of this NatGatewayProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def public_ips(self): """Gets the public_ips of this NatGatewayProperties. # noqa: E501 Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. # noqa: E501 :return: The public_ips of this NatGatewayProperties. # noqa: E501 :rtype: list[str] """ return self._public_ips @public_ips.setter def public_ips(self, public_ips): """Sets the public_ips of this NatGatewayProperties. Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. # noqa: E501 :param public_ips: The public_ips of this NatGatewayProperties. # noqa: E501 :type public_ips: list[str] """ if self.local_vars_configuration.client_side_validation and public_ips is None: # noqa: E501 raise ValueError("Invalid value for `public_ips`, must not be `None`") # noqa: E501 self._public_ips = public_ips @property def lans(self): """Gets the lans of this NatGatewayProperties. # noqa: E501 Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :return: The lans of this NatGatewayProperties. # noqa: E501 :rtype: list[NatGatewayLanProperties] """ return self._lans @lans.setter def lans(self, lans): """Sets the lans of this NatGatewayProperties. Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :param lans: The lans of this NatGatewayProperties. # noqa: E501 :type lans: list[NatGatewayLanProperties] """ self._lans = lans def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_put.py0000644000175100001660000001361515046550311022577 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'NatGatewayProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """NatGatewayPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this NatGatewayPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGatewayPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGatewayPut. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGatewayPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGatewayPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGatewayPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGatewayPut. The type of object that has been created. # noqa: E501 :param type: The type of this NatGatewayPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGatewayPut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGatewayPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGatewayPut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGatewayPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this NatGatewayPut. # noqa: E501 :return: The properties of this NatGatewayPut. # noqa: E501 :rtype: NatGatewayProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NatGatewayPut. :param properties: The properties of this NatGatewayPut. # noqa: E501 :type properties: NatGatewayProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rule.py0000644000175100001660000001522315046550311022733 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NatGatewayRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """NatGatewayRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this NatGatewayRule. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGatewayRule. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGatewayRule. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGatewayRule. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGatewayRule. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGatewayRule. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGatewayRule. The type of object that has been created. # noqa: E501 :param type: The type of this NatGatewayRule. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGatewayRule. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGatewayRule. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGatewayRule. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGatewayRule. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this NatGatewayRule. # noqa: E501 :return: The metadata of this NatGatewayRule. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this NatGatewayRule. :param metadata: The metadata of this NatGatewayRule. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this NatGatewayRule. # noqa: E501 :return: The properties of this NatGatewayRule. # noqa: E501 :rtype: NatGatewayRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NatGatewayRule. :param properties: The properties of this NatGatewayRule. # noqa: E501 :type properties: NatGatewayRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRule): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRule): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rule_properties.py0000644000175100001660000002476615046550311025223 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRuleProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'type': 'NatGatewayRuleType', 'protocol': 'NatGatewayRuleProtocol', 'source_subnet': 'str', 'public_ip': 'str', 'target_subnet': 'str', 'target_port_range': 'TargetPortRange', } attribute_map = { 'name': 'name', 'type': 'type', 'protocol': 'protocol', 'source_subnet': 'sourceSubnet', 'public_ip': 'publicIp', 'target_subnet': 'targetSubnet', 'target_port_range': 'targetPortRange', } def __init__(self, name=None, type=None, protocol=None, source_subnet=None, public_ip=None, target_subnet=None, target_port_range=None, local_vars_configuration=None): # noqa: E501 """NatGatewayRuleProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._type = None self._protocol = None self._source_subnet = None self._public_ip = None self._target_subnet = None self._target_port_range = None self.discriminator = None self.name = name if type is not None: self.type = type if protocol is not None: self.protocol = protocol self.source_subnet = source_subnet self.public_ip = public_ip if target_subnet is not None: self.target_subnet = target_subnet if target_port_range is not None: self.target_port_range = target_port_range @property def name(self): """Gets the name of this NatGatewayRuleProperties. # noqa: E501 The name of the NAT Gateway rule. # noqa: E501 :return: The name of this NatGatewayRuleProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NatGatewayRuleProperties. The name of the NAT Gateway rule. # noqa: E501 :param name: The name of this NatGatewayRuleProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def type(self): """Gets the type of this NatGatewayRuleProperties. # noqa: E501 Type of the NAT Gateway rule. # noqa: E501 :return: The type of this NatGatewayRuleProperties. # noqa: E501 :rtype: NatGatewayRuleType """ return self._type @type.setter def type(self, type): """Sets the type of this NatGatewayRuleProperties. Type of the NAT Gateway rule. # noqa: E501 :param type: The type of this NatGatewayRuleProperties. # noqa: E501 :type type: NatGatewayRuleType """ self._type = type @property def protocol(self): """Gets the protocol of this NatGatewayRuleProperties. # noqa: E501 Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. # noqa: E501 :return: The protocol of this NatGatewayRuleProperties. # noqa: E501 :rtype: NatGatewayRuleProtocol """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this NatGatewayRuleProperties. Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. # noqa: E501 :param protocol: The protocol of this NatGatewayRuleProperties. # noqa: E501 :type protocol: NatGatewayRuleProtocol """ self._protocol = protocol @property def source_subnet(self): """Gets the source_subnet of this NatGatewayRuleProperties. # noqa: E501 Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. # noqa: E501 :return: The source_subnet of this NatGatewayRuleProperties. # noqa: E501 :rtype: str """ return self._source_subnet @source_subnet.setter def source_subnet(self, source_subnet): """Sets the source_subnet of this NatGatewayRuleProperties. Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. # noqa: E501 :param source_subnet: The source_subnet of this NatGatewayRuleProperties. # noqa: E501 :type source_subnet: str """ if self.local_vars_configuration.client_side_validation and source_subnet is None: # noqa: E501 raise ValueError("Invalid value for `source_subnet`, must not be `None`") # noqa: E501 self._source_subnet = source_subnet @property def public_ip(self): """Gets the public_ip of this NatGatewayRuleProperties. # noqa: E501 Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource # noqa: E501 :return: The public_ip of this NatGatewayRuleProperties. # noqa: E501 :rtype: str """ return self._public_ip @public_ip.setter def public_ip(self, public_ip): """Sets the public_ip of this NatGatewayRuleProperties. Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource # noqa: E501 :param public_ip: The public_ip of this NatGatewayRuleProperties. # noqa: E501 :type public_ip: str """ if self.local_vars_configuration.client_side_validation and public_ip is None: # noqa: E501 raise ValueError("Invalid value for `public_ip`, must not be `None`") # noqa: E501 self._public_ip = public_ip @property def target_subnet(self): """Gets the target_subnet of this NatGatewayRuleProperties. # noqa: E501 Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. # noqa: E501 :return: The target_subnet of this NatGatewayRuleProperties. # noqa: E501 :rtype: str """ return self._target_subnet @target_subnet.setter def target_subnet(self, target_subnet): """Sets the target_subnet of this NatGatewayRuleProperties. Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. # noqa: E501 :param target_subnet: The target_subnet of this NatGatewayRuleProperties. # noqa: E501 :type target_subnet: str """ self._target_subnet = target_subnet @property def target_port_range(self): """Gets the target_port_range of this NatGatewayRuleProperties. # noqa: E501 :return: The target_port_range of this NatGatewayRuleProperties. # noqa: E501 :rtype: TargetPortRange """ return self._target_port_range @target_port_range.setter def target_port_range(self, target_port_range): """Sets the target_port_range of this NatGatewayRuleProperties. :param target_port_range: The target_port_range of this NatGatewayRuleProperties. # noqa: E501 :type target_port_range: TargetPortRange """ self._target_port_range = target_port_range def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRuleProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRuleProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rule_protocol.py0000644000175100001660000000617415046550311024661 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRuleProtocol(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ allowed enum values """ TCP = "TCP" UDP = "UDP" ICMP = "ICMP" ALL = "ALL" allowable_values = [TCP, UDP, ICMP, ALL] # noqa: E501 """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { } attribute_map = { } def __init__(self, local_vars_configuration=None): # noqa: E501 """NatGatewayRuleProtocol - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRuleProtocol): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRuleProtocol): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rule_put.py0000644000175100001660000001375115046550311023627 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRulePut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'NatGatewayRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """NatGatewayRulePut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this NatGatewayRulePut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGatewayRulePut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGatewayRulePut. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGatewayRulePut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGatewayRulePut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGatewayRulePut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGatewayRulePut. The type of object that has been created. # noqa: E501 :param type: The type of this NatGatewayRulePut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGatewayRulePut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGatewayRulePut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGatewayRulePut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGatewayRulePut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this NatGatewayRulePut. # noqa: E501 :return: The properties of this NatGatewayRulePut. # noqa: E501 :rtype: NatGatewayRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NatGatewayRulePut. :param properties: The properties of this NatGatewayRulePut. # noqa: E501 :type properties: NatGatewayRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRulePut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRulePut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rule_type.py0000644000175100001660000000605515046550311023777 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRuleType(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ allowed enum values """ SNAT = "SNAT" allowable_values = [SNAT] # noqa: E501 """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { } attribute_map = { } def __init__(self, local_vars_configuration=None): # noqa: E501 """NatGatewayRuleType - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRuleType): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRuleType): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateway_rules.py0000644000175100001660000001343415046550311023120 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGatewayRules(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[NatGatewayRule]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """NatGatewayRules - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this NatGatewayRules. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGatewayRules. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGatewayRules. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGatewayRules. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGatewayRules. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGatewayRules. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGatewayRules. The type of object that has been created. # noqa: E501 :param type: The type of this NatGatewayRules. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGatewayRules. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGatewayRules. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGatewayRules. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGatewayRules. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this NatGatewayRules. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this NatGatewayRules. # noqa: E501 :rtype: list[NatGatewayRule] """ return self._items @items.setter def items(self, items): """Sets the items of this NatGatewayRules. Array of items in the collection. # noqa: E501 :param items: The items of this NatGatewayRules. # noqa: E501 :type items: list[NatGatewayRule] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGatewayRules): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGatewayRules): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nat_gateways.py0000644000175100001660000001741715046550311022076 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NatGateways(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[NatGateway]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """NatGateways - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this NatGateways. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NatGateways. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NatGateways. The resource's unique identifier. # noqa: E501 :param id: The id of this NatGateways. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NatGateways. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NatGateways. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NatGateways. The type of object that has been created. # noqa: E501 :param type: The type of this NatGateways. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NatGateways. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NatGateways. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NatGateways. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NatGateways. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this NatGateways. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this NatGateways. # noqa: E501 :rtype: list[NatGateway] """ return self._items @items.setter def items(self, items): """Sets the items of this NatGateways. Array of items in the collection. # noqa: E501 :param items: The items of this NatGateways. # noqa: E501 :type items: list[NatGateway] """ self._items = items @property def offset(self): """Gets the offset of this NatGateways. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this NatGateways. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this NatGateways. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this NatGateways. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this NatGateways. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this NatGateways. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this NatGateways. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this NatGateways. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this NatGateways. # noqa: E501 :return: The links of this NatGateways. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this NatGateways. :param links: The links of this NatGateways. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NatGateways): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NatGateways): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer.py0000644000175100001660000001703215046550311023720 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancer(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NetworkLoadBalancerProperties', 'entities': 'NetworkLoadBalancerEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this NetworkLoadBalancer. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancer. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancer. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancer. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancer. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancer. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancer. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancer. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancer. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancer. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancer. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancer. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this NetworkLoadBalancer. # noqa: E501 :return: The metadata of this NetworkLoadBalancer. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this NetworkLoadBalancer. :param metadata: The metadata of this NetworkLoadBalancer. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this NetworkLoadBalancer. # noqa: E501 :return: The properties of this NetworkLoadBalancer. # noqa: E501 :rtype: NetworkLoadBalancerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NetworkLoadBalancer. :param properties: The properties of this NetworkLoadBalancer. # noqa: E501 :type properties: NetworkLoadBalancerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this NetworkLoadBalancer. # noqa: E501 :return: The entities of this NetworkLoadBalancer. # noqa: E501 :rtype: NetworkLoadBalancerEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this NetworkLoadBalancer. :param entities: The entities of this NetworkLoadBalancer. # noqa: E501 :type entities: NetworkLoadBalancerEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancer): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancer): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_entities.py0000644000175100001660000001123215046550311025620 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'flowlogs': 'FlowLogs', 'forwardingrules': 'NetworkLoadBalancerForwardingRules', } attribute_map = { 'flowlogs': 'flowlogs', 'forwardingrules': 'forwardingrules', } def __init__(self, flowlogs=None, forwardingrules=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._flowlogs = None self._forwardingrules = None self.discriminator = None if flowlogs is not None: self.flowlogs = flowlogs if forwardingrules is not None: self.forwardingrules = forwardingrules @property def flowlogs(self): """Gets the flowlogs of this NetworkLoadBalancerEntities. # noqa: E501 :return: The flowlogs of this NetworkLoadBalancerEntities. # noqa: E501 :rtype: FlowLogs """ return self._flowlogs @flowlogs.setter def flowlogs(self, flowlogs): """Sets the flowlogs of this NetworkLoadBalancerEntities. :param flowlogs: The flowlogs of this NetworkLoadBalancerEntities. # noqa: E501 :type flowlogs: FlowLogs """ self._flowlogs = flowlogs @property def forwardingrules(self): """Gets the forwardingrules of this NetworkLoadBalancerEntities. # noqa: E501 :return: The forwardingrules of this NetworkLoadBalancerEntities. # noqa: E501 :rtype: NetworkLoadBalancerForwardingRules """ return self._forwardingrules @forwardingrules.setter def forwardingrules(self, forwardingrules): """Sets the forwardingrules of this NetworkLoadBalancerEntities. :param forwardingrules: The forwardingrules of this NetworkLoadBalancerEntities. # noqa: E501 :type forwardingrules: NetworkLoadBalancerForwardingRules """ self._forwardingrules = forwardingrules def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule.py0000644000175100001660000001622415046550311027173 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NetworkLoadBalancerForwardingRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this NetworkLoadBalancerForwardingRule. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancerForwardingRule. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancerForwardingRule. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancerForwardingRule. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancerForwardingRule. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancerForwardingRule. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancerForwardingRule. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancerForwardingRule. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancerForwardingRule. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancerForwardingRule. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancerForwardingRule. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancerForwardingRule. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this NetworkLoadBalancerForwardingRule. # noqa: E501 :return: The metadata of this NetworkLoadBalancerForwardingRule. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this NetworkLoadBalancerForwardingRule. :param metadata: The metadata of this NetworkLoadBalancerForwardingRule. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this NetworkLoadBalancerForwardingRule. # noqa: E501 :return: The properties of this NetworkLoadBalancerForwardingRule. # noqa: E501 :rtype: NetworkLoadBalancerForwardingRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NetworkLoadBalancerForwardingRule. :param properties: The properties of this NetworkLoadBalancerForwardingRule. # noqa: E501 :type properties: NetworkLoadBalancerForwardingRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRule): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRule): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule_health_check.py0000644000175100001660000001724015046550311031654 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRuleHealthCheck(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'client_timeout': 'int', 'connect_timeout': 'int', 'target_timeout': 'int', 'retries': 'int', } attribute_map = { 'client_timeout': 'clientTimeout', 'connect_timeout': 'connectTimeout', 'target_timeout': 'targetTimeout', 'retries': 'retries', } def __init__(self, client_timeout=None, connect_timeout=None, target_timeout=None, retries=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRuleHealthCheck - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._client_timeout = None self._connect_timeout = None self._target_timeout = None self._retries = None self.discriminator = None if client_timeout is not None: self.client_timeout = client_timeout if connect_timeout is not None: self.connect_timeout = connect_timeout if target_timeout is not None: self.target_timeout = target_timeout if retries is not None: self.retries = retries @property def client_timeout(self): """Gets the client_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). # noqa: E501 :return: The client_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :rtype: int """ return self._client_timeout @client_timeout.setter def client_timeout(self, client_timeout): """Sets the client_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). # noqa: E501 :param client_timeout: The client_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :type client_timeout: int """ self._client_timeout = client_timeout @property def connect_timeout(self): """Gets the connect_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). # noqa: E501 :return: The connect_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :rtype: int """ return self._connect_timeout @connect_timeout.setter def connect_timeout(self, connect_timeout): """Sets the connect_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). # noqa: E501 :param connect_timeout: The connect_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :type connect_timeout: int """ self._connect_timeout = connect_timeout @property def target_timeout(self): """Gets the target_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). # noqa: E501 :return: The target_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :rtype: int """ return self._target_timeout @target_timeout.setter def target_timeout(self, target_timeout): """Sets the target_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). # noqa: E501 :param target_timeout: The target_timeout of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :type target_timeout: int """ self._target_timeout = target_timeout @property def retries(self): """Gets the retries of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535 and default is three reconnection attempts. # noqa: E501 :return: The retries of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :rtype: int """ return self._retries @retries.setter def retries(self, retries): """Sets the retries of this NetworkLoadBalancerForwardingRuleHealthCheck. The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535 and default is three reconnection attempts. # noqa: E501 :param retries: The retries of this NetworkLoadBalancerForwardingRuleHealthCheck. # noqa: E501 :type retries: int """ self._retries = retries def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleHealthCheck): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleHealthCheck): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule_properties.py0000644000175100001660000002630315046550311031446 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRuleProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'algorithm': 'str', 'protocol': 'str', 'listener_ip': 'str', 'listener_port': 'int', 'health_check': 'NetworkLoadBalancerForwardingRuleHealthCheck', 'targets': 'list[NetworkLoadBalancerForwardingRuleTarget]', } attribute_map = { 'name': 'name', 'algorithm': 'algorithm', 'protocol': 'protocol', 'listener_ip': 'listenerIp', 'listener_port': 'listenerPort', 'health_check': 'healthCheck', 'targets': 'targets', } def __init__(self, name=None, algorithm=None, protocol=None, listener_ip=None, listener_port=None, health_check=None, targets=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRuleProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._algorithm = None self._protocol = None self._listener_ip = None self._listener_port = None self._health_check = None self._targets = None self.discriminator = None self.name = name self.algorithm = algorithm self.protocol = protocol self.listener_ip = listener_ip self.listener_port = listener_port if health_check is not None: self.health_check = health_check self.targets = targets @property def name(self): """Gets the name of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 The name of the Network Load Balancer forwarding rule. # noqa: E501 :return: The name of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NetworkLoadBalancerForwardingRuleProperties. The name of the Network Load Balancer forwarding rule. # noqa: E501 :param name: The name of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def algorithm(self): """Gets the algorithm of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 Balancing algorithm # noqa: E501 :return: The algorithm of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._algorithm @algorithm.setter def algorithm(self, algorithm): """Sets the algorithm of this NetworkLoadBalancerForwardingRuleProperties. Balancing algorithm # noqa: E501 :param algorithm: The algorithm of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type algorithm: str """ if self.local_vars_configuration.client_side_validation and algorithm is None: # noqa: E501 raise ValueError("Invalid value for `algorithm`, must not be `None`") # noqa: E501 allowed_values = ["ROUND_ROBIN", "LEAST_CONNECTION", "RANDOM", "SOURCE_IP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and algorithm not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `algorithm` ({0}), must be one of {1}" # noqa: E501 .format(algorithm, allowed_values) ) self._algorithm = algorithm @property def protocol(self): """Gets the protocol of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 Balancing protocol # noqa: E501 :return: The protocol of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this NetworkLoadBalancerForwardingRuleProperties. Balancing protocol # noqa: E501 :param protocol: The protocol of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type protocol: str """ if self.local_vars_configuration.client_side_validation and protocol is None: # noqa: E501 raise ValueError("Invalid value for `protocol`, must not be `None`") # noqa: E501 allowed_values = ["HTTP", "TCP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol @property def listener_ip(self): """Gets the listener_ip of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 Listening (inbound) IP. # noqa: E501 :return: The listener_ip of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: str """ return self._listener_ip @listener_ip.setter def listener_ip(self, listener_ip): """Sets the listener_ip of this NetworkLoadBalancerForwardingRuleProperties. Listening (inbound) IP. # noqa: E501 :param listener_ip: The listener_ip of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type listener_ip: str """ if self.local_vars_configuration.client_side_validation and listener_ip is None: # noqa: E501 raise ValueError("Invalid value for `listener_ip`, must not be `None`") # noqa: E501 self._listener_ip = listener_ip @property def listener_port(self): """Gets the listener_port of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 Listening (inbound) port number; valid range is 1 to 65535. # noqa: E501 :return: The listener_port of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: int """ return self._listener_port @listener_port.setter def listener_port(self, listener_port): """Sets the listener_port of this NetworkLoadBalancerForwardingRuleProperties. Listening (inbound) port number; valid range is 1 to 65535. # noqa: E501 :param listener_port: The listener_port of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type listener_port: int """ if self.local_vars_configuration.client_side_validation and listener_port is None: # noqa: E501 raise ValueError("Invalid value for `listener_port`, must not be `None`") # noqa: E501 self._listener_port = listener_port @property def health_check(self): """Gets the health_check of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :return: The health_check of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: NetworkLoadBalancerForwardingRuleHealthCheck """ return self._health_check @health_check.setter def health_check(self, health_check): """Sets the health_check of this NetworkLoadBalancerForwardingRuleProperties. :param health_check: The health_check of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type health_check: NetworkLoadBalancerForwardingRuleHealthCheck """ self._health_check = health_check @property def targets(self): """Gets the targets of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The targets of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :rtype: list[NetworkLoadBalancerForwardingRuleTarget] """ return self._targets @targets.setter def targets(self, targets): """Sets the targets of this NetworkLoadBalancerForwardingRuleProperties. Array of items in the collection. # noqa: E501 :param targets: The targets of this NetworkLoadBalancerForwardingRuleProperties. # noqa: E501 :type targets: list[NetworkLoadBalancerForwardingRuleTarget] """ if self.local_vars_configuration.client_side_validation and targets is None: # noqa: E501 raise ValueError("Invalid value for `targets`, must not be `None`") # noqa: E501 self._targets = targets def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule_put.py0000644000175100001660000001463615046550311030070 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRulePut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'NetworkLoadBalancerForwardingRuleProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRulePut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancerForwardingRulePut. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancerForwardingRulePut. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancerForwardingRulePut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :return: The properties of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :rtype: NetworkLoadBalancerForwardingRuleProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NetworkLoadBalancerForwardingRulePut. :param properties: The properties of this NetworkLoadBalancerForwardingRulePut. # noqa: E501 :type properties: NetworkLoadBalancerForwardingRuleProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRulePut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRulePut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule_target.py0000644000175100001660000002171215046550311030537 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRuleTarget(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ip': 'str', 'port': 'int', 'weight': 'int', 'proxy_protocol': 'str', 'health_check': 'NetworkLoadBalancerForwardingRuleTargetHealthCheck', } attribute_map = { 'ip': 'ip', 'port': 'port', 'weight': 'weight', 'proxy_protocol': 'proxyProtocol', 'health_check': 'healthCheck', } def __init__(self, ip=None, port=None, weight=None, proxy_protocol='none', health_check=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRuleTarget - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ip = None self._port = None self._weight = None self._proxy_protocol = None self._health_check = None self.discriminator = None self.ip = ip self.port = port self.weight = weight if proxy_protocol is not None: self.proxy_protocol = proxy_protocol if health_check is not None: self.health_check = health_check @property def ip(self): """Gets the ip of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 The IP of the balanced target VM. # noqa: E501 :return: The ip of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :rtype: str """ return self._ip @ip.setter def ip(self, ip): """Sets the ip of this NetworkLoadBalancerForwardingRuleTarget. The IP of the balanced target VM. # noqa: E501 :param ip: The ip of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :type ip: str """ if self.local_vars_configuration.client_side_validation and ip is None: # noqa: E501 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501 self._ip = ip @property def port(self): """Gets the port of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 The port of the balanced target service; valid range is 1 to 65535. # noqa: E501 :return: The port of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :rtype: int """ return self._port @port.setter def port(self, port): """Sets the port of this NetworkLoadBalancerForwardingRuleTarget. The port of the balanced target service; valid range is 1 to 65535. # noqa: E501 :param port: The port of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :type port: int """ if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 self._port = port @property def weight(self): """Gets the weight of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1. Targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best to assign weights in the middle of the range to leave room for later adjustments. # noqa: E501 :return: The weight of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :rtype: int """ return self._weight @weight.setter def weight(self, weight): """Sets the weight of this NetworkLoadBalancerForwardingRuleTarget. Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1. Targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best to assign weights in the middle of the range to leave room for later adjustments. # noqa: E501 :param weight: The weight of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :type weight: int """ if self.local_vars_configuration.client_side_validation and weight is None: # noqa: E501 raise ValueError("Invalid value for `weight`, must not be `None`") # noqa: E501 self._weight = weight @property def proxy_protocol(self): """Gets the proxy_protocol of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 Proxy protocol version. # noqa: E501 :return: The proxy_protocol of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :rtype: str """ return self._proxy_protocol @proxy_protocol.setter def proxy_protocol(self, proxy_protocol): """Sets the proxy_protocol of this NetworkLoadBalancerForwardingRuleTarget. Proxy protocol version. # noqa: E501 :param proxy_protocol: The proxy_protocol of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :type proxy_protocol: str """ allowed_values = ["none", "v1", "v2", "v2ssl"] # noqa: E501 if self.local_vars_configuration.client_side_validation and proxy_protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `proxy_protocol` ({0}), must be one of {1}" # noqa: E501 .format(proxy_protocol, allowed_values) ) self._proxy_protocol = proxy_protocol @property def health_check(self): """Gets the health_check of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :return: The health_check of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :rtype: NetworkLoadBalancerForwardingRuleTargetHealthCheck """ return self._health_check @health_check.setter def health_check(self, health_check): """Sets the health_check of this NetworkLoadBalancerForwardingRuleTarget. :param health_check: The health_check of this NetworkLoadBalancerForwardingRuleTarget. # noqa: E501 :type health_check: NetworkLoadBalancerForwardingRuleTargetHealthCheck """ self._health_check = health_check def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleTarget): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleTarget): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rule_target_health_check.py0000644000175100001660000001500615046550311033220 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRuleTargetHealthCheck(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'check': 'bool', 'check_interval': 'int', 'maintenance': 'bool', } attribute_map = { 'check': 'check', 'check_interval': 'checkInterval', 'maintenance': 'maintenance', } def __init__(self, check=None, check_interval=None, maintenance=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRuleTargetHealthCheck - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._check = None self._check_interval = None self._maintenance = None self.discriminator = None if check is not None: self.check = check if check_interval is not None: self.check_interval = check_interval if maintenance is not None: self.maintenance = maintenance @property def check(self): """Gets the check of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. # noqa: E501 :return: The check of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :rtype: bool """ return self._check @check.setter def check(self, check): """Sets the check of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. # noqa: E501 :param check: The check of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :type check: bool """ self._check = check @property def check_interval(self): """Gets the check_interval of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 The interval in milliseconds between consecutive health checks; default is 2000. # noqa: E501 :return: The check_interval of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :rtype: int """ return self._check_interval @check_interval.setter def check_interval(self, check_interval): """Sets the check_interval of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. The interval in milliseconds between consecutive health checks; default is 2000. # noqa: E501 :param check_interval: The check_interval of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :type check_interval: int """ self._check_interval = check_interval @property def maintenance(self): """Gets the maintenance of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 Maintenance mode prevents the target from receiving balanced traffic. # noqa: E501 :return: The maintenance of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :rtype: bool """ return self._maintenance @maintenance.setter def maintenance(self, maintenance): """Sets the maintenance of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. Maintenance mode prevents the target from receiving balanced traffic. # noqa: E501 :param maintenance: The maintenance of this NetworkLoadBalancerForwardingRuleTargetHealthCheck. # noqa: E501 :type maintenance: bool """ self._maintenance = maintenance def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleTargetHealthCheck): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRuleTargetHealthCheck): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_forwarding_rules.py0000644000175100001660000002106415046550311027354 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerForwardingRules(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[NetworkLoadBalancerForwardingRule]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerForwardingRules - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this NetworkLoadBalancerForwardingRules. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancerForwardingRules. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancerForwardingRules. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancerForwardingRules. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancerForwardingRules. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancerForwardingRules. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this NetworkLoadBalancerForwardingRules. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: list[NetworkLoadBalancerForwardingRule] """ return self._items @items.setter def items(self, items): """Sets the items of this NetworkLoadBalancerForwardingRules. Array of items in the collection. # noqa: E501 :param items: The items of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type items: list[NetworkLoadBalancerForwardingRule] """ self._items = items @property def offset(self): """Gets the offset of this NetworkLoadBalancerForwardingRules. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this NetworkLoadBalancerForwardingRules. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this NetworkLoadBalancerForwardingRules. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this NetworkLoadBalancerForwardingRules. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this NetworkLoadBalancerForwardingRules. # noqa: E501 :return: The links of this NetworkLoadBalancerForwardingRules. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this NetworkLoadBalancerForwardingRules. :param links: The links of this NetworkLoadBalancerForwardingRules. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerForwardingRules): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerForwardingRules): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_properties.py0000644000175100001660000002454615046550311026204 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'listener_lan': 'int', 'ips': 'list[str]', 'target_lan': 'int', 'lb_private_ips': 'list[str]', 'central_logging': 'bool', 'logging_format': 'str', } attribute_map = { 'name': 'name', 'listener_lan': 'listenerLan', 'ips': 'ips', 'target_lan': 'targetLan', 'lb_private_ips': 'lbPrivateIps', 'central_logging': 'centralLogging', 'logging_format': 'loggingFormat', } def __init__(self, name=None, listener_lan=None, ips=None, target_lan=None, lb_private_ips=None, central_logging=None, logging_format=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._listener_lan = None self._ips = None self._target_lan = None self._lb_private_ips = None self._central_logging = None self._logging_format = None self.discriminator = None self.name = name self.listener_lan = listener_lan if ips is not None: self.ips = ips self.target_lan = target_lan if lb_private_ips is not None: self.lb_private_ips = lb_private_ips if central_logging is not None: self.central_logging = central_logging if logging_format is not None: self.logging_format = logging_format @property def name(self): """Gets the name of this NetworkLoadBalancerProperties. # noqa: E501 The name of the Network Load Balancer. # noqa: E501 :return: The name of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NetworkLoadBalancerProperties. The name of the Network Load Balancer. # noqa: E501 :param name: The name of this NetworkLoadBalancerProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def listener_lan(self): """Gets the listener_lan of this NetworkLoadBalancerProperties. # noqa: E501 ID of the listening LAN (inbound). # noqa: E501 :return: The listener_lan of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: int """ return self._listener_lan @listener_lan.setter def listener_lan(self, listener_lan): """Sets the listener_lan of this NetworkLoadBalancerProperties. ID of the listening LAN (inbound). # noqa: E501 :param listener_lan: The listener_lan of this NetworkLoadBalancerProperties. # noqa: E501 :type listener_lan: int """ if self.local_vars_configuration.client_side_validation and listener_lan is None: # noqa: E501 raise ValueError("Invalid value for `listener_lan`, must not be `None`") # noqa: E501 self._listener_lan = listener_lan @property def ips(self): """Gets the ips of this NetworkLoadBalancerProperties. # noqa: E501 Collection of the Network Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan must be customer-reserved IPs for public Load Balancers, and private IPs for private Load Balancers. # noqa: E501 :return: The ips of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: list[str] """ return self._ips @ips.setter def ips(self, ips): """Sets the ips of this NetworkLoadBalancerProperties. Collection of the Network Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan must be customer-reserved IPs for public Load Balancers, and private IPs for private Load Balancers. # noqa: E501 :param ips: The ips of this NetworkLoadBalancerProperties. # noqa: E501 :type ips: list[str] """ self._ips = ips @property def target_lan(self): """Gets the target_lan of this NetworkLoadBalancerProperties. # noqa: E501 ID of the balanced private target LAN (outbound). # noqa: E501 :return: The target_lan of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: int """ return self._target_lan @target_lan.setter def target_lan(self, target_lan): """Sets the target_lan of this NetworkLoadBalancerProperties. ID of the balanced private target LAN (outbound). # noqa: E501 :param target_lan: The target_lan of this NetworkLoadBalancerProperties. # noqa: E501 :type target_lan: int """ if self.local_vars_configuration.client_side_validation and target_lan is None: # noqa: E501 raise ValueError("Invalid value for `target_lan`, must not be `None`") # noqa: E501 self._target_lan = target_lan @property def lb_private_ips(self): """Gets the lb_private_ips of this NetworkLoadBalancerProperties. # noqa: E501 Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :return: The lb_private_ips of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: list[str] """ return self._lb_private_ips @lb_private_ips.setter def lb_private_ips(self, lb_private_ips): """Sets the lb_private_ips of this NetworkLoadBalancerProperties. Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. # noqa: E501 :param lb_private_ips: The lb_private_ips of this NetworkLoadBalancerProperties. # noqa: E501 :type lb_private_ips: list[str] """ self._lb_private_ips = lb_private_ips @property def central_logging(self): """Gets the central_logging of this NetworkLoadBalancerProperties. # noqa: E501 Turn logging on and off for this product. Default value is 'false'. # noqa: E501 :return: The central_logging of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: bool """ return self._central_logging @central_logging.setter def central_logging(self, central_logging): """Sets the central_logging of this NetworkLoadBalancerProperties. Turn logging on and off for this product. Default value is 'false'. # noqa: E501 :param central_logging: The central_logging of this NetworkLoadBalancerProperties. # noqa: E501 :type central_logging: bool """ self._central_logging = central_logging @property def logging_format(self): """Gets the logging_format of this NetworkLoadBalancerProperties. # noqa: E501 Specifies the format of the logs. # noqa: E501 :return: The logging_format of this NetworkLoadBalancerProperties. # noqa: E501 :rtype: str """ return self._logging_format @logging_format.setter def logging_format(self, logging_format): """Sets the logging_format of this NetworkLoadBalancerProperties. Specifies the format of the logs. # noqa: E501 :param logging_format: The logging_format of this NetworkLoadBalancerProperties. # noqa: E501 :type logging_format: str """ self._logging_format = logging_format def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancer_put.py0000644000175100001660000001413415046550311024610 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancerPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'NetworkLoadBalancerProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancerPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this NetworkLoadBalancerPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancerPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancerPut. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancerPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancerPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancerPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancerPut. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancerPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancerPut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancerPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancerPut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancerPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this NetworkLoadBalancerPut. # noqa: E501 :return: The properties of this NetworkLoadBalancerPut. # noqa: E501 :rtype: NetworkLoadBalancerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NetworkLoadBalancerPut. :param properties: The properties of this NetworkLoadBalancerPut. # noqa: E501 :type properties: NetworkLoadBalancerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancerPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancerPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/network_load_balancers.py0000644000175100001660000002011215046550311024074 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NetworkLoadBalancers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[NetworkLoadBalancer]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """NetworkLoadBalancers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this NetworkLoadBalancers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NetworkLoadBalancers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NetworkLoadBalancers. The resource's unique identifier. # noqa: E501 :param id: The id of this NetworkLoadBalancers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NetworkLoadBalancers. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NetworkLoadBalancers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NetworkLoadBalancers. The type of object that has been created. # noqa: E501 :param type: The type of this NetworkLoadBalancers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NetworkLoadBalancers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NetworkLoadBalancers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NetworkLoadBalancers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NetworkLoadBalancers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this NetworkLoadBalancers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this NetworkLoadBalancers. # noqa: E501 :rtype: list[NetworkLoadBalancer] """ return self._items @items.setter def items(self, items): """Sets the items of this NetworkLoadBalancers. Array of items in the collection. # noqa: E501 :param items: The items of this NetworkLoadBalancers. # noqa: E501 :type items: list[NetworkLoadBalancer] """ self._items = items @property def offset(self): """Gets the offset of this NetworkLoadBalancers. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this NetworkLoadBalancers. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this NetworkLoadBalancers. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this NetworkLoadBalancers. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this NetworkLoadBalancers. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this NetworkLoadBalancers. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this NetworkLoadBalancers. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this NetworkLoadBalancers. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this NetworkLoadBalancers. # noqa: E501 :return: The links of this NetworkLoadBalancers. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this NetworkLoadBalancers. :param links: The links of this NetworkLoadBalancers. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NetworkLoadBalancers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NetworkLoadBalancers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nic.py0000644000175100001660000001577215046550311020163 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Nic(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NicProperties', 'entities': 'NicEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Nic - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Nic. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Nic. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Nic. The resource's unique identifier. # noqa: E501 :param id: The id of this Nic. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Nic. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Nic. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Nic. The type of object that has been created. # noqa: E501 :param type: The type of this Nic. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Nic. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Nic. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Nic. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Nic. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Nic. # noqa: E501 :return: The metadata of this Nic. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Nic. :param metadata: The metadata of this Nic. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Nic. # noqa: E501 :return: The properties of this Nic. # noqa: E501 :rtype: NicProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Nic. :param properties: The properties of this Nic. # noqa: E501 :type properties: NicProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Nic. # noqa: E501 :return: The entities of this Nic. # noqa: E501 :rtype: NicEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Nic. :param entities: The entities of this Nic. # noqa: E501 :type entities: NicEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Nic): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Nic): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nic_entities.py0000644000175100001660000001225015046550311022053 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NicEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'flowlogs': 'FlowLogs', 'firewallrules': 'FirewallRules', 'securitygroups': 'SecurityGroups', } attribute_map = { 'flowlogs': 'flowlogs', 'firewallrules': 'firewallrules', 'securitygroups': 'securitygroups', } def __init__(self, flowlogs=None, firewallrules=None, securitygroups=None, local_vars_configuration=None): # noqa: E501 """NicEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._flowlogs = None self._firewallrules = None self._securitygroups = None self.discriminator = None if flowlogs is not None: self.flowlogs = flowlogs if firewallrules is not None: self.firewallrules = firewallrules if securitygroups is not None: self.securitygroups = securitygroups @property def flowlogs(self): """Gets the flowlogs of this NicEntities. # noqa: E501 :return: The flowlogs of this NicEntities. # noqa: E501 :rtype: FlowLogs """ return self._flowlogs @flowlogs.setter def flowlogs(self, flowlogs): """Sets the flowlogs of this NicEntities. :param flowlogs: The flowlogs of this NicEntities. # noqa: E501 :type flowlogs: FlowLogs """ self._flowlogs = flowlogs @property def firewallrules(self): """Gets the firewallrules of this NicEntities. # noqa: E501 :return: The firewallrules of this NicEntities. # noqa: E501 :rtype: FirewallRules """ return self._firewallrules @firewallrules.setter def firewallrules(self, firewallrules): """Sets the firewallrules of this NicEntities. :param firewallrules: The firewallrules of this NicEntities. # noqa: E501 :type firewallrules: FirewallRules """ self._firewallrules = firewallrules @property def securitygroups(self): """Gets the securitygroups of this NicEntities. # noqa: E501 :return: The securitygroups of this NicEntities. # noqa: E501 :rtype: SecurityGroups """ return self._securitygroups @securitygroups.setter def securitygroups(self, securitygroups): """Sets the securitygroups of this NicEntities. :param securitygroups: The securitygroups of this NicEntities. # noqa: E501 :type securitygroups: SecurityGroups """ self._securitygroups = securitygroups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NicEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NicEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nic_properties.py0000644000175100001660000004044715046550311022434 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NicProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'mac': 'str', 'ips': 'list[str]', 'dhcp': 'bool', 'ipv6_ips': 'list[str]', 'ipv6_cidr_block': 'str', 'dhcpv6': 'bool', 'lan': 'int', 'firewall_active': 'bool', 'firewall_type': 'str', 'device_number': 'int', 'pci_slot': 'int', } attribute_map = { 'name': 'name', 'mac': 'mac', 'ips': 'ips', 'dhcp': 'dhcp', 'ipv6_ips': 'ipv6Ips', 'ipv6_cidr_block': 'ipv6CidrBlock', 'dhcpv6': 'dhcpv6', 'lan': 'lan', 'firewall_active': 'firewallActive', 'firewall_type': 'firewallType', 'device_number': 'deviceNumber', 'pci_slot': 'pciSlot', } def __init__(self, name=None, mac=None, ips=None, dhcp=True, ipv6_ips=None, ipv6_cidr_block=None, dhcpv6=None, lan=None, firewall_active=None, firewall_type=None, device_number=None, pci_slot=None, local_vars_configuration=None): # noqa: E501 """NicProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._mac = None self._ips = None self._dhcp = None self._ipv6_ips = None self._ipv6_cidr_block = None self._dhcpv6 = None self._lan = None self._firewall_active = None self._firewall_type = None self._device_number = None self._pci_slot = None self.discriminator = None if name is not None: self.name = name if mac is not None: self.mac = mac self.ips = ips if dhcp is not None: self.dhcp = dhcp self.ipv6_ips = ipv6_ips self.ipv6_cidr_block = ipv6_cidr_block self.dhcpv6 = dhcpv6 self.lan = lan if firewall_active is not None: self.firewall_active = firewall_active if firewall_type is not None: self.firewall_type = firewall_type if device_number is not None: self.device_number = device_number if pci_slot is not None: self.pci_slot = pci_slot @property def name(self): """Gets the name of this NicProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this NicProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NicProperties. The name of the resource. # noqa: E501 :param name: The name of this NicProperties. # noqa: E501 :type name: str """ self._name = name @property def mac(self): """Gets the mac of this NicProperties. # noqa: E501 The MAC address of the NIC. # noqa: E501 :return: The mac of this NicProperties. # noqa: E501 :rtype: str """ return self._mac @mac.setter def mac(self, mac): """Sets the mac of this NicProperties. The MAC address of the NIC. # noqa: E501 :param mac: The mac of this NicProperties. # noqa: E501 :type mac: str """ self._mac = mac @property def ips(self): """Gets the ips of this NicProperties. # noqa: E501 Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. # noqa: E501 :return: The ips of this NicProperties. # noqa: E501 :rtype: list[str] """ return self._ips @ips.setter def ips(self, ips): """Sets the ips of this NicProperties. Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. # noqa: E501 :param ips: The ips of this NicProperties. # noqa: E501 :type ips: list[str] """ self._ips = ips @property def dhcp(self): """Gets the dhcp of this NicProperties. # noqa: E501 Indicates if the NIC will reserve an IP using DHCP. # noqa: E501 :return: The dhcp of this NicProperties. # noqa: E501 :rtype: bool """ return self._dhcp @dhcp.setter def dhcp(self, dhcp): """Sets the dhcp of this NicProperties. Indicates if the NIC will reserve an IP using DHCP. # noqa: E501 :param dhcp: The dhcp of this NicProperties. # noqa: E501 :type dhcp: bool """ self._dhcp = dhcp @property def ipv6_ips(self): """Gets the ipv6_ips of this NicProperties. # noqa: E501 If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. # noqa: E501 :return: The ipv6_ips of this NicProperties. # noqa: E501 :rtype: list[str] """ return self._ipv6_ips @ipv6_ips.setter def ipv6_ips(self, ipv6_ips): """Sets the ipv6_ips of this NicProperties. If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. # noqa: E501 :param ipv6_ips: The ipv6_ips of this NicProperties. # noqa: E501 :type ipv6_ips: list[str] """ self._ipv6_ips = ipv6_ips @property def ipv6_cidr_block(self): """Gets the ipv6_cidr_block of this NicProperties. # noqa: E501 If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. # noqa: E501 :return: The ipv6_cidr_block of this NicProperties. # noqa: E501 :rtype: str """ return self._ipv6_cidr_block @ipv6_cidr_block.setter def ipv6_cidr_block(self, ipv6_cidr_block): """Sets the ipv6_cidr_block of this NicProperties. If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. # noqa: E501 :param ipv6_cidr_block: The ipv6_cidr_block of this NicProperties. # noqa: E501 :type ipv6_cidr_block: str """ self._ipv6_cidr_block = ipv6_cidr_block @property def dhcpv6(self): """Gets the dhcpv6 of this NicProperties. # noqa: E501 Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. # noqa: E501 :return: The dhcpv6 of this NicProperties. # noqa: E501 :rtype: bool """ return self._dhcpv6 @dhcpv6.setter def dhcpv6(self, dhcpv6): """Sets the dhcpv6 of this NicProperties. Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. # noqa: E501 :param dhcpv6: The dhcpv6 of this NicProperties. # noqa: E501 :type dhcpv6: bool """ self._dhcpv6 = dhcpv6 @property def lan(self): """Gets the lan of this NicProperties. # noqa: E501 The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. # noqa: E501 :return: The lan of this NicProperties. # noqa: E501 :rtype: int """ return self._lan @lan.setter def lan(self, lan): """Sets the lan of this NicProperties. The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. # noqa: E501 :param lan: The lan of this NicProperties. # noqa: E501 :type lan: int """ if self.local_vars_configuration.client_side_validation and lan is None: # noqa: E501 raise ValueError("Invalid value for `lan`, must not be `None`") # noqa: E501 self._lan = lan @property def firewall_active(self): """Gets the firewall_active of this NicProperties. # noqa: E501 Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. # noqa: E501 :return: The firewall_active of this NicProperties. # noqa: E501 :rtype: bool """ return self._firewall_active @firewall_active.setter def firewall_active(self, firewall_active): """Sets the firewall_active of this NicProperties. Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. # noqa: E501 :param firewall_active: The firewall_active of this NicProperties. # noqa: E501 :type firewall_active: bool """ self._firewall_active = firewall_active @property def firewall_type(self): """Gets the firewall_type of this NicProperties. # noqa: E501 The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. # noqa: E501 :return: The firewall_type of this NicProperties. # noqa: E501 :rtype: str """ return self._firewall_type @firewall_type.setter def firewall_type(self, firewall_type): """Sets the firewall_type of this NicProperties. The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. # noqa: E501 :param firewall_type: The firewall_type of this NicProperties. # noqa: E501 :type firewall_type: str """ allowed_values = ["INGRESS", "EGRESS", "BIDIRECTIONAL"] # noqa: E501 if self.local_vars_configuration.client_side_validation and firewall_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `firewall_type` ({0}), must be one of {1}" # noqa: E501 .format(firewall_type, allowed_values) ) self._firewall_type = firewall_type @property def device_number(self): """Gets the device_number of this NicProperties. # noqa: E501 The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. # noqa: E501 :return: The device_number of this NicProperties. # noqa: E501 :rtype: int """ return self._device_number @device_number.setter def device_number(self, device_number): """Sets the device_number of this NicProperties. The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. # noqa: E501 :param device_number: The device_number of this NicProperties. # noqa: E501 :type device_number: int """ self._device_number = device_number @property def pci_slot(self): """Gets the pci_slot of this NicProperties. # noqa: E501 The PCI slot number for the NIC. # noqa: E501 :return: The pci_slot of this NicProperties. # noqa: E501 :rtype: int """ return self._pci_slot @pci_slot.setter def pci_slot(self, pci_slot): """Sets the pci_slot of this NicProperties. The PCI slot number for the NIC. # noqa: E501 :param pci_slot: The pci_slot of this NicProperties. # noqa: E501 :type pci_slot: int """ self._pci_slot = pci_slot def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NicProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NicProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nic_put.py0000644000175100001660000001335415046550311021045 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NicPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'NicProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """NicPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this NicPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this NicPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NicPut. The resource's unique identifier. # noqa: E501 :param id: The id of this NicPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this NicPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this NicPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this NicPut. The type of object that has been created. # noqa: E501 :param type: The type of this NicPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this NicPut. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this NicPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this NicPut. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this NicPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this NicPut. # noqa: E501 :return: The properties of this NicPut. # noqa: E501 :rtype: NicProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this NicPut. :param properties: The properties of this NicPut. # noqa: E501 :type properties: NicProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NicPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NicPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/nics.py0000644000175100001660000001703215046550311020335 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Nics(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Nic]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Nics - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Nics. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Nics. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Nics. The resource's unique identifier. # noqa: E501 :param id: The id of this Nics. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Nics. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Nics. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Nics. The type of object that has been created. # noqa: E501 :param type: The type of this Nics. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Nics. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Nics. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Nics. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Nics. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Nics. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Nics. # noqa: E501 :rtype: list[Nic] """ return self._items @items.setter def items(self, items): """Sets the items of this Nics. Array of items in the collection. # noqa: E501 :param items: The items of this Nics. # noqa: E501 :type items: list[Nic] """ self._items = items @property def offset(self): """Gets the offset of this Nics. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Nics. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Nics. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Nics. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Nics. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Nics. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Nics. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Nics. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Nics. # noqa: E501 :return: The links of this Nics. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Nics. :param links: The links of this Nics. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Nics): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Nics): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/no_state_meta_data.py0000644000175100001660000002341215046550311023213 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class NoStateMetaData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'etag': 'str', 'created_date': 'datetime', 'created_by': 'str', 'created_by_user_id': 'str', 'last_modified_date': 'datetime', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', } attribute_map = { 'etag': 'etag', 'created_date': 'createdDate', 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'last_modified_date': 'lastModifiedDate', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', } def __init__(self, etag=None, created_date=None, created_by=None, created_by_user_id=None, last_modified_date=None, last_modified_by=None, last_modified_by_user_id=None, local_vars_configuration=None): # noqa: E501 """NoStateMetaData - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._etag = None self._created_date = None self._created_by = None self._created_by_user_id = None self._last_modified_date = None self._last_modified_by = None self._last_modified_by_user_id = None self.discriminator = None if etag is not None: self.etag = etag if created_date is not None: self.created_date = created_date if created_by is not None: self.created_by = created_by if created_by_user_id is not None: self.created_by_user_id = created_by_user_id if last_modified_date is not None: self.last_modified_date = last_modified_date if last_modified_by is not None: self.last_modified_by = last_modified_by if last_modified_by_user_id is not None: self.last_modified_by_user_id = last_modified_by_user_id @property def etag(self): """Gets the etag of this NoStateMetaData. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this NoStateMetaData. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this NoStateMetaData. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this NoStateMetaData. # noqa: E501 :type etag: str """ self._etag = etag @property def created_date(self): """Gets the created_date of this NoStateMetaData. # noqa: E501 The time when the resource was created. # noqa: E501 :return: The created_date of this NoStateMetaData. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this NoStateMetaData. The time when the resource was created. # noqa: E501 :param created_date: The created_date of this NoStateMetaData. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def created_by(self): """Gets the created_by of this NoStateMetaData. # noqa: E501 The user who has created the resource. # noqa: E501 :return: The created_by of this NoStateMetaData. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter def created_by(self, created_by): """Sets the created_by of this NoStateMetaData. The user who has created the resource. # noqa: E501 :param created_by: The created_by of this NoStateMetaData. # noqa: E501 :type created_by: str """ self._created_by = created_by @property def created_by_user_id(self): """Gets the created_by_user_id of this NoStateMetaData. # noqa: E501 The unique ID of the user who created the resource. # noqa: E501 :return: The created_by_user_id of this NoStateMetaData. # noqa: E501 :rtype: str """ return self._created_by_user_id @created_by_user_id.setter def created_by_user_id(self, created_by_user_id): """Sets the created_by_user_id of this NoStateMetaData. The unique ID of the user who created the resource. # noqa: E501 :param created_by_user_id: The created_by_user_id of this NoStateMetaData. # noqa: E501 :type created_by_user_id: str """ self._created_by_user_id = created_by_user_id @property def last_modified_date(self): """Gets the last_modified_date of this NoStateMetaData. # noqa: E501 The last time the resource was modified. # noqa: E501 :return: The last_modified_date of this NoStateMetaData. # noqa: E501 :rtype: datetime """ return self._last_modified_date @last_modified_date.setter def last_modified_date(self, last_modified_date): """Sets the last_modified_date of this NoStateMetaData. The last time the resource was modified. # noqa: E501 :param last_modified_date: The last_modified_date of this NoStateMetaData. # noqa: E501 :type last_modified_date: datetime """ self._last_modified_date = last_modified_date @property def last_modified_by(self): """Gets the last_modified_by of this NoStateMetaData. # noqa: E501 The user who last modified the resource. # noqa: E501 :return: The last_modified_by of this NoStateMetaData. # noqa: E501 :rtype: str """ return self._last_modified_by @last_modified_by.setter def last_modified_by(self, last_modified_by): """Sets the last_modified_by of this NoStateMetaData. The user who last modified the resource. # noqa: E501 :param last_modified_by: The last_modified_by of this NoStateMetaData. # noqa: E501 :type last_modified_by: str """ self._last_modified_by = last_modified_by @property def last_modified_by_user_id(self): """Gets the last_modified_by_user_id of this NoStateMetaData. # noqa: E501 The unique ID of the user who last modified the resource. # noqa: E501 :return: The last_modified_by_user_id of this NoStateMetaData. # noqa: E501 :rtype: str """ return self._last_modified_by_user_id @last_modified_by_user_id.setter def last_modified_by_user_id(self, last_modified_by_user_id): """Sets the last_modified_by_user_id of this NoStateMetaData. The unique ID of the user who last modified the resource. # noqa: E501 :param last_modified_by_user_id: The last_modified_by_user_id of this NoStateMetaData. # noqa: E501 :type last_modified_by_user_id: str """ self._last_modified_by_user_id = last_modified_by_user_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NoStateMetaData): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, NoStateMetaData): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/pagination_links.py0000644000175100001660000001263315046550311022734 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class PaginationLinks(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'prev': 'str', '_self': 'str', 'next': 'str', } attribute_map = { 'prev': 'prev', '_self': 'self', 'next': 'next', } def __init__(self, prev=None, _self=None, next=None, local_vars_configuration=None): # noqa: E501 """PaginationLinks - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._prev = None self.__self = None self._next = None self.discriminator = None if prev is not None: self.prev = prev if _self is not None: self._self = _self if next is not None: self.next = next @property def prev(self): """Gets the prev of this PaginationLinks. # noqa: E501 URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. # noqa: E501 :return: The prev of this PaginationLinks. # noqa: E501 :rtype: str """ return self._prev @prev.setter def prev(self, prev): """Sets the prev of this PaginationLinks. URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. # noqa: E501 :param prev: The prev of this PaginationLinks. # noqa: E501 :type prev: str """ self._prev = prev @property def _self(self): """Gets the _self of this PaginationLinks. # noqa: E501 URL (with offset and limit parameters) of the current page. # noqa: E501 :return: The _self of this PaginationLinks. # noqa: E501 :rtype: str """ return self.__self @_self.setter def _self(self, _self): """Sets the _self of this PaginationLinks. URL (with offset and limit parameters) of the current page. # noqa: E501 :param _self: The _self of this PaginationLinks. # noqa: E501 :type _self: str """ self.__self = _self @property def next(self): """Gets the next of this PaginationLinks. # noqa: E501 URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. # noqa: E501 :return: The next of this PaginationLinks. # noqa: E501 :rtype: str """ return self._next @next.setter def next(self, next): """Sets the next of this PaginationLinks. URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. # noqa: E501 :param next: The next of this PaginationLinks. # noqa: E501 :type next: str """ self._next = next def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, PaginationLinks): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PaginationLinks): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/peer.py0000644000175100001660000001553715046550311020344 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Peer(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'name': 'str', 'datacenter_id': 'str', 'datacenter_name': 'str', 'location': 'str', } attribute_map = { 'id': 'id', 'name': 'name', 'datacenter_id': 'datacenterId', 'datacenter_name': 'datacenterName', 'location': 'location', } def __init__(self, id=None, name=None, datacenter_id=None, datacenter_name=None, location=None, local_vars_configuration=None): # noqa: E501 """Peer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._name = None self._datacenter_id = None self._datacenter_name = None self._location = None self.discriminator = None if id is not None: self.id = id if name is not None: self.name = name if datacenter_id is not None: self.datacenter_id = datacenter_id if datacenter_name is not None: self.datacenter_name = datacenter_name if location is not None: self.location = location @property def id(self): """Gets the id of this Peer. # noqa: E501 Identifier of the LAN connected to the Cross Connect. # noqa: E501 :return: The id of this Peer. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Peer. Identifier of the LAN connected to the Cross Connect. # noqa: E501 :param id: The id of this Peer. # noqa: E501 :type id: str """ self._id = id @property def name(self): """Gets the name of this Peer. # noqa: E501 Name of the LAN connected to the Cross Connect. # noqa: E501 :return: The name of this Peer. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Peer. Name of the LAN connected to the Cross Connect. # noqa: E501 :param name: The name of this Peer. # noqa: E501 :type name: str """ self._name = name @property def datacenter_id(self): """Gets the datacenter_id of this Peer. # noqa: E501 Identifier of the virtual data center connected to the Cross Connect. # noqa: E501 :return: The datacenter_id of this Peer. # noqa: E501 :rtype: str """ return self._datacenter_id @datacenter_id.setter def datacenter_id(self, datacenter_id): """Sets the datacenter_id of this Peer. Identifier of the virtual data center connected to the Cross Connect. # noqa: E501 :param datacenter_id: The datacenter_id of this Peer. # noqa: E501 :type datacenter_id: str """ self._datacenter_id = datacenter_id @property def datacenter_name(self): """Gets the datacenter_name of this Peer. # noqa: E501 Name of the virtual data center connected to the Cross Connect. # noqa: E501 :return: The datacenter_name of this Peer. # noqa: E501 :rtype: str """ return self._datacenter_name @datacenter_name.setter def datacenter_name(self, datacenter_name): """Sets the datacenter_name of this Peer. Name of the virtual data center connected to the Cross Connect. # noqa: E501 :param datacenter_name: The datacenter_name of this Peer. # noqa: E501 :type datacenter_name: str """ self._datacenter_name = datacenter_name @property def location(self): """Gets the location of this Peer. # noqa: E501 Location of the virtual data center connected to the Cross Connect. # noqa: E501 :return: The location of this Peer. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this Peer. Location of the virtual data center connected to the Cross Connect. # noqa: E501 :param location: The location of this Peer. # noqa: E501 :type location: str """ self._location = location def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Peer): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Peer): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/private_cross_connect.py0000644000175100001660000001543215046550311023777 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class PrivateCrossConnect(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'PrivateCrossConnectProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """PrivateCrossConnect - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this PrivateCrossConnect. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this PrivateCrossConnect. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this PrivateCrossConnect. The resource's unique identifier. # noqa: E501 :param id: The id of this PrivateCrossConnect. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this PrivateCrossConnect. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this PrivateCrossConnect. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this PrivateCrossConnect. The type of object that has been created. # noqa: E501 :param type: The type of this PrivateCrossConnect. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this PrivateCrossConnect. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this PrivateCrossConnect. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this PrivateCrossConnect. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this PrivateCrossConnect. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this PrivateCrossConnect. # noqa: E501 :return: The metadata of this PrivateCrossConnect. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this PrivateCrossConnect. :param metadata: The metadata of this PrivateCrossConnect. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this PrivateCrossConnect. # noqa: E501 :return: The properties of this PrivateCrossConnect. # noqa: E501 :rtype: PrivateCrossConnectProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this PrivateCrossConnect. :param properties: The properties of this PrivateCrossConnect. # noqa: E501 :type properties: PrivateCrossConnectProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, PrivateCrossConnect): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PrivateCrossConnect): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/private_cross_connect_properties.py0000644000175100001660000001636215046550311026256 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class PrivateCrossConnectProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'peers': 'list[Peer]', 'connectable_datacenters': 'list[ConnectableDatacenter]', } attribute_map = { 'name': 'name', 'description': 'description', 'peers': 'peers', 'connectable_datacenters': 'connectableDatacenters', } def __init__(self, name=None, description=None, peers=None, connectable_datacenters=None, local_vars_configuration=None): # noqa: E501 """PrivateCrossConnectProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._peers = None self._connectable_datacenters = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description if peers is not None: self.peers = peers if connectable_datacenters is not None: self.connectable_datacenters = connectable_datacenters @property def name(self): """Gets the name of this PrivateCrossConnectProperties. # noqa: E501 The name of the Cross Connect. # noqa: E501 :return: The name of this PrivateCrossConnectProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this PrivateCrossConnectProperties. The name of the Cross Connect. # noqa: E501 :param name: The name of this PrivateCrossConnectProperties. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this PrivateCrossConnectProperties. # noqa: E501 Human-readable description of the Cross Connect. # noqa: E501 :return: The description of this PrivateCrossConnectProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this PrivateCrossConnectProperties. Human-readable description of the Cross Connect. # noqa: E501 :param description: The description of this PrivateCrossConnectProperties. # noqa: E501 :type description: str """ self._description = description @property def peers(self): """Gets the peers of this PrivateCrossConnectProperties. # noqa: E501 Read-Only attribute. Lists LAN's connected to this Cross Connect. # noqa: E501 :return: The peers of this PrivateCrossConnectProperties. # noqa: E501 :rtype: list[Peer] """ return self._peers @peers.setter def peers(self, peers): """Sets the peers of this PrivateCrossConnectProperties. Read-Only attribute. Lists LAN's connected to this Cross Connect. # noqa: E501 :param peers: The peers of this PrivateCrossConnectProperties. # noqa: E501 :type peers: list[Peer] """ self._peers = peers @property def connectable_datacenters(self): """Gets the connectable_datacenters of this PrivateCrossConnectProperties. # noqa: E501 Read-Only attribute. Lists data centers that can be connected to this Cross Connect. If the Cross Connect is not connected to any LANs it lists all VDCs the user has access to. If the Cross Connect is connected to at least 1 LAN it lists all VDCs the user has access to in the location of the connected LAN. # noqa: E501 :return: The connectable_datacenters of this PrivateCrossConnectProperties. # noqa: E501 :rtype: list[ConnectableDatacenter] """ return self._connectable_datacenters @connectable_datacenters.setter def connectable_datacenters(self, connectable_datacenters): """Sets the connectable_datacenters of this PrivateCrossConnectProperties. Read-Only attribute. Lists data centers that can be connected to this Cross Connect. If the Cross Connect is not connected to any LANs it lists all VDCs the user has access to. If the Cross Connect is connected to at least 1 LAN it lists all VDCs the user has access to in the location of the connected LAN. # noqa: E501 :param connectable_datacenters: The connectable_datacenters of this PrivateCrossConnectProperties. # noqa: E501 :type connectable_datacenters: list[ConnectableDatacenter] """ self._connectable_datacenters = connectable_datacenters def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, PrivateCrossConnectProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PrivateCrossConnectProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/private_cross_connects.py0000644000175100001660000001361715046550311024165 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class PrivateCrossConnects(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[PrivateCrossConnect]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """PrivateCrossConnects - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this PrivateCrossConnects. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this PrivateCrossConnects. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this PrivateCrossConnects. The resource's unique identifier. # noqa: E501 :param id: The id of this PrivateCrossConnects. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this PrivateCrossConnects. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this PrivateCrossConnects. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this PrivateCrossConnects. The type of object that has been created. # noqa: E501 :param type: The type of this PrivateCrossConnects. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this PrivateCrossConnects. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this PrivateCrossConnects. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this PrivateCrossConnects. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this PrivateCrossConnects. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this PrivateCrossConnects. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this PrivateCrossConnects. # noqa: E501 :rtype: list[PrivateCrossConnect] """ return self._items @items.setter def items(self, items): """Sets the items of this PrivateCrossConnects. Array of items in the collection. # noqa: E501 :param items: The items of this PrivateCrossConnects. # noqa: E501 :type items: list[PrivateCrossConnect] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, PrivateCrossConnects): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PrivateCrossConnects): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/remote_console_url.py0000644000175100001660000000725015046550311023301 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RemoteConsoleUrl(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'url': 'str', } attribute_map = { 'url': 'url', } def __init__(self, url=None, local_vars_configuration=None): # noqa: E501 """RemoteConsoleUrl - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._url = None self.discriminator = None if url is not None: self.url = url @property def url(self): """Gets the url of this RemoteConsoleUrl. # noqa: E501 The remote console url with the jwToken parameter for access # noqa: E501 :return: The url of this RemoteConsoleUrl. # noqa: E501 :rtype: str """ return self._url @url.setter def url(self, url): """Sets the url of this RemoteConsoleUrl. The remote console url with the jwToken parameter for access # noqa: E501 :param url: The url of this RemoteConsoleUrl. # noqa: E501 :type url: str """ self._url = url def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RemoteConsoleUrl): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RemoteConsoleUrl): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request.py0000644000175100001660000001467015046550311021076 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Request(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'RequestMetadata', 'properties': 'RequestProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Request - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Request. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Request. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Request. The resource's unique identifier. # noqa: E501 :param id: The id of this Request. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Request. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Request. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Request. The type of object that has been created. # noqa: E501 :param type: The type of this Request. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Request. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Request. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Request. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Request. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Request. # noqa: E501 :return: The metadata of this Request. # noqa: E501 :rtype: RequestMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Request. :param metadata: The metadata of this Request. # noqa: E501 :type metadata: RequestMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Request. # noqa: E501 :return: The properties of this Request. # noqa: E501 :rtype: RequestProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Request. :param properties: The properties of this Request. # noqa: E501 :type properties: RequestProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Request): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Request): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request_metadata.py0000644000175100001660000001472515046550311022737 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RequestMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'created_date': 'datetime', 'created_by': 'str', 'etag': 'str', 'request_status': 'RequestStatus', } attribute_map = { 'created_date': 'createdDate', 'created_by': 'createdBy', 'etag': 'etag', 'request_status': 'requestStatus', } def __init__(self, created_date=None, created_by=None, etag=None, request_status=None, local_vars_configuration=None): # noqa: E501 """RequestMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._created_date = None self._created_by = None self._etag = None self._request_status = None self.discriminator = None if created_date is not None: self.created_date = created_date if created_by is not None: self.created_by = created_by if etag is not None: self.etag = etag if request_status is not None: self.request_status = request_status @property def created_date(self): """Gets the created_date of this RequestMetadata. # noqa: E501 The last time the resource was created. # noqa: E501 :return: The created_date of this RequestMetadata. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this RequestMetadata. The last time the resource was created. # noqa: E501 :param created_date: The created_date of this RequestMetadata. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def created_by(self): """Gets the created_by of this RequestMetadata. # noqa: E501 The user who created the resource. # noqa: E501 :return: The created_by of this RequestMetadata. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter def created_by(self, created_by): """Sets the created_by of this RequestMetadata. The user who created the resource. # noqa: E501 :param created_by: The created_by of this RequestMetadata. # noqa: E501 :type created_by: str """ self._created_by = created_by @property def etag(self): """Gets the etag of this RequestMetadata. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this RequestMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this RequestMetadata. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this RequestMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def request_status(self): """Gets the request_status of this RequestMetadata. # noqa: E501 :return: The request_status of this RequestMetadata. # noqa: E501 :rtype: RequestStatus """ return self._request_status @request_status.setter def request_status(self, request_status): """Sets the request_status of this RequestMetadata. :param request_status: The request_status of this RequestMetadata. # noqa: E501 :type request_status: RequestStatus """ self._request_status = request_status def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RequestMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RequestMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request_properties.py0000644000175100001660000001265015046550311023346 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RequestProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'method': 'str', 'headers': 'dict(str, str)', 'body': 'str', 'url': 'str', } attribute_map = { 'method': 'method', 'headers': 'headers', 'body': 'body', 'url': 'url', } def __init__(self, method=None, headers=None, body=None, url=None, local_vars_configuration=None): # noqa: E501 """RequestProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._method = None self._headers = None self._body = None self._url = None self.discriminator = None if method is not None: self.method = method if headers is not None: self.headers = headers if body is not None: self.body = body if url is not None: self.url = url @property def method(self): """Gets the method of this RequestProperties. # noqa: E501 :return: The method of this RequestProperties. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): """Sets the method of this RequestProperties. :param method: The method of this RequestProperties. # noqa: E501 :type method: str """ self._method = method @property def headers(self): """Gets the headers of this RequestProperties. # noqa: E501 :return: The headers of this RequestProperties. # noqa: E501 :rtype: dict(str, str) """ return self._headers @headers.setter def headers(self, headers): """Sets the headers of this RequestProperties. :param headers: The headers of this RequestProperties. # noqa: E501 :type headers: dict(str, str) """ self._headers = headers @property def body(self): """Gets the body of this RequestProperties. # noqa: E501 :return: The body of this RequestProperties. # noqa: E501 :rtype: str """ return self._body @body.setter def body(self, body): """Sets the body of this RequestProperties. :param body: The body of this RequestProperties. # noqa: E501 :type body: str """ self._body = body @property def url(self): """Gets the url of this RequestProperties. # noqa: E501 :return: The url of this RequestProperties. # noqa: E501 :rtype: str """ return self._url @url.setter def url(self, url): """Sets the url of this RequestProperties. :param url: The url of this RequestProperties. # noqa: E501 :type url: str """ self._url = url def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RequestProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RequestProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request_status.py0000644000175100001660000001330615046550311022474 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RequestStatus(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'RequestStatusMetadata', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', } def __init__(self, id=None, type=None, href=None, metadata=None, local_vars_configuration=None): # noqa: E501 """RequestStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata @property def id(self): """Gets the id of this RequestStatus. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this RequestStatus. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this RequestStatus. The resource's unique identifier. # noqa: E501 :param id: The id of this RequestStatus. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this RequestStatus. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this RequestStatus. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this RequestStatus. The type of object that has been created. # noqa: E501 :param type: The type of this RequestStatus. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this RequestStatus. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this RequestStatus. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this RequestStatus. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this RequestStatus. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this RequestStatus. # noqa: E501 :return: The metadata of this RequestStatus. # noqa: E501 :rtype: RequestStatusMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this RequestStatus. :param metadata: The metadata of this RequestStatus. # noqa: E501 :type metadata: RequestStatusMetadata """ self._metadata = metadata def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RequestStatus): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RequestStatus): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request_status_metadata.py0000644000175100001660000001460515046550311024337 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RequestStatusMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'status': 'str', 'message': 'str', 'etag': 'str', 'targets': 'list[RequestTarget]', } attribute_map = { 'status': 'status', 'message': 'message', 'etag': 'etag', 'targets': 'targets', } def __init__(self, status=None, message=None, etag=None, targets=None, local_vars_configuration=None): # noqa: E501 """RequestStatusMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._status = None self._message = None self._etag = None self._targets = None self.discriminator = None if status is not None: self.status = status if message is not None: self.message = message if etag is not None: self.etag = etag if targets is not None: self.targets = targets @property def status(self): """Gets the status of this RequestStatusMetadata. # noqa: E501 :return: The status of this RequestStatusMetadata. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this RequestStatusMetadata. :param status: The status of this RequestStatusMetadata. # noqa: E501 :type status: str """ allowed_values = ["QUEUED", "RUNNING", "DONE", "FAILED"] # noqa: E501 if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) ) self._status = status @property def message(self): """Gets the message of this RequestStatusMetadata. # noqa: E501 :return: The message of this RequestStatusMetadata. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): """Sets the message of this RequestStatusMetadata. :param message: The message of this RequestStatusMetadata. # noqa: E501 :type message: str """ self._message = message @property def etag(self): """Gets the etag of this RequestStatusMetadata. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this RequestStatusMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this RequestStatusMetadata. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this RequestStatusMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def targets(self): """Gets the targets of this RequestStatusMetadata. # noqa: E501 :return: The targets of this RequestStatusMetadata. # noqa: E501 :rtype: list[RequestTarget] """ return self._targets @targets.setter def targets(self, targets): """Sets the targets of this RequestStatusMetadata. :param targets: The targets of this RequestStatusMetadata. # noqa: E501 :type targets: list[RequestTarget] """ self._targets = targets def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RequestStatusMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RequestStatusMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/request_target.py0000644000175100001660000001107115046550311022434 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RequestTarget(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'target': 'ResourceReference', 'status': 'str', } attribute_map = { 'target': 'target', 'status': 'status', } def __init__(self, target=None, status=None, local_vars_configuration=None): # noqa: E501 """RequestTarget - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._target = None self._status = None self.discriminator = None if target is not None: self.target = target if status is not None: self.status = status @property def target(self): """Gets the target of this RequestTarget. # noqa: E501 :return: The target of this RequestTarget. # noqa: E501 :rtype: ResourceReference """ return self._target @target.setter def target(self, target): """Sets the target of this RequestTarget. :param target: The target of this RequestTarget. # noqa: E501 :type target: ResourceReference """ self._target = target @property def status(self): """Gets the status of this RequestTarget. # noqa: E501 :return: The status of this RequestTarget. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this RequestTarget. :param status: The status of this RequestTarget. # noqa: E501 :type status: str """ allowed_values = ["QUEUED", "RUNNING", "DONE", "FAILED"] # noqa: E501 if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) ) self._status = status def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RequestTarget): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RequestTarget): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/requests.py0000644000175100001660000002051015046550311021247 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Requests(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Request]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Requests - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items self.offset = offset self.limit = limit self.links = links @property def id(self): """Gets the id of this Requests. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Requests. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Requests. The resource's unique identifier. # noqa: E501 :param id: The id of this Requests. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Requests. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Requests. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Requests. The type of object that has been created. # noqa: E501 :param type: The type of this Requests. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Requests. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Requests. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Requests. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Requests. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Requests. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Requests. # noqa: E501 :rtype: list[Request] """ return self._items @items.setter def items(self, items): """Sets the items of this Requests. Array of items in the collection. # noqa: E501 :param items: The items of this Requests. # noqa: E501 :type items: list[Request] """ self._items = items @property def offset(self): """Gets the offset of this Requests. # noqa: E501 The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :return: The offset of this Requests. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Requests. The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :param offset: The offset of this Requests. # noqa: E501 :type offset: float """ if self.local_vars_configuration.client_side_validation and offset is None: # noqa: E501 raise ValueError("Invalid value for `offset`, must not be `None`") # noqa: E501 self._offset = offset @property def limit(self): """Gets the limit of this Requests. # noqa: E501 The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :return: The limit of this Requests. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Requests. The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :param limit: The limit of this Requests. # noqa: E501 :type limit: float """ if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 self._limit = limit @property def links(self): """Gets the links of this Requests. # noqa: E501 :return: The links of this Requests. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Requests. :param links: The links of this Requests. # noqa: E501 :type links: PaginationLinks """ if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Requests): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Requests): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource.py0000644000175100001660000001574415046550311021240 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Resource(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ResourceProperties', 'entities': 'ResourceEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Resource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata if properties is not None: self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Resource. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Resource. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Resource. The resource's unique identifier. # noqa: E501 :param id: The id of this Resource. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Resource. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this Resource. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Resource. The type of the resource. # noqa: E501 :param type: The type of this Resource. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Resource. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Resource. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Resource. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Resource. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Resource. # noqa: E501 :return: The metadata of this Resource. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Resource. :param metadata: The metadata of this Resource. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Resource. # noqa: E501 :return: The properties of this Resource. # noqa: E501 :rtype: ResourceProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Resource. :param properties: The properties of this Resource. # noqa: E501 :type properties: ResourceProperties """ self._properties = properties @property def entities(self): """Gets the entities of this Resource. # noqa: E501 :return: The entities of this Resource. # noqa: E501 :rtype: ResourceEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Resource. :param entities: The entities of this Resource. # noqa: E501 :type entities: ResourceEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Resource): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Resource): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource_entities.py0000644000175100001660000000714215046550311023135 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourceEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'groups': 'ResourceGroups', } attribute_map = { 'groups': 'groups', } def __init__(self, groups=None, local_vars_configuration=None): # noqa: E501 """ResourceEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._groups = None self.discriminator = None if groups is not None: self.groups = groups @property def groups(self): """Gets the groups of this ResourceEntities. # noqa: E501 :return: The groups of this ResourceEntities. # noqa: E501 :rtype: ResourceGroups """ return self._groups @groups.setter def groups(self, groups): """Sets the groups of this ResourceEntities. :param groups: The groups of this ResourceEntities. # noqa: E501 :type groups: ResourceGroups """ self._groups = groups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourceEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourceEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource_groups.py0000644000175100001660000001332615046550311022631 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourceGroups(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Resource]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """ResourceGroups - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this ResourceGroups. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ResourceGroups. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ResourceGroups. The resource's unique identifier. # noqa: E501 :param id: The id of this ResourceGroups. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ResourceGroups. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this ResourceGroups. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ResourceGroups. The type of the resource. # noqa: E501 :param type: The type of this ResourceGroups. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ResourceGroups. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this ResourceGroups. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ResourceGroups. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ResourceGroups. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this ResourceGroups. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this ResourceGroups. # noqa: E501 :rtype: list[Resource] """ return self._items @items.setter def items(self, items): """Sets the items of this ResourceGroups. Array of items in the collection. # noqa: E501 :param items: The items of this ResourceGroups. # noqa: E501 :type items: list[Resource] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourceGroups): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourceGroups): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource_limits.py0000644000175100001660000010402615046550311022611 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourceLimits(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'cores_per_server': 'int', 'cores_per_contract': 'int', 'cores_provisioned': 'int', 'ram_per_server': 'int', 'ram_per_contract': 'int', 'ram_provisioned': 'int', 'hdd_limit_per_volume': 'int', 'hdd_limit_per_contract': 'int', 'hdd_volume_provisioned': 'int', 'ssd_limit_per_volume': 'int', 'ssd_limit_per_contract': 'int', 'ssd_volume_provisioned': 'int', 'das_volume_provisioned': 'int', 'reservable_ips': 'int', 'reserved_ips_on_contract': 'int', 'reserved_ips_in_use': 'int', 'k8s_cluster_limit_total': 'int', 'k8s_clusters_provisioned': 'int', 'nlb_limit_total': 'int', 'nlb_provisioned': 'int', 'nat_gateway_limit_total': 'int', 'nat_gateway_provisioned': 'int', 'security_groups_per_vdc': 'int', 'security_groups_per_resource': 'int', 'rules_per_security_group': 'int', } attribute_map = { 'cores_per_server': 'coresPerServer', 'cores_per_contract': 'coresPerContract', 'cores_provisioned': 'coresProvisioned', 'ram_per_server': 'ramPerServer', 'ram_per_contract': 'ramPerContract', 'ram_provisioned': 'ramProvisioned', 'hdd_limit_per_volume': 'hddLimitPerVolume', 'hdd_limit_per_contract': 'hddLimitPerContract', 'hdd_volume_provisioned': 'hddVolumeProvisioned', 'ssd_limit_per_volume': 'ssdLimitPerVolume', 'ssd_limit_per_contract': 'ssdLimitPerContract', 'ssd_volume_provisioned': 'ssdVolumeProvisioned', 'das_volume_provisioned': 'dasVolumeProvisioned', 'reservable_ips': 'reservableIps', 'reserved_ips_on_contract': 'reservedIpsOnContract', 'reserved_ips_in_use': 'reservedIpsInUse', 'k8s_cluster_limit_total': 'k8sClusterLimitTotal', 'k8s_clusters_provisioned': 'k8sClustersProvisioned', 'nlb_limit_total': 'nlbLimitTotal', 'nlb_provisioned': 'nlbProvisioned', 'nat_gateway_limit_total': 'natGatewayLimitTotal', 'nat_gateway_provisioned': 'natGatewayProvisioned', 'security_groups_per_vdc': 'securityGroupsPerVdc', 'security_groups_per_resource': 'securityGroupsPerResource', 'rules_per_security_group': 'rulesPerSecurityGroup', } def __init__(self, cores_per_server=None, cores_per_contract=None, cores_provisioned=None, ram_per_server=None, ram_per_contract=None, ram_provisioned=None, hdd_limit_per_volume=None, hdd_limit_per_contract=None, hdd_volume_provisioned=None, ssd_limit_per_volume=None, ssd_limit_per_contract=None, ssd_volume_provisioned=None, das_volume_provisioned=None, reservable_ips=None, reserved_ips_on_contract=None, reserved_ips_in_use=None, k8s_cluster_limit_total=None, k8s_clusters_provisioned=None, nlb_limit_total=None, nlb_provisioned=None, nat_gateway_limit_total=None, nat_gateway_provisioned=None, security_groups_per_vdc=None, security_groups_per_resource=None, rules_per_security_group=None, local_vars_configuration=None): # noqa: E501 """ResourceLimits - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._cores_per_server = None self._cores_per_contract = None self._cores_provisioned = None self._ram_per_server = None self._ram_per_contract = None self._ram_provisioned = None self._hdd_limit_per_volume = None self._hdd_limit_per_contract = None self._hdd_volume_provisioned = None self._ssd_limit_per_volume = None self._ssd_limit_per_contract = None self._ssd_volume_provisioned = None self._das_volume_provisioned = None self._reservable_ips = None self._reserved_ips_on_contract = None self._reserved_ips_in_use = None self._k8s_cluster_limit_total = None self._k8s_clusters_provisioned = None self._nlb_limit_total = None self._nlb_provisioned = None self._nat_gateway_limit_total = None self._nat_gateway_provisioned = None self._security_groups_per_vdc = None self._security_groups_per_resource = None self._rules_per_security_group = None self.discriminator = None self.cores_per_server = cores_per_server self.cores_per_contract = cores_per_contract self.cores_provisioned = cores_provisioned self.ram_per_server = ram_per_server self.ram_per_contract = ram_per_contract self.ram_provisioned = ram_provisioned self.hdd_limit_per_volume = hdd_limit_per_volume self.hdd_limit_per_contract = hdd_limit_per_contract self.hdd_volume_provisioned = hdd_volume_provisioned self.ssd_limit_per_volume = ssd_limit_per_volume self.ssd_limit_per_contract = ssd_limit_per_contract self.ssd_volume_provisioned = ssd_volume_provisioned self.das_volume_provisioned = das_volume_provisioned self.reservable_ips = reservable_ips self.reserved_ips_on_contract = reserved_ips_on_contract self.reserved_ips_in_use = reserved_ips_in_use self.k8s_cluster_limit_total = k8s_cluster_limit_total self.k8s_clusters_provisioned = k8s_clusters_provisioned self.nlb_limit_total = nlb_limit_total self.nlb_provisioned = nlb_provisioned self.nat_gateway_limit_total = nat_gateway_limit_total self.nat_gateway_provisioned = nat_gateway_provisioned self.security_groups_per_vdc = security_groups_per_vdc self.security_groups_per_resource = security_groups_per_resource self.rules_per_security_group = rules_per_security_group @property def cores_per_server(self): """Gets the cores_per_server of this ResourceLimits. # noqa: E501 The maximum number of CPU cores per server. # noqa: E501 :return: The cores_per_server of this ResourceLimits. # noqa: E501 :rtype: int """ return self._cores_per_server @cores_per_server.setter def cores_per_server(self, cores_per_server): """Sets the cores_per_server of this ResourceLimits. The maximum number of CPU cores per server. # noqa: E501 :param cores_per_server: The cores_per_server of this ResourceLimits. # noqa: E501 :type cores_per_server: int """ if self.local_vars_configuration.client_side_validation and cores_per_server is None: # noqa: E501 raise ValueError("Invalid value for `cores_per_server`, must not be `None`") # noqa: E501 self._cores_per_server = cores_per_server @property def cores_per_contract(self): """Gets the cores_per_contract of this ResourceLimits. # noqa: E501 The maximum number of CPU cores per contract. # noqa: E501 :return: The cores_per_contract of this ResourceLimits. # noqa: E501 :rtype: int """ return self._cores_per_contract @cores_per_contract.setter def cores_per_contract(self, cores_per_contract): """Sets the cores_per_contract of this ResourceLimits. The maximum number of CPU cores per contract. # noqa: E501 :param cores_per_contract: The cores_per_contract of this ResourceLimits. # noqa: E501 :type cores_per_contract: int """ if self.local_vars_configuration.client_side_validation and cores_per_contract is None: # noqa: E501 raise ValueError("Invalid value for `cores_per_contract`, must not be `None`") # noqa: E501 self._cores_per_contract = cores_per_contract @property def cores_provisioned(self): """Gets the cores_provisioned of this ResourceLimits. # noqa: E501 The number of CPU cores provisioned. # noqa: E501 :return: The cores_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._cores_provisioned @cores_provisioned.setter def cores_provisioned(self, cores_provisioned): """Sets the cores_provisioned of this ResourceLimits. The number of CPU cores provisioned. # noqa: E501 :param cores_provisioned: The cores_provisioned of this ResourceLimits. # noqa: E501 :type cores_provisioned: int """ if self.local_vars_configuration.client_side_validation and cores_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `cores_provisioned`, must not be `None`") # noqa: E501 self._cores_provisioned = cores_provisioned @property def ram_per_server(self): """Gets the ram_per_server of this ResourceLimits. # noqa: E501 The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. # noqa: E501 :return: The ram_per_server of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ram_per_server @ram_per_server.setter def ram_per_server(self, ram_per_server): """Sets the ram_per_server of this ResourceLimits. The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. # noqa: E501 :param ram_per_server: The ram_per_server of this ResourceLimits. # noqa: E501 :type ram_per_server: int """ if self.local_vars_configuration.client_side_validation and ram_per_server is None: # noqa: E501 raise ValueError("Invalid value for `ram_per_server`, must not be `None`") # noqa: E501 self._ram_per_server = ram_per_server @property def ram_per_contract(self): """Gets the ram_per_contract of this ResourceLimits. # noqa: E501 The maximum amount of RAM (in MB) that can be provisioned under this contract. # noqa: E501 :return: The ram_per_contract of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ram_per_contract @ram_per_contract.setter def ram_per_contract(self, ram_per_contract): """Sets the ram_per_contract of this ResourceLimits. The maximum amount of RAM (in MB) that can be provisioned under this contract. # noqa: E501 :param ram_per_contract: The ram_per_contract of this ResourceLimits. # noqa: E501 :type ram_per_contract: int """ if self.local_vars_configuration.client_side_validation and ram_per_contract is None: # noqa: E501 raise ValueError("Invalid value for `ram_per_contract`, must not be `None`") # noqa: E501 self._ram_per_contract = ram_per_contract @property def ram_provisioned(self): """Gets the ram_provisioned of this ResourceLimits. # noqa: E501 The amount of RAM (in MB) provisioned under this contract. # noqa: E501 :return: The ram_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ram_provisioned @ram_provisioned.setter def ram_provisioned(self, ram_provisioned): """Sets the ram_provisioned of this ResourceLimits. The amount of RAM (in MB) provisioned under this contract. # noqa: E501 :param ram_provisioned: The ram_provisioned of this ResourceLimits. # noqa: E501 :type ram_provisioned: int """ if self.local_vars_configuration.client_side_validation and ram_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `ram_provisioned`, must not be `None`") # noqa: E501 self._ram_provisioned = ram_provisioned @property def hdd_limit_per_volume(self): """Gets the hdd_limit_per_volume of this ResourceLimits. # noqa: E501 The maximum size (in MB) of an idividual hard disk volume. # noqa: E501 :return: The hdd_limit_per_volume of this ResourceLimits. # noqa: E501 :rtype: int """ return self._hdd_limit_per_volume @hdd_limit_per_volume.setter def hdd_limit_per_volume(self, hdd_limit_per_volume): """Sets the hdd_limit_per_volume of this ResourceLimits. The maximum size (in MB) of an idividual hard disk volume. # noqa: E501 :param hdd_limit_per_volume: The hdd_limit_per_volume of this ResourceLimits. # noqa: E501 :type hdd_limit_per_volume: int """ if self.local_vars_configuration.client_side_validation and hdd_limit_per_volume is None: # noqa: E501 raise ValueError("Invalid value for `hdd_limit_per_volume`, must not be `None`") # noqa: E501 self._hdd_limit_per_volume = hdd_limit_per_volume @property def hdd_limit_per_contract(self): """Gets the hdd_limit_per_contract of this ResourceLimits. # noqa: E501 The maximum amount of disk space (in MB) that can be provided under this contract. # noqa: E501 :return: The hdd_limit_per_contract of this ResourceLimits. # noqa: E501 :rtype: int """ return self._hdd_limit_per_contract @hdd_limit_per_contract.setter def hdd_limit_per_contract(self, hdd_limit_per_contract): """Sets the hdd_limit_per_contract of this ResourceLimits. The maximum amount of disk space (in MB) that can be provided under this contract. # noqa: E501 :param hdd_limit_per_contract: The hdd_limit_per_contract of this ResourceLimits. # noqa: E501 :type hdd_limit_per_contract: int """ if self.local_vars_configuration.client_side_validation and hdd_limit_per_contract is None: # noqa: E501 raise ValueError("Invalid value for `hdd_limit_per_contract`, must not be `None`") # noqa: E501 self._hdd_limit_per_contract = hdd_limit_per_contract @property def hdd_volume_provisioned(self): """Gets the hdd_volume_provisioned of this ResourceLimits. # noqa: E501 The amount of hard disk space (in MB) that is currently provisioned. # noqa: E501 :return: The hdd_volume_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._hdd_volume_provisioned @hdd_volume_provisioned.setter def hdd_volume_provisioned(self, hdd_volume_provisioned): """Sets the hdd_volume_provisioned of this ResourceLimits. The amount of hard disk space (in MB) that is currently provisioned. # noqa: E501 :param hdd_volume_provisioned: The hdd_volume_provisioned of this ResourceLimits. # noqa: E501 :type hdd_volume_provisioned: int """ if self.local_vars_configuration.client_side_validation and hdd_volume_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `hdd_volume_provisioned`, must not be `None`") # noqa: E501 self._hdd_volume_provisioned = hdd_volume_provisioned @property def ssd_limit_per_volume(self): """Gets the ssd_limit_per_volume of this ResourceLimits. # noqa: E501 The maximum size (in MB) of an individual solid state disk volume. # noqa: E501 :return: The ssd_limit_per_volume of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ssd_limit_per_volume @ssd_limit_per_volume.setter def ssd_limit_per_volume(self, ssd_limit_per_volume): """Sets the ssd_limit_per_volume of this ResourceLimits. The maximum size (in MB) of an individual solid state disk volume. # noqa: E501 :param ssd_limit_per_volume: The ssd_limit_per_volume of this ResourceLimits. # noqa: E501 :type ssd_limit_per_volume: int """ if self.local_vars_configuration.client_side_validation and ssd_limit_per_volume is None: # noqa: E501 raise ValueError("Invalid value for `ssd_limit_per_volume`, must not be `None`") # noqa: E501 self._ssd_limit_per_volume = ssd_limit_per_volume @property def ssd_limit_per_contract(self): """Gets the ssd_limit_per_contract of this ResourceLimits. # noqa: E501 The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. # noqa: E501 :return: The ssd_limit_per_contract of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ssd_limit_per_contract @ssd_limit_per_contract.setter def ssd_limit_per_contract(self, ssd_limit_per_contract): """Sets the ssd_limit_per_contract of this ResourceLimits. The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. # noqa: E501 :param ssd_limit_per_contract: The ssd_limit_per_contract of this ResourceLimits. # noqa: E501 :type ssd_limit_per_contract: int """ if self.local_vars_configuration.client_side_validation and ssd_limit_per_contract is None: # noqa: E501 raise ValueError("Invalid value for `ssd_limit_per_contract`, must not be `None`") # noqa: E501 self._ssd_limit_per_contract = ssd_limit_per_contract @property def ssd_volume_provisioned(self): """Gets the ssd_volume_provisioned of this ResourceLimits. # noqa: E501 The amount of solid state disk space (in MB) that is currently provisioned. # noqa: E501 :return: The ssd_volume_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._ssd_volume_provisioned @ssd_volume_provisioned.setter def ssd_volume_provisioned(self, ssd_volume_provisioned): """Sets the ssd_volume_provisioned of this ResourceLimits. The amount of solid state disk space (in MB) that is currently provisioned. # noqa: E501 :param ssd_volume_provisioned: The ssd_volume_provisioned of this ResourceLimits. # noqa: E501 :type ssd_volume_provisioned: int """ if self.local_vars_configuration.client_side_validation and ssd_volume_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `ssd_volume_provisioned`, must not be `None`") # noqa: E501 self._ssd_volume_provisioned = ssd_volume_provisioned @property def das_volume_provisioned(self): """Gets the das_volume_provisioned of this ResourceLimits. # noqa: E501 The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. # noqa: E501 :return: The das_volume_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._das_volume_provisioned @das_volume_provisioned.setter def das_volume_provisioned(self, das_volume_provisioned): """Sets the das_volume_provisioned of this ResourceLimits. The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. # noqa: E501 :param das_volume_provisioned: The das_volume_provisioned of this ResourceLimits. # noqa: E501 :type das_volume_provisioned: int """ if self.local_vars_configuration.client_side_validation and das_volume_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `das_volume_provisioned`, must not be `None`") # noqa: E501 self._das_volume_provisioned = das_volume_provisioned @property def reservable_ips(self): """Gets the reservable_ips of this ResourceLimits. # noqa: E501 The maximum number of static public IP addresses that can be reserved by this customer across contracts. # noqa: E501 :return: The reservable_ips of this ResourceLimits. # noqa: E501 :rtype: int """ return self._reservable_ips @reservable_ips.setter def reservable_ips(self, reservable_ips): """Sets the reservable_ips of this ResourceLimits. The maximum number of static public IP addresses that can be reserved by this customer across contracts. # noqa: E501 :param reservable_ips: The reservable_ips of this ResourceLimits. # noqa: E501 :type reservable_ips: int """ if self.local_vars_configuration.client_side_validation and reservable_ips is None: # noqa: E501 raise ValueError("Invalid value for `reservable_ips`, must not be `None`") # noqa: E501 self._reservable_ips = reservable_ips @property def reserved_ips_on_contract(self): """Gets the reserved_ips_on_contract of this ResourceLimits. # noqa: E501 The maximum number of static public IP addresses that can be reserved for this contract. # noqa: E501 :return: The reserved_ips_on_contract of this ResourceLimits. # noqa: E501 :rtype: int """ return self._reserved_ips_on_contract @reserved_ips_on_contract.setter def reserved_ips_on_contract(self, reserved_ips_on_contract): """Sets the reserved_ips_on_contract of this ResourceLimits. The maximum number of static public IP addresses that can be reserved for this contract. # noqa: E501 :param reserved_ips_on_contract: The reserved_ips_on_contract of this ResourceLimits. # noqa: E501 :type reserved_ips_on_contract: int """ if self.local_vars_configuration.client_side_validation and reserved_ips_on_contract is None: # noqa: E501 raise ValueError("Invalid value for `reserved_ips_on_contract`, must not be `None`") # noqa: E501 self._reserved_ips_on_contract = reserved_ips_on_contract @property def reserved_ips_in_use(self): """Gets the reserved_ips_in_use of this ResourceLimits. # noqa: E501 The number of static public IP addresses in use. # noqa: E501 :return: The reserved_ips_in_use of this ResourceLimits. # noqa: E501 :rtype: int """ return self._reserved_ips_in_use @reserved_ips_in_use.setter def reserved_ips_in_use(self, reserved_ips_in_use): """Sets the reserved_ips_in_use of this ResourceLimits. The number of static public IP addresses in use. # noqa: E501 :param reserved_ips_in_use: The reserved_ips_in_use of this ResourceLimits. # noqa: E501 :type reserved_ips_in_use: int """ if self.local_vars_configuration.client_side_validation and reserved_ips_in_use is None: # noqa: E501 raise ValueError("Invalid value for `reserved_ips_in_use`, must not be `None`") # noqa: E501 self._reserved_ips_in_use = reserved_ips_in_use @property def k8s_cluster_limit_total(self): """Gets the k8s_cluster_limit_total of this ResourceLimits. # noqa: E501 The maximum number of Kubernetes clusters that can be created under this contract. # noqa: E501 :return: The k8s_cluster_limit_total of this ResourceLimits. # noqa: E501 :rtype: int """ return self._k8s_cluster_limit_total @k8s_cluster_limit_total.setter def k8s_cluster_limit_total(self, k8s_cluster_limit_total): """Sets the k8s_cluster_limit_total of this ResourceLimits. The maximum number of Kubernetes clusters that can be created under this contract. # noqa: E501 :param k8s_cluster_limit_total: The k8s_cluster_limit_total of this ResourceLimits. # noqa: E501 :type k8s_cluster_limit_total: int """ if self.local_vars_configuration.client_side_validation and k8s_cluster_limit_total is None: # noqa: E501 raise ValueError("Invalid value for `k8s_cluster_limit_total`, must not be `None`") # noqa: E501 self._k8s_cluster_limit_total = k8s_cluster_limit_total @property def k8s_clusters_provisioned(self): """Gets the k8s_clusters_provisioned of this ResourceLimits. # noqa: E501 The amount of Kubernetes clusters that is currently provisioned. # noqa: E501 :return: The k8s_clusters_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._k8s_clusters_provisioned @k8s_clusters_provisioned.setter def k8s_clusters_provisioned(self, k8s_clusters_provisioned): """Sets the k8s_clusters_provisioned of this ResourceLimits. The amount of Kubernetes clusters that is currently provisioned. # noqa: E501 :param k8s_clusters_provisioned: The k8s_clusters_provisioned of this ResourceLimits. # noqa: E501 :type k8s_clusters_provisioned: int """ if self.local_vars_configuration.client_side_validation and k8s_clusters_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `k8s_clusters_provisioned`, must not be `None`") # noqa: E501 self._k8s_clusters_provisioned = k8s_clusters_provisioned @property def nlb_limit_total(self): """Gets the nlb_limit_total of this ResourceLimits. # noqa: E501 The NLB total limit. # noqa: E501 :return: The nlb_limit_total of this ResourceLimits. # noqa: E501 :rtype: int """ return self._nlb_limit_total @nlb_limit_total.setter def nlb_limit_total(self, nlb_limit_total): """Sets the nlb_limit_total of this ResourceLimits. The NLB total limit. # noqa: E501 :param nlb_limit_total: The nlb_limit_total of this ResourceLimits. # noqa: E501 :type nlb_limit_total: int """ if self.local_vars_configuration.client_side_validation and nlb_limit_total is None: # noqa: E501 raise ValueError("Invalid value for `nlb_limit_total`, must not be `None`") # noqa: E501 self._nlb_limit_total = nlb_limit_total @property def nlb_provisioned(self): """Gets the nlb_provisioned of this ResourceLimits. # noqa: E501 The NLBs provisioned. # noqa: E501 :return: The nlb_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._nlb_provisioned @nlb_provisioned.setter def nlb_provisioned(self, nlb_provisioned): """Sets the nlb_provisioned of this ResourceLimits. The NLBs provisioned. # noqa: E501 :param nlb_provisioned: The nlb_provisioned of this ResourceLimits. # noqa: E501 :type nlb_provisioned: int """ if self.local_vars_configuration.client_side_validation and nlb_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `nlb_provisioned`, must not be `None`") # noqa: E501 self._nlb_provisioned = nlb_provisioned @property def nat_gateway_limit_total(self): """Gets the nat_gateway_limit_total of this ResourceLimits. # noqa: E501 The NAT Gateway total limit. # noqa: E501 :return: The nat_gateway_limit_total of this ResourceLimits. # noqa: E501 :rtype: int """ return self._nat_gateway_limit_total @nat_gateway_limit_total.setter def nat_gateway_limit_total(self, nat_gateway_limit_total): """Sets the nat_gateway_limit_total of this ResourceLimits. The NAT Gateway total limit. # noqa: E501 :param nat_gateway_limit_total: The nat_gateway_limit_total of this ResourceLimits. # noqa: E501 :type nat_gateway_limit_total: int """ if self.local_vars_configuration.client_side_validation and nat_gateway_limit_total is None: # noqa: E501 raise ValueError("Invalid value for `nat_gateway_limit_total`, must not be `None`") # noqa: E501 self._nat_gateway_limit_total = nat_gateway_limit_total @property def nat_gateway_provisioned(self): """Gets the nat_gateway_provisioned of this ResourceLimits. # noqa: E501 The NAT Gateways provisioned. # noqa: E501 :return: The nat_gateway_provisioned of this ResourceLimits. # noqa: E501 :rtype: int """ return self._nat_gateway_provisioned @nat_gateway_provisioned.setter def nat_gateway_provisioned(self, nat_gateway_provisioned): """Sets the nat_gateway_provisioned of this ResourceLimits. The NAT Gateways provisioned. # noqa: E501 :param nat_gateway_provisioned: The nat_gateway_provisioned of this ResourceLimits. # noqa: E501 :type nat_gateway_provisioned: int """ if self.local_vars_configuration.client_side_validation and nat_gateway_provisioned is None: # noqa: E501 raise ValueError("Invalid value for `nat_gateway_provisioned`, must not be `None`") # noqa: E501 self._nat_gateway_provisioned = nat_gateway_provisioned @property def security_groups_per_vdc(self): """Gets the security_groups_per_vdc of this ResourceLimits. # noqa: E501 The maximum number of security groups per VDC. # noqa: E501 :return: The security_groups_per_vdc of this ResourceLimits. # noqa: E501 :rtype: int """ return self._security_groups_per_vdc @security_groups_per_vdc.setter def security_groups_per_vdc(self, security_groups_per_vdc): """Sets the security_groups_per_vdc of this ResourceLimits. The maximum number of security groups per VDC. # noqa: E501 :param security_groups_per_vdc: The security_groups_per_vdc of this ResourceLimits. # noqa: E501 :type security_groups_per_vdc: int """ if self.local_vars_configuration.client_side_validation and security_groups_per_vdc is None: # noqa: E501 raise ValueError("Invalid value for `security_groups_per_vdc`, must not be `None`") # noqa: E501 self._security_groups_per_vdc = security_groups_per_vdc @property def security_groups_per_resource(self): """Gets the security_groups_per_resource of this ResourceLimits. # noqa: E501 The maximum number of security groups that can be attached to a NIC or a VM individually. For example, a user can have maximum 10 security groups per NIC and 10 per VM. # noqa: E501 :return: The security_groups_per_resource of this ResourceLimits. # noqa: E501 :rtype: int """ return self._security_groups_per_resource @security_groups_per_resource.setter def security_groups_per_resource(self, security_groups_per_resource): """Sets the security_groups_per_resource of this ResourceLimits. The maximum number of security groups that can be attached to a NIC or a VM individually. For example, a user can have maximum 10 security groups per NIC and 10 per VM. # noqa: E501 :param security_groups_per_resource: The security_groups_per_resource of this ResourceLimits. # noqa: E501 :type security_groups_per_resource: int """ if self.local_vars_configuration.client_side_validation and security_groups_per_resource is None: # noqa: E501 raise ValueError("Invalid value for `security_groups_per_resource`, must not be `None`") # noqa: E501 self._security_groups_per_resource = security_groups_per_resource @property def rules_per_security_group(self): """Gets the rules_per_security_group of this ResourceLimits. # noqa: E501 The maximum number of rules per security group. # noqa: E501 :return: The rules_per_security_group of this ResourceLimits. # noqa: E501 :rtype: int """ return self._rules_per_security_group @rules_per_security_group.setter def rules_per_security_group(self, rules_per_security_group): """Sets the rules_per_security_group of this ResourceLimits. The maximum number of rules per security group. # noqa: E501 :param rules_per_security_group: The rules_per_security_group of this ResourceLimits. # noqa: E501 :type rules_per_security_group: int """ if self.local_vars_configuration.client_side_validation and rules_per_security_group is None: # noqa: E501 raise ValueError("Invalid value for `rules_per_security_group`, must not be `None`") # noqa: E501 self._rules_per_security_group = rules_per_security_group def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourceLimits): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourceLimits): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource_properties.py0000644000175100001660000001231515046550311023503 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourceProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'sec_auth_protection': 'bool', } attribute_map = { 'name': 'name', 'sec_auth_protection': 'secAuthProtection', } def __init__(self, name=None, sec_auth_protection=None, local_vars_configuration=None): # noqa: E501 """ResourceProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._sec_auth_protection = None self.discriminator = None if name is not None: self.name = name if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection @property def name(self): """Gets the name of this ResourceProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this ResourceProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ResourceProperties. The name of the resource. # noqa: E501 :param name: The name of this ResourceProperties. # noqa: E501 :type name: str """ self._name = name @property def sec_auth_protection(self): """Gets the sec_auth_protection of this ResourceProperties. # noqa: E501 Boolean value representing if the resource is multi factor protected or not e.g. using two factor protection. Currently only data centers and snapshots are allowed to be multi factor protected, The value of attribute if null is intentional and it means that the resource doesn't support multi factor protection at all. # noqa: E501 :return: The sec_auth_protection of this ResourceProperties. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this ResourceProperties. Boolean value representing if the resource is multi factor protected or not e.g. using two factor protection. Currently only data centers and snapshots are allowed to be multi factor protected, The value of attribute if null is intentional and it means that the resource doesn't support multi factor protection at all. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this ResourceProperties. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourceProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourceProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resource_reference.py0000644000175100001660000001231015046550311023240 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourceReference(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', } def __init__(self, id=None, type=None, href=None, local_vars_configuration=None): # noqa: E501 """ResourceReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self.discriminator = None self.id = id if type is not None: self.type = type if href is not None: self.href = href @property def id(self): """Gets the id of this ResourceReference. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ResourceReference. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ResourceReference. The resource's unique identifier. # noqa: E501 :param id: The id of this ResourceReference. # noqa: E501 :type id: str """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @property def type(self): """Gets the type of this ResourceReference. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this ResourceReference. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ResourceReference. The type of object that has been created. # noqa: E501 :param type: The type of this ResourceReference. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ResourceReference. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this ResourceReference. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ResourceReference. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ResourceReference. # noqa: E501 :type href: str """ self._href = href def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourceReference): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourceReference): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resources.py0000644000175100001660000001316215046550311021413 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Resources(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Resource]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Resources - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Resources. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Resources. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Resources. The resource's unique identifier. # noqa: E501 :param id: The id of this Resources. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Resources. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this Resources. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Resources. The type of the resource. # noqa: E501 :param type: The type of this Resources. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Resources. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Resources. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Resources. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Resources. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Resources. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Resources. # noqa: E501 :rtype: list[Resource] """ return self._items @items.setter def items(self, items): """Sets the items of this Resources. Array of items in the collection. # noqa: E501 :param items: The items of this Resources. # noqa: E501 :type items: list[Resource] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Resources): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Resources): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/resources_users.py0000644000175100001660000001332615046550311022636 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ResourcesUsers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Resource]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """ResourcesUsers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this ResourcesUsers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this ResourcesUsers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this ResourcesUsers. The resource's unique identifier. # noqa: E501 :param id: The id of this ResourcesUsers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this ResourcesUsers. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this ResourcesUsers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this ResourcesUsers. The type of the resource. # noqa: E501 :param type: The type of this ResourcesUsers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this ResourcesUsers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this ResourcesUsers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this ResourcesUsers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this ResourcesUsers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this ResourcesUsers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this ResourcesUsers. # noqa: E501 :rtype: list[Resource] """ return self._items @items.setter def items(self, items): """Sets the items of this ResourcesUsers. Array of items in the collection. # noqa: E501 :param items: The items of this ResourcesUsers. # noqa: E501 :type items: list[Resource] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ResourcesUsers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ResourcesUsers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/restore_snapshot.py0000644000175100001660000000731715046550311023010 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RestoreSnapshot(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'RestoreSnapshotProperties', } attribute_map = { 'properties': 'properties', } def __init__(self, properties=None, local_vars_configuration=None): # noqa: E501 """RestoreSnapshot - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self.discriminator = None if properties is not None: self.properties = properties @property def properties(self): """Gets the properties of this RestoreSnapshot. # noqa: E501 :return: The properties of this RestoreSnapshot. # noqa: E501 :rtype: RestoreSnapshotProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this RestoreSnapshot. :param properties: The properties of this RestoreSnapshot. # noqa: E501 :type properties: RestoreSnapshotProperties """ self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RestoreSnapshot): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RestoreSnapshot): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/restore_snapshot_properties.py0000644000175100001660000000751315046550311025262 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class RestoreSnapshotProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'snapshot_id': 'str', } attribute_map = { 'snapshot_id': 'snapshotId', } def __init__(self, snapshot_id=None, local_vars_configuration=None): # noqa: E501 """RestoreSnapshotProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._snapshot_id = None self.discriminator = None if snapshot_id is not None: self.snapshot_id = snapshot_id @property def snapshot_id(self): """Gets the snapshot_id of this RestoreSnapshotProperties. # noqa: E501 The id of the snapshot # noqa: E501 :return: The snapshot_id of this RestoreSnapshotProperties. # noqa: E501 :rtype: str """ return self._snapshot_id @snapshot_id.setter def snapshot_id(self, snapshot_id): """Sets the snapshot_id of this RestoreSnapshotProperties. The id of the snapshot # noqa: E501 :param snapshot_id: The snapshot_id of this RestoreSnapshotProperties. # noqa: E501 :type snapshot_id: str """ self._snapshot_id = snapshot_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, RestoreSnapshotProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, RestoreSnapshotProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_bucket.py0000644000175100001660000000735315046550311021270 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3Bucket(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', } attribute_map = { 'name': 'name', } def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """S3Bucket - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None self.name = name @property def name(self): """Gets the name of this S3Bucket. # noqa: E501 The name of the Object storage bucket. # noqa: E501 :return: The name of this S3Bucket. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this S3Bucket. The name of the Object storage bucket. # noqa: E501 :param name: The name of this S3Bucket. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3Bucket): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3Bucket): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_key.py0000644000175100001660000001453415046550311020602 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3Key(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'S3KeyMetadata', 'properties': 'S3KeyProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """S3Key - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this S3Key. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this S3Key. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this S3Key. The resource's unique identifier. # noqa: E501 :param id: The id of this S3Key. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this S3Key. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this S3Key. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this S3Key. The type of the resource. # noqa: E501 :param type: The type of this S3Key. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this S3Key. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this S3Key. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this S3Key. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this S3Key. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this S3Key. # noqa: E501 :return: The metadata of this S3Key. # noqa: E501 :rtype: S3KeyMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this S3Key. :param metadata: The metadata of this S3Key. # noqa: E501 :type metadata: S3KeyMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this S3Key. # noqa: E501 :return: The properties of this S3Key. # noqa: E501 :rtype: S3KeyProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this S3Key. :param properties: The properties of this S3Key. # noqa: E501 :type properties: S3KeyProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3Key): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3Key): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_key_metadata.py0000644000175100001660000002356615046550311022447 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3KeyMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'etag': 'str', 'created_date': 'datetime', 'created_by': 'str', 'created_by_user_id': 'str', 'last_modified_date': 'datetime', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', } attribute_map = { 'etag': 'etag', 'created_date': 'createdDate', 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'last_modified_date': 'lastModifiedDate', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', } def __init__(self, etag=None, created_date=None, created_by=None, created_by_user_id=None, last_modified_date=None, last_modified_by=None, last_modified_by_user_id=None, local_vars_configuration=None): # noqa: E501 """S3KeyMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._etag = None self._created_date = None self._created_by = None self._created_by_user_id = None self._last_modified_date = None self._last_modified_by = None self._last_modified_by_user_id = None self.discriminator = None if etag is not None: self.etag = etag if created_date is not None: self.created_date = created_date if created_by is not None: self.created_by = created_by if created_by_user_id is not None: self.created_by_user_id = created_by_user_id if last_modified_date is not None: self.last_modified_date = last_modified_date if last_modified_by is not None: self.last_modified_by = last_modified_by if last_modified_by_user_id is not None: self.last_modified_by_user_id = last_modified_by_user_id @property def etag(self): """Gets the etag of this S3KeyMetadata. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this S3KeyMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this S3KeyMetadata. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this S3KeyMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def created_date(self): """Gets the created_date of this S3KeyMetadata. # noqa: E501 The time when the Object storage key was created. # noqa: E501 :return: The created_date of this S3KeyMetadata. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this S3KeyMetadata. The time when the Object storage key was created. # noqa: E501 :param created_date: The created_date of this S3KeyMetadata. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def created_by(self): """Gets the created_by of this S3KeyMetadata. # noqa: E501 Unique name of the identity that created the resource. # noqa: E501 :return: The created_by of this S3KeyMetadata. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter def created_by(self, created_by): """Sets the created_by of this S3KeyMetadata. Unique name of the identity that created the resource. # noqa: E501 :param created_by: The created_by of this S3KeyMetadata. # noqa: E501 :type created_by: str """ self._created_by = created_by @property def created_by_user_id(self): """Gets the created_by_user_id of this S3KeyMetadata. # noqa: E501 The unique ID of the user who created the Object storage key. # noqa: E501 :return: The created_by_user_id of this S3KeyMetadata. # noqa: E501 :rtype: str """ return self._created_by_user_id @created_by_user_id.setter def created_by_user_id(self, created_by_user_id): """Sets the created_by_user_id of this S3KeyMetadata. The unique ID of the user who created the Object storage key. # noqa: E501 :param created_by_user_id: The created_by_user_id of this S3KeyMetadata. # noqa: E501 :type created_by_user_id: str """ self._created_by_user_id = created_by_user_id @property def last_modified_date(self): """Gets the last_modified_date of this S3KeyMetadata. # noqa: E501 The last time the Object storage key was modified. # noqa: E501 :return: The last_modified_date of this S3KeyMetadata. # noqa: E501 :rtype: datetime """ return self._last_modified_date @last_modified_date.setter def last_modified_date(self, last_modified_date): """Sets the last_modified_date of this S3KeyMetadata. The last time the Object storage key was modified. # noqa: E501 :param last_modified_date: The last_modified_date of this S3KeyMetadata. # noqa: E501 :type last_modified_date: datetime """ self._last_modified_date = last_modified_date @property def last_modified_by(self): """Gets the last_modified_by of this S3KeyMetadata. # noqa: E501 Unique name of the identity that last modified the Object storage key. # noqa: E501 :return: The last_modified_by of this S3KeyMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by @last_modified_by.setter def last_modified_by(self, last_modified_by): """Sets the last_modified_by of this S3KeyMetadata. Unique name of the identity that last modified the Object storage key. # noqa: E501 :param last_modified_by: The last_modified_by of this S3KeyMetadata. # noqa: E501 :type last_modified_by: str """ self._last_modified_by = last_modified_by @property def last_modified_by_user_id(self): """Gets the last_modified_by_user_id of this S3KeyMetadata. # noqa: E501 The unique ID of the user who last modified the Object storage key. # noqa: E501 :return: The last_modified_by_user_id of this S3KeyMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by_user_id @last_modified_by_user_id.setter def last_modified_by_user_id(self, last_modified_by_user_id): """Sets the last_modified_by_user_id of this S3KeyMetadata. The unique ID of the user who last modified the Object storage key. # noqa: E501 :param last_modified_by_user_id: The last_modified_by_user_id of this S3KeyMetadata. # noqa: E501 :type last_modified_by_user_id: str """ self._last_modified_by_user_id = last_modified_by_user_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3KeyMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3KeyMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_key_properties.py0000644000175100001660000001101515046550311023045 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3KeyProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'secret_key': 'str', 'active': 'bool', } attribute_map = { 'secret_key': 'secretKey', 'active': 'active', } def __init__(self, secret_key=None, active=None, local_vars_configuration=None): # noqa: E501 """S3KeyProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._secret_key = None self._active = None self.discriminator = None if secret_key is not None: self.secret_key = secret_key if active is not None: self.active = active @property def secret_key(self): """Gets the secret_key of this S3KeyProperties. # noqa: E501 Secret of the Object storage key. # noqa: E501 :return: The secret_key of this S3KeyProperties. # noqa: E501 :rtype: str """ return self._secret_key @secret_key.setter def secret_key(self, secret_key): """Sets the secret_key of this S3KeyProperties. Secret of the Object storage key. # noqa: E501 :param secret_key: The secret_key of this S3KeyProperties. # noqa: E501 :type secret_key: str """ self._secret_key = secret_key @property def active(self): """Gets the active of this S3KeyProperties. # noqa: E501 Denotes weather the Object storage key is active. # noqa: E501 :return: The active of this S3KeyProperties. # noqa: E501 :rtype: bool """ return self._active @active.setter def active(self, active): """Sets the active of this S3KeyProperties. Denotes weather the Object storage key is active. # noqa: E501 :param active: The active of this S3KeyProperties. # noqa: E501 :type active: bool """ self._active = active def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3KeyProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3KeyProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_keys.py0000644000175100001660000001305515046550311020762 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3Keys(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[S3Key]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """S3Keys - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this S3Keys. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this S3Keys. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this S3Keys. The resource's unique identifier. # noqa: E501 :param id: The id of this S3Keys. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this S3Keys. # noqa: E501 The type of the resource. # noqa: E501 :return: The type of this S3Keys. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this S3Keys. The type of the resource. # noqa: E501 :param type: The type of this S3Keys. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this S3Keys. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this S3Keys. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this S3Keys. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this S3Keys. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this S3Keys. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this S3Keys. # noqa: E501 :rtype: list[S3Key] """ return self._items @items.setter def items(self, items): """Sets the items of this S3Keys. Array of items in the collection. # noqa: E501 :param items: The items of this S3Keys. # noqa: E501 :type items: list[S3Key] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3Keys): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3Keys): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/s3_object_storage_sso.py0000644000175100001660000000735115046550311023667 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class S3ObjectStorageSSO(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'sso_url': 'str', } attribute_map = { 'sso_url': 'ssoUrl', } def __init__(self, sso_url=None, local_vars_configuration=None): # noqa: E501 """S3ObjectStorageSSO - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._sso_url = None self.discriminator = None if sso_url is not None: self.sso_url = sso_url @property def sso_url(self): """Gets the sso_url of this S3ObjectStorageSSO. # noqa: E501 The Ionos object storage single sign on url # noqa: E501 :return: The sso_url of this S3ObjectStorageSSO. # noqa: E501 :rtype: str """ return self._sso_url @sso_url.setter def sso_url(self, sso_url): """Sets the sso_url of this S3ObjectStorageSSO. The Ionos object storage single sign on url # noqa: E501 :param sso_url: The sso_url of this S3ObjectStorageSSO. # noqa: E501 :type sso_url: str """ self._sso_url = sso_url def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, S3ObjectStorageSSO): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, S3ObjectStorageSSO): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_group.py0000644000175100001660000001652615046550311022473 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroup(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'SecurityGroupProperties', 'entities': 'SecurityGroupEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """SecurityGroup - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this SecurityGroup. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this SecurityGroup. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this SecurityGroup. The resource's unique identifier. # noqa: E501 :param id: The id of this SecurityGroup. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this SecurityGroup. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this SecurityGroup. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this SecurityGroup. The type of object that has been created. # noqa: E501 :param type: The type of this SecurityGroup. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this SecurityGroup. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this SecurityGroup. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this SecurityGroup. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this SecurityGroup. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this SecurityGroup. # noqa: E501 :return: The metadata of this SecurityGroup. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this SecurityGroup. :param metadata: The metadata of this SecurityGroup. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this SecurityGroup. # noqa: E501 :return: The properties of this SecurityGroup. # noqa: E501 :rtype: SecurityGroupProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this SecurityGroup. :param properties: The properties of this SecurityGroup. # noqa: E501 :type properties: SecurityGroupProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this SecurityGroup. # noqa: E501 :return: The entities of this SecurityGroup. # noqa: E501 :rtype: SecurityGroupEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this SecurityGroup. :param entities: The entities of this SecurityGroup. # noqa: E501 :type entities: SecurityGroupEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroup): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroup): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_group_entities.py0000644000175100001660000001163015046550311024366 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroupEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'rules': 'FirewallRules', 'nics': 'Nics', 'servers': 'Servers', } attribute_map = { 'rules': 'rules', 'nics': 'nics', 'servers': 'servers', } def __init__(self, rules=None, nics=None, servers=None, local_vars_configuration=None): # noqa: E501 """SecurityGroupEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._rules = None self._nics = None self._servers = None self.discriminator = None if rules is not None: self.rules = rules if nics is not None: self.nics = nics if servers is not None: self.servers = servers @property def rules(self): """Gets the rules of this SecurityGroupEntities. # noqa: E501 :return: The rules of this SecurityGroupEntities. # noqa: E501 :rtype: FirewallRules """ return self._rules @rules.setter def rules(self, rules): """Sets the rules of this SecurityGroupEntities. :param rules: The rules of this SecurityGroupEntities. # noqa: E501 :type rules: FirewallRules """ self._rules = rules @property def nics(self): """Gets the nics of this SecurityGroupEntities. # noqa: E501 :return: The nics of this SecurityGroupEntities. # noqa: E501 :rtype: Nics """ return self._nics @nics.setter def nics(self, nics): """Sets the nics of this SecurityGroupEntities. :param nics: The nics of this SecurityGroupEntities. # noqa: E501 :type nics: Nics """ self._nics = nics @property def servers(self): """Gets the servers of this SecurityGroupEntities. # noqa: E501 :return: The servers of this SecurityGroupEntities. # noqa: E501 :rtype: Servers """ return self._servers @servers.setter def servers(self, servers): """Sets the servers of this SecurityGroupEntities. :param servers: The servers of this SecurityGroupEntities. # noqa: E501 :type servers: Servers """ self._servers = servers def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroupEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroupEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_group_entities_request.py0000644000175100001660000000725215046550311026143 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroupEntitiesRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'rules': 'FirewallRules', } attribute_map = { 'rules': 'rules', } def __init__(self, rules=None, local_vars_configuration=None): # noqa: E501 """SecurityGroupEntitiesRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._rules = None self.discriminator = None if rules is not None: self.rules = rules @property def rules(self): """Gets the rules of this SecurityGroupEntitiesRequest. # noqa: E501 :return: The rules of this SecurityGroupEntitiesRequest. # noqa: E501 :rtype: FirewallRules """ return self._rules @rules.setter def rules(self, rules): """Sets the rules of this SecurityGroupEntitiesRequest. :param rules: The rules of this SecurityGroupEntitiesRequest. # noqa: E501 :type rules: FirewallRules """ self._rules = rules def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroupEntitiesRequest): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroupEntitiesRequest): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_group_properties.py0000644000175100001660000001230715046550311024740 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroupProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', } attribute_map = { 'name': 'name', 'description': 'description', } def __init__(self, name=None, description=None, local_vars_configuration=None): # noqa: E501 """SecurityGroupProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self.discriminator = None self.name = name if description is not None: self.description = description @property def name(self): """Gets the name of this SecurityGroupProperties. # noqa: E501 The name of the security group. # noqa: E501 :return: The name of this SecurityGroupProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this SecurityGroupProperties. The name of the security group. # noqa: E501 :param name: The name of this SecurityGroupProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and name is not None and len(name) > 60): raise ValueError("Invalid value for `name`, length must be less than or equal to `60`") # noqa: E501 self._name = name @property def description(self): """Gets the description of this SecurityGroupProperties. # noqa: E501 The description of the security group. # noqa: E501 :return: The description of this SecurityGroupProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this SecurityGroupProperties. The description of the security group. # noqa: E501 :param description: The description of this SecurityGroupProperties. # noqa: E501 :type description: str """ if (self.local_vars_configuration.client_side_validation and description is not None and len(description) > 300): raise ValueError("Invalid value for `description`, length must be less than or equal to `300`") # noqa: E501 self._description = description def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroupProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroupProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_group_request.py0000644000175100001660000001123015046550311024226 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroupRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'SecurityGroupProperties', 'entities': 'SecurityGroupEntitiesRequest', } attribute_map = { 'properties': 'properties', 'entities': 'entities', } def __init__(self, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """SecurityGroupRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self._entities = None self.discriminator = None self.properties = properties if entities is not None: self.entities = entities @property def properties(self): """Gets the properties of this SecurityGroupRequest. # noqa: E501 :return: The properties of this SecurityGroupRequest. # noqa: E501 :rtype: SecurityGroupProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this SecurityGroupRequest. :param properties: The properties of this SecurityGroupRequest. # noqa: E501 :type properties: SecurityGroupProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this SecurityGroupRequest. # noqa: E501 :return: The entities of this SecurityGroupRequest. # noqa: E501 :rtype: SecurityGroupEntitiesRequest """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this SecurityGroupRequest. :param entities: The entities of this SecurityGroupRequest. # noqa: E501 :type entities: SecurityGroupEntitiesRequest """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroupRequest): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroupRequest): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/security_groups.py0000644000175100001660000001760015046550311022650 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SecurityGroups(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[SecurityGroup]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """SecurityGroups - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this SecurityGroups. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this SecurityGroups. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this SecurityGroups. The resource's unique identifier. # noqa: E501 :param id: The id of this SecurityGroups. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this SecurityGroups. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this SecurityGroups. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this SecurityGroups. The type of object that has been created. # noqa: E501 :param type: The type of this SecurityGroups. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this SecurityGroups. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this SecurityGroups. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this SecurityGroups. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this SecurityGroups. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this SecurityGroups. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this SecurityGroups. # noqa: E501 :rtype: list[SecurityGroup] """ return self._items @items.setter def items(self, items): """Sets the items of this SecurityGroups. Array of items in the collection. # noqa: E501 :param items: The items of this SecurityGroups. # noqa: E501 :type items: list[SecurityGroup] """ self._items = items @property def offset(self): """Gets the offset of this SecurityGroups. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this SecurityGroups. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this SecurityGroups. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this SecurityGroups. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this SecurityGroups. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this SecurityGroups. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this SecurityGroups. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this SecurityGroups. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this SecurityGroups. # noqa: E501 :return: The links of this SecurityGroups. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this SecurityGroups. :param links: The links of this SecurityGroups. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SecurityGroups): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SecurityGroups): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/server.py0000644000175100001660000001614015046550311020706 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Server(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ServerProperties', 'entities': 'ServerEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """Server - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this Server. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Server. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Server. The resource's unique identifier. # noqa: E501 :param id: The id of this Server. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Server. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Server. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Server. The type of object that has been created. # noqa: E501 :param type: The type of this Server. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Server. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Server. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Server. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Server. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Server. # noqa: E501 :return: The metadata of this Server. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Server. :param metadata: The metadata of this Server. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Server. # noqa: E501 :return: The properties of this Server. # noqa: E501 :rtype: ServerProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Server. :param properties: The properties of this Server. # noqa: E501 :type properties: ServerProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this Server. # noqa: E501 :return: The entities of this Server. # noqa: E501 :rtype: ServerEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this Server. :param entities: The entities of this Server. # noqa: E501 :type entities: ServerEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Server): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Server): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/server_entities.py0000644000175100001660000001320315046550311022607 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ServerEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'cdroms': 'Cdroms', 'volumes': 'AttachedVolumes', 'nics': 'Nics', 'securitygroups': 'SecurityGroups', } attribute_map = { 'cdroms': 'cdroms', 'volumes': 'volumes', 'nics': 'nics', 'securitygroups': 'securitygroups', } def __init__(self, cdroms=None, volumes=None, nics=None, securitygroups=None, local_vars_configuration=None): # noqa: E501 """ServerEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._cdroms = None self._volumes = None self._nics = None self._securitygroups = None self.discriminator = None if cdroms is not None: self.cdroms = cdroms if volumes is not None: self.volumes = volumes if nics is not None: self.nics = nics if securitygroups is not None: self.securitygroups = securitygroups @property def cdroms(self): """Gets the cdroms of this ServerEntities. # noqa: E501 :return: The cdroms of this ServerEntities. # noqa: E501 :rtype: Cdroms """ return self._cdroms @cdroms.setter def cdroms(self, cdroms): """Sets the cdroms of this ServerEntities. :param cdroms: The cdroms of this ServerEntities. # noqa: E501 :type cdroms: Cdroms """ self._cdroms = cdroms @property def volumes(self): """Gets the volumes of this ServerEntities. # noqa: E501 :return: The volumes of this ServerEntities. # noqa: E501 :rtype: AttachedVolumes """ return self._volumes @volumes.setter def volumes(self, volumes): """Sets the volumes of this ServerEntities. :param volumes: The volumes of this ServerEntities. # noqa: E501 :type volumes: AttachedVolumes """ self._volumes = volumes @property def nics(self): """Gets the nics of this ServerEntities. # noqa: E501 :return: The nics of this ServerEntities. # noqa: E501 :rtype: Nics """ return self._nics @nics.setter def nics(self, nics): """Sets the nics of this ServerEntities. :param nics: The nics of this ServerEntities. # noqa: E501 :type nics: Nics """ self._nics = nics @property def securitygroups(self): """Gets the securitygroups of this ServerEntities. # noqa: E501 :return: The securitygroups of this ServerEntities. # noqa: E501 :rtype: SecurityGroups """ return self._securitygroups @securitygroups.setter def securitygroups(self, securitygroups): """Sets the securitygroups of this ServerEntities. :param securitygroups: The securitygroups of this ServerEntities. # noqa: E501 :type securitygroups: SecurityGroups """ self._securitygroups = securitygroups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ServerEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ServerEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/server_properties.py0000644000175100001660000003703115046550311023164 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class ServerProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'template_uuid': 'str', 'name': 'str', 'hostname': 'str', 'cores': 'int', 'ram': 'int', 'availability_zone': 'str', 'vm_state': 'str', 'boot_cdrom': 'ResourceReference', 'boot_volume': 'ResourceReference', 'cpu_family': 'str', 'type': 'str', 'nic_multi_queue': 'bool', } attribute_map = { 'template_uuid': 'templateUuid', 'name': 'name', 'hostname': 'hostname', 'cores': 'cores', 'ram': 'ram', 'availability_zone': 'availabilityZone', 'vm_state': 'vmState', 'boot_cdrom': 'bootCdrom', 'boot_volume': 'bootVolume', 'cpu_family': 'cpuFamily', 'type': 'type', 'nic_multi_queue': 'nicMultiQueue', } def __init__(self, template_uuid=None, name=None, hostname=None, cores=None, ram=None, availability_zone=None, vm_state=None, boot_cdrom=None, boot_volume=None, cpu_family=None, type=None, nic_multi_queue=None, local_vars_configuration=None): # noqa: E501 """ServerProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._template_uuid = None self._name = None self._hostname = None self._cores = None self._ram = None self._availability_zone = None self._vm_state = None self._boot_cdrom = None self._boot_volume = None self._cpu_family = None self._type = None self._nic_multi_queue = None self.discriminator = None if template_uuid is not None: self.template_uuid = template_uuid if name is not None: self.name = name if hostname is not None: self.hostname = hostname if cores is not None: self.cores = cores if ram is not None: self.ram = ram if availability_zone is not None: self.availability_zone = availability_zone if vm_state is not None: self.vm_state = vm_state if boot_cdrom is not None: self.boot_cdrom = boot_cdrom if boot_volume is not None: self.boot_volume = boot_volume if cpu_family is not None: self.cpu_family = cpu_family if type is not None: self.type = type if nic_multi_queue is not None: self.nic_multi_queue = nic_multi_queue @property def template_uuid(self): """Gets the template_uuid of this ServerProperties. # noqa: E501 The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. # noqa: E501 :return: The template_uuid of this ServerProperties. # noqa: E501 :rtype: str """ return self._template_uuid @template_uuid.setter def template_uuid(self, template_uuid): """Sets the template_uuid of this ServerProperties. The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. # noqa: E501 :param template_uuid: The template_uuid of this ServerProperties. # noqa: E501 :type template_uuid: str """ self._template_uuid = template_uuid @property def name(self): """Gets the name of this ServerProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this ServerProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this ServerProperties. The name of the resource. # noqa: E501 :param name: The name of this ServerProperties. # noqa: E501 :type name: str """ self._name = name @property def hostname(self): """Gets the hostname of this ServerProperties. # noqa: E501 The hostname of the resource. Allowed characters are a-z, 0-9 and - (minus). Hostname should not start with minus and should not be longer than 63 characters. # noqa: E501 :return: The hostname of this ServerProperties. # noqa: E501 :rtype: str """ return self._hostname @hostname.setter def hostname(self, hostname): """Sets the hostname of this ServerProperties. The hostname of the resource. Allowed characters are a-z, 0-9 and - (minus). Hostname should not start with minus and should not be longer than 63 characters. # noqa: E501 :param hostname: The hostname of this ServerProperties. # noqa: E501 :type hostname: str """ self._hostname = hostname @property def cores(self): """Gets the cores of this ServerProperties. # noqa: E501 The total number of cores for the enterprise server. # noqa: E501 :return: The cores of this ServerProperties. # noqa: E501 :rtype: int """ return self._cores @cores.setter def cores(self, cores): """Sets the cores of this ServerProperties. The total number of cores for the enterprise server. # noqa: E501 :param cores: The cores of this ServerProperties. # noqa: E501 :type cores: int """ self._cores = cores @property def ram(self): """Gets the ram of this ServerProperties. # noqa: E501 The memory size for the enterprise server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. # noqa: E501 :return: The ram of this ServerProperties. # noqa: E501 :rtype: int """ return self._ram @ram.setter def ram(self, ram): """Sets the ram of this ServerProperties. The memory size for the enterprise server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. # noqa: E501 :param ram: The ram of this ServerProperties. # noqa: E501 :type ram: int """ self._ram = ram @property def availability_zone(self): """Gets the availability_zone of this ServerProperties. # noqa: E501 The availability zone in which the server should be provisioned. # noqa: E501 :return: The availability_zone of this ServerProperties. # noqa: E501 :rtype: str """ return self._availability_zone @availability_zone.setter def availability_zone(self, availability_zone): """Sets the availability_zone of this ServerProperties. The availability zone in which the server should be provisioned. # noqa: E501 :param availability_zone: The availability_zone of this ServerProperties. # noqa: E501 :type availability_zone: str """ allowed_values = ["AUTO", "ZONE_1", "ZONE_2"] # noqa: E501 if self.local_vars_configuration.client_side_validation and availability_zone not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `availability_zone` ({0}), must be one of {1}" # noqa: E501 .format(availability_zone, allowed_values) ) self._availability_zone = availability_zone @property def vm_state(self): """Gets the vm_state of this ServerProperties. # noqa: E501 Status of the virtual machine. # noqa: E501 :return: The vm_state of this ServerProperties. # noqa: E501 :rtype: str """ return self._vm_state @vm_state.setter def vm_state(self, vm_state): """Sets the vm_state of this ServerProperties. Status of the virtual machine. # noqa: E501 :param vm_state: The vm_state of this ServerProperties. # noqa: E501 :type vm_state: str """ allowed_values = ["NOSTATE", "RUNNING", "BLOCKED", "PAUSED", "SHUTDOWN", "SHUTOFF", "CRASHED", "SUSPENDED"] # noqa: E501 if self.local_vars_configuration.client_side_validation and vm_state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `vm_state` ({0}), must be one of {1}" # noqa: E501 .format(vm_state, allowed_values) ) self._vm_state = vm_state @property def boot_cdrom(self): """Gets the boot_cdrom of this ServerProperties. # noqa: E501 :return: The boot_cdrom of this ServerProperties. # noqa: E501 :rtype: ResourceReference """ return self._boot_cdrom @boot_cdrom.setter def boot_cdrom(self, boot_cdrom): """Sets the boot_cdrom of this ServerProperties. :param boot_cdrom: The boot_cdrom of this ServerProperties. # noqa: E501 :type boot_cdrom: ResourceReference """ self._boot_cdrom = boot_cdrom @property def boot_volume(self): """Gets the boot_volume of this ServerProperties. # noqa: E501 :return: The boot_volume of this ServerProperties. # noqa: E501 :rtype: ResourceReference """ return self._boot_volume @boot_volume.setter def boot_volume(self, boot_volume): """Sets the boot_volume of this ServerProperties. :param boot_volume: The boot_volume of this ServerProperties. # noqa: E501 :type boot_volume: ResourceReference """ self._boot_volume = boot_volume @property def cpu_family(self): """Gets the cpu_family of this ServerProperties. # noqa: E501 CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE and VCPU servers. # noqa: E501 :return: The cpu_family of this ServerProperties. # noqa: E501 :rtype: str """ return self._cpu_family @cpu_family.setter def cpu_family(self, cpu_family): """Sets the cpu_family of this ServerProperties. CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE and VCPU servers. # noqa: E501 :param cpu_family: The cpu_family of this ServerProperties. # noqa: E501 :type cpu_family: str """ self._cpu_family = cpu_family @property def type(self): """Gets the type of this ServerProperties. # noqa: E501 Server type: CUBE, ENTERPRISE or VCPU. # noqa: E501 :return: The type of this ServerProperties. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this ServerProperties. Server type: CUBE, ENTERPRISE or VCPU. # noqa: E501 :param type: The type of this ServerProperties. # noqa: E501 :type type: str """ self._type = type @property def nic_multi_queue(self): """Gets the nic_multi_queue of this ServerProperties. # noqa: E501 Activate or deactivate the Multi Queue feature on all NICs of this server. This feature is beneficial to enable when the NICs are experiencing performance issues (e.g. low throughput). Toggling this feature will also initiate a restart of the server. If the specified value is `true`, the feature will be activated; if it is not specified or set to `false`, the feature will be deactivated. It is not allowed for servers of type Cube. # noqa: E501 :return: The nic_multi_queue of this ServerProperties. # noqa: E501 :rtype: bool """ return self._nic_multi_queue @nic_multi_queue.setter def nic_multi_queue(self, nic_multi_queue): """Sets the nic_multi_queue of this ServerProperties. Activate or deactivate the Multi Queue feature on all NICs of this server. This feature is beneficial to enable when the NICs are experiencing performance issues (e.g. low throughput). Toggling this feature will also initiate a restart of the server. If the specified value is `true`, the feature will be activated; if it is not specified or set to `false`, the feature will be deactivated. It is not allowed for servers of type Cube. # noqa: E501 :param nic_multi_queue: The nic_multi_queue of this ServerProperties. # noqa: E501 :type nic_multi_queue: bool """ self._nic_multi_queue = nic_multi_queue def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ServerProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ServerProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/servers.py0000644000175100001660000001720315046550311021072 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Servers(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Server]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Servers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Servers. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Servers. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Servers. The resource's unique identifier. # noqa: E501 :param id: The id of this Servers. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Servers. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Servers. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Servers. The type of object that has been created. # noqa: E501 :param type: The type of this Servers. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Servers. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Servers. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Servers. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Servers. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Servers. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Servers. # noqa: E501 :rtype: list[Server] """ return self._items @items.setter def items(self, items): """Sets the items of this Servers. Array of items in the collection. # noqa: E501 :param items: The items of this Servers. # noqa: E501 :type items: list[Server] """ self._items = items @property def offset(self): """Gets the offset of this Servers. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Servers. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Servers. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Servers. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Servers. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Servers. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Servers. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Servers. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Servers. # noqa: E501 :return: The links of this Servers. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Servers. :param links: The links of this Servers. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Servers): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Servers): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/snapshot.py0000644000175100001660000001476115046550311021246 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Snapshot(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'SnapshotProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Snapshot - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Snapshot. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Snapshot. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Snapshot. The resource's unique identifier. # noqa: E501 :param id: The id of this Snapshot. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Snapshot. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Snapshot. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Snapshot. The type of object that has been created. # noqa: E501 :param type: The type of this Snapshot. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Snapshot. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Snapshot. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Snapshot. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Snapshot. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Snapshot. # noqa: E501 :return: The metadata of this Snapshot. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Snapshot. :param metadata: The metadata of this Snapshot. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Snapshot. # noqa: E501 :return: The properties of this Snapshot. # noqa: E501 :rtype: SnapshotProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Snapshot. :param properties: The properties of this Snapshot. # noqa: E501 :type properties: SnapshotProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Snapshot): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Snapshot): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/snapshot_properties.py0000644000175100001660000005370715046550311023525 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class SnapshotProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'description': 'str', 'location': 'str', 'size': 'float', 'sec_auth_protection': 'bool', 'cpu_hot_plug': 'bool', 'cpu_hot_unplug': 'bool', 'ram_hot_plug': 'bool', 'ram_hot_unplug': 'bool', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'disc_scsi_hot_plug': 'bool', 'expose_serial': 'bool', 'require_legacy_bios': 'bool', 'disc_scsi_hot_unplug': 'bool', 'licence_type': 'str', 'application_type': 'str', } attribute_map = { 'name': 'name', 'description': 'description', 'location': 'location', 'size': 'size', 'sec_auth_protection': 'secAuthProtection', 'cpu_hot_plug': 'cpuHotPlug', 'cpu_hot_unplug': 'cpuHotUnplug', 'ram_hot_plug': 'ramHotPlug', 'ram_hot_unplug': 'ramHotUnplug', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'disc_scsi_hot_plug': 'discScsiHotPlug', 'expose_serial': 'exposeSerial', 'require_legacy_bios': 'requireLegacyBios', 'disc_scsi_hot_unplug': 'discScsiHotUnplug', 'licence_type': 'licenceType', 'application_type': 'applicationType', } def __init__(self, name=None, description=None, location=None, size=None, sec_auth_protection=None, cpu_hot_plug=None, cpu_hot_unplug=None, ram_hot_plug=None, ram_hot_unplug=None, nic_hot_plug=None, nic_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, disc_scsi_hot_plug=None, expose_serial=False, require_legacy_bios=True, disc_scsi_hot_unplug=None, licence_type=None, application_type=None, local_vars_configuration=None): # noqa: E501 """SnapshotProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._description = None self._location = None self._size = None self._sec_auth_protection = None self._cpu_hot_plug = None self._cpu_hot_unplug = None self._ram_hot_plug = None self._ram_hot_unplug = None self._nic_hot_plug = None self._nic_hot_unplug = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._disc_scsi_hot_plug = None self._expose_serial = None self._require_legacy_bios = None self._disc_scsi_hot_unplug = None self._licence_type = None self._application_type = None self.discriminator = None if name is not None: self.name = name if description is not None: self.description = description if location is not None: self.location = location if size is not None: self.size = size if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if cpu_hot_plug is not None: self.cpu_hot_plug = cpu_hot_plug if cpu_hot_unplug is not None: self.cpu_hot_unplug = cpu_hot_unplug if ram_hot_plug is not None: self.ram_hot_plug = ram_hot_plug if ram_hot_unplug is not None: self.ram_hot_unplug = ram_hot_unplug if nic_hot_plug is not None: self.nic_hot_plug = nic_hot_plug if nic_hot_unplug is not None: self.nic_hot_unplug = nic_hot_unplug if disc_virtio_hot_plug is not None: self.disc_virtio_hot_plug = disc_virtio_hot_plug if disc_virtio_hot_unplug is not None: self.disc_virtio_hot_unplug = disc_virtio_hot_unplug if disc_scsi_hot_plug is not None: self.disc_scsi_hot_plug = disc_scsi_hot_plug if expose_serial is not None: self.expose_serial = expose_serial if require_legacy_bios is not None: self.require_legacy_bios = require_legacy_bios if disc_scsi_hot_unplug is not None: self.disc_scsi_hot_unplug = disc_scsi_hot_unplug if licence_type is not None: self.licence_type = licence_type if application_type is not None: self.application_type = application_type @property def name(self): """Gets the name of this SnapshotProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this SnapshotProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this SnapshotProperties. The name of the resource. # noqa: E501 :param name: The name of this SnapshotProperties. # noqa: E501 :type name: str """ self._name = name @property def description(self): """Gets the description of this SnapshotProperties. # noqa: E501 Human-readable description. # noqa: E501 :return: The description of this SnapshotProperties. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this SnapshotProperties. Human-readable description. # noqa: E501 :param description: The description of this SnapshotProperties. # noqa: E501 :type description: str """ self._description = description @property def location(self): """Gets the location of this SnapshotProperties. # noqa: E501 Location of that image/snapshot. # noqa: E501 :return: The location of this SnapshotProperties. # noqa: E501 :rtype: str """ return self._location @location.setter def location(self, location): """Sets the location of this SnapshotProperties. Location of that image/snapshot. # noqa: E501 :param location: The location of this SnapshotProperties. # noqa: E501 :type location: str """ self._location = location @property def size(self): """Gets the size of this SnapshotProperties. # noqa: E501 The size of the image in GB. # noqa: E501 :return: The size of this SnapshotProperties. # noqa: E501 :rtype: float """ return self._size @size.setter def size(self, size): """Sets the size of this SnapshotProperties. The size of the image in GB. # noqa: E501 :param size: The size of this SnapshotProperties. # noqa: E501 :type size: float """ self._size = size @property def sec_auth_protection(self): """Gets the sec_auth_protection of this SnapshotProperties. # noqa: E501 Boolean value representing if the snapshot requires extra protection, such as two-step verification. # noqa: E501 :return: The sec_auth_protection of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._sec_auth_protection @sec_auth_protection.setter def sec_auth_protection(self, sec_auth_protection): """Sets the sec_auth_protection of this SnapshotProperties. Boolean value representing if the snapshot requires extra protection, such as two-step verification. # noqa: E501 :param sec_auth_protection: The sec_auth_protection of this SnapshotProperties. # noqa: E501 :type sec_auth_protection: bool """ self._sec_auth_protection = sec_auth_protection @property def cpu_hot_plug(self): """Gets the cpu_hot_plug of this SnapshotProperties. # noqa: E501 Hot-plug capable CPU (no reboot required). # noqa: E501 :return: The cpu_hot_plug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._cpu_hot_plug @cpu_hot_plug.setter def cpu_hot_plug(self, cpu_hot_plug): """Sets the cpu_hot_plug of this SnapshotProperties. Hot-plug capable CPU (no reboot required). # noqa: E501 :param cpu_hot_plug: The cpu_hot_plug of this SnapshotProperties. # noqa: E501 :type cpu_hot_plug: bool """ self._cpu_hot_plug = cpu_hot_plug @property def cpu_hot_unplug(self): """Gets the cpu_hot_unplug of this SnapshotProperties. # noqa: E501 Hot-unplug capable CPU (no reboot required). # noqa: E501 :return: The cpu_hot_unplug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._cpu_hot_unplug @cpu_hot_unplug.setter def cpu_hot_unplug(self, cpu_hot_unplug): """Sets the cpu_hot_unplug of this SnapshotProperties. Hot-unplug capable CPU (no reboot required). # noqa: E501 :param cpu_hot_unplug: The cpu_hot_unplug of this SnapshotProperties. # noqa: E501 :type cpu_hot_unplug: bool """ self._cpu_hot_unplug = cpu_hot_unplug @property def ram_hot_plug(self): """Gets the ram_hot_plug of this SnapshotProperties. # noqa: E501 Hot-plug capable RAM (no reboot required). # noqa: E501 :return: The ram_hot_plug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._ram_hot_plug @ram_hot_plug.setter def ram_hot_plug(self, ram_hot_plug): """Sets the ram_hot_plug of this SnapshotProperties. Hot-plug capable RAM (no reboot required). # noqa: E501 :param ram_hot_plug: The ram_hot_plug of this SnapshotProperties. # noqa: E501 :type ram_hot_plug: bool """ self._ram_hot_plug = ram_hot_plug @property def ram_hot_unplug(self): """Gets the ram_hot_unplug of this SnapshotProperties. # noqa: E501 Hot-unplug capable RAM (no reboot required). # noqa: E501 :return: The ram_hot_unplug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._ram_hot_unplug @ram_hot_unplug.setter def ram_hot_unplug(self, ram_hot_unplug): """Sets the ram_hot_unplug of this SnapshotProperties. Hot-unplug capable RAM (no reboot required). # noqa: E501 :param ram_hot_unplug: The ram_hot_unplug of this SnapshotProperties. # noqa: E501 :type ram_hot_unplug: bool """ self._ram_hot_unplug = ram_hot_unplug @property def nic_hot_plug(self): """Gets the nic_hot_plug of this SnapshotProperties. # noqa: E501 Hot-plug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_plug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_plug @nic_hot_plug.setter def nic_hot_plug(self, nic_hot_plug): """Sets the nic_hot_plug of this SnapshotProperties. Hot-plug capable NIC (no reboot required). # noqa: E501 :param nic_hot_plug: The nic_hot_plug of this SnapshotProperties. # noqa: E501 :type nic_hot_plug: bool """ self._nic_hot_plug = nic_hot_plug @property def nic_hot_unplug(self): """Gets the nic_hot_unplug of this SnapshotProperties. # noqa: E501 Hot-unplug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_unplug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_unplug @nic_hot_unplug.setter def nic_hot_unplug(self, nic_hot_unplug): """Sets the nic_hot_unplug of this SnapshotProperties. Hot-unplug capable NIC (no reboot required). # noqa: E501 :param nic_hot_unplug: The nic_hot_unplug of this SnapshotProperties. # noqa: E501 :type nic_hot_unplug: bool """ self._nic_hot_unplug = nic_hot_unplug @property def disc_virtio_hot_plug(self): """Gets the disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501 Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :return: The disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_plug @disc_virtio_hot_plug.setter def disc_virtio_hot_plug(self, disc_virtio_hot_plug): """Sets the disc_virtio_hot_plug of this SnapshotProperties. Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :param disc_virtio_hot_plug: The disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501 :type disc_virtio_hot_plug: bool """ self._disc_virtio_hot_plug = disc_virtio_hot_plug @property def disc_virtio_hot_unplug(self): """Gets the disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501 Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :return: The disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_unplug @disc_virtio_hot_unplug.setter def disc_virtio_hot_unplug(self, disc_virtio_hot_unplug): """Sets the disc_virtio_hot_unplug of this SnapshotProperties. Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :param disc_virtio_hot_unplug: The disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501 :type disc_virtio_hot_unplug: bool """ self._disc_virtio_hot_unplug = disc_virtio_hot_unplug @property def disc_scsi_hot_plug(self): """Gets the disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501 Hot-plug capable SCSI drive (no reboot required). # noqa: E501 :return: The disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._disc_scsi_hot_plug @disc_scsi_hot_plug.setter def disc_scsi_hot_plug(self, disc_scsi_hot_plug): """Sets the disc_scsi_hot_plug of this SnapshotProperties. Hot-plug capable SCSI drive (no reboot required). # noqa: E501 :param disc_scsi_hot_plug: The disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501 :type disc_scsi_hot_plug: bool """ self._disc_scsi_hot_plug = disc_scsi_hot_plug @property def expose_serial(self): """Gets the expose_serial of this SnapshotProperties. # noqa: E501 If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :return: The expose_serial of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._expose_serial @expose_serial.setter def expose_serial(self, expose_serial): """Sets the expose_serial of this SnapshotProperties. If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :param expose_serial: The expose_serial of this SnapshotProperties. # noqa: E501 :type expose_serial: bool """ self._expose_serial = expose_serial @property def require_legacy_bios(self): """Gets the require_legacy_bios of this SnapshotProperties. # noqa: E501 Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :return: The require_legacy_bios of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._require_legacy_bios @require_legacy_bios.setter def require_legacy_bios(self, require_legacy_bios): """Sets the require_legacy_bios of this SnapshotProperties. Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :param require_legacy_bios: The require_legacy_bios of this SnapshotProperties. # noqa: E501 :type require_legacy_bios: bool """ self._require_legacy_bios = require_legacy_bios @property def disc_scsi_hot_unplug(self): """Gets the disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501 Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. # noqa: E501 :return: The disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501 :rtype: bool """ return self._disc_scsi_hot_unplug @disc_scsi_hot_unplug.setter def disc_scsi_hot_unplug(self, disc_scsi_hot_unplug): """Sets the disc_scsi_hot_unplug of this SnapshotProperties. Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. # noqa: E501 :param disc_scsi_hot_unplug: The disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501 :type disc_scsi_hot_unplug: bool """ self._disc_scsi_hot_unplug = disc_scsi_hot_unplug @property def licence_type(self): """Gets the licence_type of this SnapshotProperties. # noqa: E501 OS type of this snapshot # noqa: E501 :return: The licence_type of this SnapshotProperties. # noqa: E501 :rtype: str """ return self._licence_type @licence_type.setter def licence_type(self, licence_type): """Sets the licence_type of this SnapshotProperties. OS type of this snapshot # noqa: E501 :param licence_type: The licence_type of this SnapshotProperties. # noqa: E501 :type licence_type: str """ allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2019", "WINDOWS2022", "WINDOWS2025", "RHEL", "LINUX", "OTHER"] # noqa: E501 if self.local_vars_configuration.client_side_validation and licence_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `licence_type` ({0}), must be one of {1}" # noqa: E501 .format(licence_type, allowed_values) ) self._licence_type = licence_type @property def application_type(self): """Gets the application_type of this SnapshotProperties. # noqa: E501 The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :return: The application_type of this SnapshotProperties. # noqa: E501 :rtype: str """ return self._application_type @application_type.setter def application_type(self, application_type): """Sets the application_type of this SnapshotProperties. The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :param application_type: The application_type of this SnapshotProperties. # noqa: E501 :type application_type: str """ self._application_type = application_type def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SnapshotProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, SnapshotProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/snapshots.py0000644000175100001660000001322215046550311021420 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Snapshots(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Snapshot]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Snapshots - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Snapshots. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Snapshots. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Snapshots. The resource's unique identifier. # noqa: E501 :param id: The id of this Snapshots. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Snapshots. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Snapshots. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Snapshots. The type of object that has been created. # noqa: E501 :param type: The type of this Snapshots. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Snapshots. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Snapshots. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Snapshots. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Snapshots. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Snapshots. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Snapshots. # noqa: E501 :rtype: list[Snapshot] """ return self._items @items.setter def items(self, items): """Sets the items of this Snapshots. Array of items in the collection. # noqa: E501 :param items: The items of this Snapshots. # noqa: E501 :type items: list[Snapshot] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Snapshots): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Snapshots): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group.py0000644000175100001660000001511215046550311022100 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroup(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'TargetGroupProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """TargetGroup - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this TargetGroup. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this TargetGroup. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this TargetGroup. The resource's unique identifier. # noqa: E501 :param id: The id of this TargetGroup. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this TargetGroup. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this TargetGroup. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this TargetGroup. The type of object that has been created. # noqa: E501 :param type: The type of this TargetGroup. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this TargetGroup. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this TargetGroup. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this TargetGroup. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this TargetGroup. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this TargetGroup. # noqa: E501 :return: The metadata of this TargetGroup. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this TargetGroup. :param metadata: The metadata of this TargetGroup. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this TargetGroup. # noqa: E501 :return: The properties of this TargetGroup. # noqa: E501 :rtype: TargetGroupProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this TargetGroup. :param properties: The properties of this TargetGroup. # noqa: E501 :type properties: TargetGroupProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroup): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroup): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group_health_check.py0000644000175100001660000001434315046550311024567 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroupHealthCheck(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'check_timeout': 'int', 'check_interval': 'int', 'retries': 'int', } attribute_map = { 'check_timeout': 'checkTimeout', 'check_interval': 'checkInterval', 'retries': 'retries', } def __init__(self, check_timeout=None, check_interval=None, retries=None, local_vars_configuration=None): # noqa: E501 """TargetGroupHealthCheck - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._check_timeout = None self._check_interval = None self._retries = None self.discriminator = None if check_timeout is not None: self.check_timeout = check_timeout if check_interval is not None: self.check_interval = check_interval if retries is not None: self.retries = retries @property def check_timeout(self): """Gets the check_timeout of this TargetGroupHealthCheck. # noqa: E501 The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established. # noqa: E501 :return: The check_timeout of this TargetGroupHealthCheck. # noqa: E501 :rtype: int """ return self._check_timeout @check_timeout.setter def check_timeout(self, check_timeout): """Sets the check_timeout of this TargetGroupHealthCheck. The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established. # noqa: E501 :param check_timeout: The check_timeout of this TargetGroupHealthCheck. # noqa: E501 :type check_timeout: int """ self._check_timeout = check_timeout @property def check_interval(self): """Gets the check_interval of this TargetGroupHealthCheck. # noqa: E501 The interval in milliseconds between consecutive health checks; the default value is '2000'. # noqa: E501 :return: The check_interval of this TargetGroupHealthCheck. # noqa: E501 :rtype: int """ return self._check_interval @check_interval.setter def check_interval(self, check_interval): """Sets the check_interval of this TargetGroupHealthCheck. The interval in milliseconds between consecutive health checks; the default value is '2000'. # noqa: E501 :param check_interval: The check_interval of this TargetGroupHealthCheck. # noqa: E501 :type check_interval: int """ self._check_interval = check_interval @property def retries(self): """Gets the retries of this TargetGroupHealthCheck. # noqa: E501 The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'. # noqa: E501 :return: The retries of this TargetGroupHealthCheck. # noqa: E501 :rtype: int """ return self._retries @retries.setter def retries(self, retries): """Sets the retries of this TargetGroupHealthCheck. The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'. # noqa: E501 :param retries: The retries of this TargetGroupHealthCheck. # noqa: E501 :type retries: int """ self._retries = retries def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroupHealthCheck): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroupHealthCheck): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group_http_health_check.py0000644000175100001660000002276415046550311025634 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroupHttpHealthCheck(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'path': 'str', 'method': 'str', 'match_type': 'str', 'response': 'str', 'regex': 'bool', 'negate': 'bool', } attribute_map = { 'path': 'path', 'method': 'method', 'match_type': 'matchType', 'response': 'response', 'regex': 'regex', 'negate': 'negate', } def __init__(self, path=None, method=None, match_type=None, response=None, regex=None, negate=None, local_vars_configuration=None): # noqa: E501 """TargetGroupHttpHealthCheck - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._path = None self._method = None self._match_type = None self._response = None self._regex = None self._negate = None self.discriminator = None if path is not None: self.path = path if method is not None: self.method = method self.match_type = match_type self.response = response if regex is not None: self.regex = regex if negate is not None: self.negate = negate @property def path(self): """Gets the path of this TargetGroupHttpHealthCheck. # noqa: E501 The destination URL for HTTP the health check; the default is '/'. # noqa: E501 :return: The path of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: str """ return self._path @path.setter def path(self, path): """Sets the path of this TargetGroupHttpHealthCheck. The destination URL for HTTP the health check; the default is '/'. # noqa: E501 :param path: The path of this TargetGroupHttpHealthCheck. # noqa: E501 :type path: str """ self._path = path @property def method(self): """Gets the method of this TargetGroupHttpHealthCheck. # noqa: E501 The method used for the health check request. # noqa: E501 :return: The method of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): """Sets the method of this TargetGroupHttpHealthCheck. The method used for the health check request. # noqa: E501 :param method: The method of this TargetGroupHttpHealthCheck. # noqa: E501 :type method: str """ allowed_values = ["HEAD", "PUT", "POST", "GET", "TRACE", "PATCH", "OPTIONS"] # noqa: E501 if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 .format(method, allowed_values) ) self._method = method @property def match_type(self): """Gets the match_type of this TargetGroupHttpHealthCheck. # noqa: E501 Specify the target's response type to match ALB's request. # noqa: E501 :return: The match_type of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: str """ return self._match_type @match_type.setter def match_type(self, match_type): """Sets the match_type of this TargetGroupHttpHealthCheck. Specify the target's response type to match ALB's request. # noqa: E501 :param match_type: The match_type of this TargetGroupHttpHealthCheck. # noqa: E501 :type match_type: str """ if self.local_vars_configuration.client_side_validation and match_type is None: # noqa: E501 raise ValueError("Invalid value for `match_type`, must not be `None`") # noqa: E501 allowed_values = ["STATUS_CODE", "RESPONSE_BODY"] # noqa: E501 if self.local_vars_configuration.client_side_validation and match_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `match_type` ({0}), must be one of {1}" # noqa: E501 .format(match_type, allowed_values) ) self._match_type = match_type @property def response(self): """Gets the response of this TargetGroupHttpHealthCheck. # noqa: E501 The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. # noqa: E501 :return: The response of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: str """ return self._response @response.setter def response(self, response): """Sets the response of this TargetGroupHttpHealthCheck. The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. # noqa: E501 :param response: The response of this TargetGroupHttpHealthCheck. # noqa: E501 :type response: str """ if self.local_vars_configuration.client_side_validation and response is None: # noqa: E501 raise ValueError("Invalid value for `response`, must not be `None`") # noqa: E501 self._response = response @property def regex(self): """Gets the regex of this TargetGroupHttpHealthCheck. # noqa: E501 Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'. By using regular expressions, you can flexibly customize the expected response from a healthy server. # noqa: E501 :return: The regex of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: bool """ return self._regex @regex.setter def regex(self, regex): """Sets the regex of this TargetGroupHttpHealthCheck. Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'. By using regular expressions, you can flexibly customize the expected response from a healthy server. # noqa: E501 :param regex: The regex of this TargetGroupHttpHealthCheck. # noqa: E501 :type regex: bool """ self._regex = regex @property def negate(self): """Gets the negate of this TargetGroupHttpHealthCheck. # noqa: E501 Specifies whether to negate an individual entry; the default value is 'FALSE'. # noqa: E501 :return: The negate of this TargetGroupHttpHealthCheck. # noqa: E501 :rtype: bool """ return self._negate @negate.setter def negate(self, negate): """Sets the negate of this TargetGroupHttpHealthCheck. Specifies whether to negate an individual entry; the default value is 'FALSE'. # noqa: E501 :param negate: The negate of this TargetGroupHttpHealthCheck. # noqa: E501 :type negate: bool """ self._negate = negate def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroupHttpHealthCheck): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroupHttpHealthCheck): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group_properties.py0000644000175100001660000002664715046550311024373 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroupProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'algorithm': 'str', 'protocol': 'str', 'protocol_version': 'str', 'targets': 'list[TargetGroupTarget]', 'health_check': 'TargetGroupHealthCheck', 'http_health_check': 'TargetGroupHttpHealthCheck', } attribute_map = { 'name': 'name', 'algorithm': 'algorithm', 'protocol': 'protocol', 'protocol_version': 'protocolVersion', 'targets': 'targets', 'health_check': 'healthCheck', 'http_health_check': 'httpHealthCheck', } def __init__(self, name=None, algorithm=None, protocol=None, protocol_version=None, targets=None, health_check=None, http_health_check=None, local_vars_configuration=None): # noqa: E501 """TargetGroupProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._algorithm = None self._protocol = None self._protocol_version = None self._targets = None self._health_check = None self._http_health_check = None self.discriminator = None self.name = name self.algorithm = algorithm self.protocol = protocol if protocol_version is not None: self.protocol_version = protocol_version if targets is not None: self.targets = targets if health_check is not None: self.health_check = health_check if http_health_check is not None: self.http_health_check = http_health_check @property def name(self): """Gets the name of this TargetGroupProperties. # noqa: E501 The target group name. # noqa: E501 :return: The name of this TargetGroupProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this TargetGroupProperties. The target group name. # noqa: E501 :param name: The name of this TargetGroupProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def algorithm(self): """Gets the algorithm of this TargetGroupProperties. # noqa: E501 The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers. - **Round Robin**: Targets are served alternately according to their weighting. - **Least Connection**: The target with the least active connection is served. - **Random**: The targets are served based on a consistent pseudorandom algorithm. - **Source IP**: It is ensured that the same client IP address reaches the same target. # noqa: E501 :return: The algorithm of this TargetGroupProperties. # noqa: E501 :rtype: str """ return self._algorithm @algorithm.setter def algorithm(self, algorithm): """Sets the algorithm of this TargetGroupProperties. The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers. - **Round Robin**: Targets are served alternately according to their weighting. - **Least Connection**: The target with the least active connection is served. - **Random**: The targets are served based on a consistent pseudorandom algorithm. - **Source IP**: It is ensured that the same client IP address reaches the same target. # noqa: E501 :param algorithm: The algorithm of this TargetGroupProperties. # noqa: E501 :type algorithm: str """ if self.local_vars_configuration.client_side_validation and algorithm is None: # noqa: E501 raise ValueError("Invalid value for `algorithm`, must not be `None`") # noqa: E501 allowed_values = ["ROUND_ROBIN", "LEAST_CONNECTION", "RANDOM", "SOURCE_IP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and algorithm not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `algorithm` ({0}), must be one of {1}" # noqa: E501 .format(algorithm, allowed_values) ) self._algorithm = algorithm @property def protocol(self): """Gets the protocol of this TargetGroupProperties. # noqa: E501 The forwarding protocol. Only the value 'HTTP' is allowed. # noqa: E501 :return: The protocol of this TargetGroupProperties. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this TargetGroupProperties. The forwarding protocol. Only the value 'HTTP' is allowed. # noqa: E501 :param protocol: The protocol of this TargetGroupProperties. # noqa: E501 :type protocol: str """ if self.local_vars_configuration.client_side_validation and protocol is None: # noqa: E501 raise ValueError("Invalid value for `protocol`, must not be `None`") # noqa: E501 allowed_values = ["HTTP"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol @property def protocol_version(self): """Gets the protocol_version of this TargetGroupProperties. # noqa: E501 The forwarding protocol version. Value is ignored when protocol is not 'HTTP'. # noqa: E501 :return: The protocol_version of this TargetGroupProperties. # noqa: E501 :rtype: str """ return self._protocol_version @protocol_version.setter def protocol_version(self, protocol_version): """Sets the protocol_version of this TargetGroupProperties. The forwarding protocol version. Value is ignored when protocol is not 'HTTP'. # noqa: E501 :param protocol_version: The protocol_version of this TargetGroupProperties. # noqa: E501 :type protocol_version: str """ allowed_values = ["HTTP1", "HTTP2"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol_version not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol_version` ({0}), must be one of {1}" # noqa: E501 .format(protocol_version, allowed_values) ) self._protocol_version = protocol_version @property def targets(self): """Gets the targets of this TargetGroupProperties. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The targets of this TargetGroupProperties. # noqa: E501 :rtype: list[TargetGroupTarget] """ return self._targets @targets.setter def targets(self, targets): """Sets the targets of this TargetGroupProperties. Array of items in the collection. # noqa: E501 :param targets: The targets of this TargetGroupProperties. # noqa: E501 :type targets: list[TargetGroupTarget] """ self._targets = targets @property def health_check(self): """Gets the health_check of this TargetGroupProperties. # noqa: E501 :return: The health_check of this TargetGroupProperties. # noqa: E501 :rtype: TargetGroupHealthCheck """ return self._health_check @health_check.setter def health_check(self, health_check): """Sets the health_check of this TargetGroupProperties. :param health_check: The health_check of this TargetGroupProperties. # noqa: E501 :type health_check: TargetGroupHealthCheck """ self._health_check = health_check @property def http_health_check(self): """Gets the http_health_check of this TargetGroupProperties. # noqa: E501 :return: The http_health_check of this TargetGroupProperties. # noqa: E501 :rtype: TargetGroupHttpHealthCheck """ return self._http_health_check @http_health_check.setter def http_health_check(self, http_health_check): """Sets the http_health_check of this TargetGroupProperties. :param http_health_check: The http_health_check of this TargetGroupProperties. # noqa: E501 :type http_health_check: TargetGroupHttpHealthCheck """ self._http_health_check = http_health_check def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroupProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroupProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group_put.py0000644000175100001660000001365415046550311023001 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroupPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'properties': 'TargetGroupProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, properties=None, local_vars_configuration=None): # noqa: E501 """TargetGroupPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href self.properties = properties @property def id(self): """Gets the id of this TargetGroupPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this TargetGroupPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this TargetGroupPut. The resource's unique identifier. # noqa: E501 :param id: The id of this TargetGroupPut. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this TargetGroupPut. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this TargetGroupPut. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this TargetGroupPut. The type of object that has been created. # noqa: E501 :param type: The type of this TargetGroupPut. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this TargetGroupPut. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this TargetGroupPut. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this TargetGroupPut. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this TargetGroupPut. # noqa: E501 :type href: str """ self._href = href @property def properties(self): """Gets the properties of this TargetGroupPut. # noqa: E501 :return: The properties of this TargetGroupPut. # noqa: E501 :rtype: TargetGroupProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this TargetGroupPut. :param properties: The properties of this TargetGroupPut. # noqa: E501 :type properties: TargetGroupProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroupPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroupPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_group_target.py0000644000175100001660000002435615046550311023460 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroupTarget(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ip': 'str', 'port': 'int', 'weight': 'int', 'proxy_protocol': 'str', 'health_check_enabled': 'bool', 'maintenance_enabled': 'bool', } attribute_map = { 'ip': 'ip', 'port': 'port', 'weight': 'weight', 'proxy_protocol': 'proxyProtocol', 'health_check_enabled': 'healthCheckEnabled', 'maintenance_enabled': 'maintenanceEnabled', } def __init__(self, ip=None, port=None, weight=None, proxy_protocol='none', health_check_enabled=None, maintenance_enabled=None, local_vars_configuration=None): # noqa: E501 """TargetGroupTarget - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ip = None self._port = None self._weight = None self._proxy_protocol = None self._health_check_enabled = None self._maintenance_enabled = None self.discriminator = None self.ip = ip self.port = port self.weight = weight if proxy_protocol is not None: self.proxy_protocol = proxy_protocol if health_check_enabled is not None: self.health_check_enabled = health_check_enabled if maintenance_enabled is not None: self.maintenance_enabled = maintenance_enabled @property def ip(self): """Gets the ip of this TargetGroupTarget. # noqa: E501 The IP address of the balanced target. # noqa: E501 :return: The ip of this TargetGroupTarget. # noqa: E501 :rtype: str """ return self._ip @ip.setter def ip(self, ip): """Sets the ip of this TargetGroupTarget. The IP address of the balanced target. # noqa: E501 :param ip: The ip of this TargetGroupTarget. # noqa: E501 :type ip: str """ if self.local_vars_configuration.client_side_validation and ip is None: # noqa: E501 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501 self._ip = ip @property def port(self): """Gets the port of this TargetGroupTarget. # noqa: E501 The port of the balanced target service; the valid range is 1 to 65535. # noqa: E501 :return: The port of this TargetGroupTarget. # noqa: E501 :rtype: int """ return self._port @port.setter def port(self, port): """Sets the port of this TargetGroupTarget. The port of the balanced target service; the valid range is 1 to 65535. # noqa: E501 :param port: The port of this TargetGroupTarget. # noqa: E501 :type port: int """ if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 self._port = port @property def weight(self): """Gets the weight of this TargetGroupTarget. # noqa: E501 The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments. # noqa: E501 :return: The weight of this TargetGroupTarget. # noqa: E501 :rtype: int """ return self._weight @weight.setter def weight(self, weight): """Sets the weight of this TargetGroupTarget. The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments. # noqa: E501 :param weight: The weight of this TargetGroupTarget. # noqa: E501 :type weight: int """ if self.local_vars_configuration.client_side_validation and weight is None: # noqa: E501 raise ValueError("Invalid value for `weight`, must not be `None`") # noqa: E501 self._weight = weight @property def proxy_protocol(self): """Gets the proxy_protocol of this TargetGroupTarget. # noqa: E501 Proxy protocol version. # noqa: E501 :return: The proxy_protocol of this TargetGroupTarget. # noqa: E501 :rtype: str """ return self._proxy_protocol @proxy_protocol.setter def proxy_protocol(self, proxy_protocol): """Sets the proxy_protocol of this TargetGroupTarget. Proxy protocol version. # noqa: E501 :param proxy_protocol: The proxy_protocol of this TargetGroupTarget. # noqa: E501 :type proxy_protocol: str """ allowed_values = ["none", "v1", "v2", "v2ssl"] # noqa: E501 if self.local_vars_configuration.client_side_validation and proxy_protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `proxy_protocol` ({0}), must be one of {1}" # noqa: E501 .format(proxy_protocol, allowed_values) ) self._proxy_protocol = proxy_protocol @property def health_check_enabled(self): """Gets the health_check_enabled of this TargetGroupTarget. # noqa: E501 When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'. # noqa: E501 :return: The health_check_enabled of this TargetGroupTarget. # noqa: E501 :rtype: bool """ return self._health_check_enabled @health_check_enabled.setter def health_check_enabled(self, health_check_enabled): """Sets the health_check_enabled of this TargetGroupTarget. When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'. # noqa: E501 :param health_check_enabled: The health_check_enabled of this TargetGroupTarget. # noqa: E501 :type health_check_enabled: bool """ self._health_check_enabled = health_check_enabled @property def maintenance_enabled(self): """Gets the maintenance_enabled of this TargetGroupTarget. # noqa: E501 When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. # noqa: E501 :return: The maintenance_enabled of this TargetGroupTarget. # noqa: E501 :rtype: bool """ return self._maintenance_enabled @maintenance_enabled.setter def maintenance_enabled(self, maintenance_enabled): """Sets the maintenance_enabled of this TargetGroupTarget. When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. # noqa: E501 :param maintenance_enabled: The maintenance_enabled of this TargetGroupTarget. # noqa: E501 :type maintenance_enabled: bool """ self._maintenance_enabled = maintenance_enabled def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroupTarget): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroupTarget): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_groups.py0000644000175100001660000002001215046550311022256 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetGroups(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[TargetGroup]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """TargetGroups - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this TargetGroups. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this TargetGroups. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this TargetGroups. The resource's unique identifier. # noqa: E501 :param id: The id of this TargetGroups. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this TargetGroups. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this TargetGroups. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this TargetGroups. The type of object that has been created. # noqa: E501 :param type: The type of this TargetGroups. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this TargetGroups. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this TargetGroups. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this TargetGroups. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this TargetGroups. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this TargetGroups. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this TargetGroups. # noqa: E501 :rtype: list[TargetGroup] """ return self._items @items.setter def items(self, items): """Sets the items of this TargetGroups. Array of items in the collection. # noqa: E501 :param items: The items of this TargetGroups. # noqa: E501 :type items: list[TargetGroup] """ self._items = items @property def offset(self): """Gets the offset of this TargetGroups. # noqa: E501 The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :return: The offset of this TargetGroups. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this TargetGroups. The offset, specified in the request (if not is specified, 0 is used by default). # noqa: E501 :param offset: The offset of this TargetGroups. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this TargetGroups. # noqa: E501 The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :return: The limit of this TargetGroups. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this TargetGroups. The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). # noqa: E501 :param limit: The limit of this TargetGroups. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this TargetGroups. # noqa: E501 :return: The links of this TargetGroups. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this TargetGroups. :param links: The links of this TargetGroups. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetGroups): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetGroups): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/target_port_range.py0000644000175100001660000001065715046550311023115 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TargetPortRange(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'start': 'int', 'end': 'int', } attribute_map = { 'start': 'start', 'end': 'end', } def __init__(self, start=None, end=None, local_vars_configuration=None): # noqa: E501 """TargetPortRange - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._start = None self._end = None self.discriminator = None if start is not None: self.start = start if end is not None: self.end = end @property def start(self): """Gets the start of this TargetPortRange. # noqa: E501 Target port range start associated with the NAT Gateway rule. # noqa: E501 :return: The start of this TargetPortRange. # noqa: E501 :rtype: int """ return self._start @start.setter def start(self, start): """Sets the start of this TargetPortRange. Target port range start associated with the NAT Gateway rule. # noqa: E501 :param start: The start of this TargetPortRange. # noqa: E501 :type start: int """ self._start = start @property def end(self): """Gets the end of this TargetPortRange. # noqa: E501 Target port range end associated with the NAT Gateway rule. # noqa: E501 :return: The end of this TargetPortRange. # noqa: E501 :rtype: int """ return self._end @end.setter def end(self, end): """Sets the end of this TargetPortRange. Target port range end associated with the NAT Gateway rule. # noqa: E501 :param end: The end of this TargetPortRange. # noqa: E501 :type end: int """ self._end = end def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TargetPortRange): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TargetPortRange): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/template.py0000644000175100001660000001477115046550311021223 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Template(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'TemplateProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Template - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties @property def id(self): """Gets the id of this Template. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Template. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Template. The resource's unique identifier. # noqa: E501 :param id: The id of this Template. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Template. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Template. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Template. The type of object that has been created. # noqa: E501 :param type: The type of this Template. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Template. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this Template. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Template. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Template. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Template. # noqa: E501 :return: The metadata of this Template. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Template. :param metadata: The metadata of this Template. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Template. # noqa: E501 :return: The properties of this Template. # noqa: E501 :rtype: TemplateProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Template. :param properties: The properties of this Template. # noqa: E501 :type properties: TemplateProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Template): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Template): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/template_properties.py0000644000175100001660000001661015046550311023471 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class TemplateProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'cores': 'float', 'ram': 'float', 'storage_size': 'float', 'category': 'str', } attribute_map = { 'name': 'name', 'cores': 'cores', 'ram': 'ram', 'storage_size': 'storageSize', 'category': 'category', } def __init__(self, name=None, cores=None, ram=None, storage_size=None, category=None, local_vars_configuration=None): # noqa: E501 """TemplateProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._cores = None self._ram = None self._storage_size = None self._category = None self.discriminator = None self.name = name self.cores = cores self.ram = ram self.storage_size = storage_size self.category = category @property def name(self): """Gets the name of this TemplateProperties. # noqa: E501 The resource name. # noqa: E501 :return: The name of this TemplateProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this TemplateProperties. The resource name. # noqa: E501 :param name: The name of this TemplateProperties. # noqa: E501 :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def cores(self): """Gets the cores of this TemplateProperties. # noqa: E501 The CPU cores count. # noqa: E501 :return: The cores of this TemplateProperties. # noqa: E501 :rtype: float """ return self._cores @cores.setter def cores(self, cores): """Sets the cores of this TemplateProperties. The CPU cores count. # noqa: E501 :param cores: The cores of this TemplateProperties. # noqa: E501 :type cores: float """ if self.local_vars_configuration.client_side_validation and cores is None: # noqa: E501 raise ValueError("Invalid value for `cores`, must not be `None`") # noqa: E501 self._cores = cores @property def ram(self): """Gets the ram of this TemplateProperties. # noqa: E501 The RAM size in MB. # noqa: E501 :return: The ram of this TemplateProperties. # noqa: E501 :rtype: float """ return self._ram @ram.setter def ram(self, ram): """Sets the ram of this TemplateProperties. The RAM size in MB. # noqa: E501 :param ram: The ram of this TemplateProperties. # noqa: E501 :type ram: float """ if self.local_vars_configuration.client_side_validation and ram is None: # noqa: E501 raise ValueError("Invalid value for `ram`, must not be `None`") # noqa: E501 self._ram = ram @property def storage_size(self): """Gets the storage_size of this TemplateProperties. # noqa: E501 The storage size in GB. # noqa: E501 :return: The storage_size of this TemplateProperties. # noqa: E501 :rtype: float """ return self._storage_size @storage_size.setter def storage_size(self, storage_size): """Sets the storage_size of this TemplateProperties. The storage size in GB. # noqa: E501 :param storage_size: The storage_size of this TemplateProperties. # noqa: E501 :type storage_size: float """ if self.local_vars_configuration.client_side_validation and storage_size is None: # noqa: E501 raise ValueError("Invalid value for `storage_size`, must not be `None`") # noqa: E501 self._storage_size = storage_size @property def category(self): """Gets the category of this TemplateProperties. # noqa: E501 The description of the template. # noqa: E501 :return: The category of this TemplateProperties. # noqa: E501 :rtype: str """ return self._category @category.setter def category(self, category): """Sets the category of this TemplateProperties. The description of the template. # noqa: E501 :param category: The category of this TemplateProperties. # noqa: E501 :type category: str """ if self.local_vars_configuration.client_side_validation and category is None: # noqa: E501 raise ValueError("Invalid value for `category`, must not be `None`") # noqa: E501 self._category = category def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, TemplateProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TemplateProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/templates.py0000644000175100001660000001323215046550311021375 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Templates(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Template]', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', } def __init__(self, id=None, type=None, href=None, items=None, local_vars_configuration=None): # noqa: E501 """Templates - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items @property def id(self): """Gets the id of this Templates. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Templates. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Templates. The resource's unique identifier. # noqa: E501 :param id: The id of this Templates. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Templates. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Templates. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Templates. The type of object that has been created. # noqa: E501 :param type: The type of this Templates. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Templates. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this Templates. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Templates. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Templates. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Templates. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Templates. # noqa: E501 :rtype: list[Template] """ return self._items @items.setter def items(self, items): """Sets the items of this Templates. Array of items in the collection. # noqa: E501 :param items: The items of this Templates. # noqa: E501 :type items: list[Template] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Templates): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Templates): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/token.py0000644000175100001660000000707015046550311020522 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Token(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'token': 'str', } attribute_map = { 'token': 'token', } def __init__(self, token=None, local_vars_configuration=None): # noqa: E501 """Token - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._token = None self.discriminator = None if token is not None: self.token = token @property def token(self): """Gets the token of this Token. # noqa: E501 The jwToken for the server. # noqa: E501 :return: The token of this Token. # noqa: E501 :rtype: str """ return self._token @token.setter def token(self, token): """Sets the token of this Token. The jwToken for the server. # noqa: E501 :param token: The token of this Token. # noqa: E501 :type token: str """ self._token = token def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Token): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Token): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/type.py0000644000175100001660000001036615046550311020365 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Type(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ allowed enum values """ DATACENTER = "datacenter" SERVER = "server" VOLUME = "volume" NIC = "nic" LOADBALANCER = "loadbalancer" LOCATION = "location" FIREWALL_RULE = "firewall-rule" FLOW_LOG = "flow-log" IMAGE = "image" SNAPSHOT = "snapshot" LAN = "lan" IPBLOCK = "ipblock" PCC = "pcc" CONTRACT = "contract" USER = "user" GROUP = "group" COLLECTION = "collection" RESOURCE = "resource" REQUEST = "request" REQUEST_STATUS = "request-status" S3KEY = "s3key" BACKUPUNIT = "backupunit" LABEL = "label" K8S = "k8s" NODEPOOL = "nodepool" TEMPLATE = "template" NETWORKLOADBALANCER = "networkloadbalancer" FORWARDING_RULE = "forwarding-rule" NATGATEWAY = "natgateway" NATGATEWAY_RULE = "natgateway-rule" NODE = "node" APPLICATIONLOADBALANCER = "applicationloadbalancer" TARGET_GROUP = "target-group" SECURITY_GROUP = "security-group" allowable_values = [DATACENTER, SERVER, VOLUME, NIC, LOADBALANCER, LOCATION, FIREWALL_RULE, FLOW_LOG, IMAGE, SNAPSHOT, LAN, IPBLOCK, PCC, CONTRACT, USER, GROUP, COLLECTION, RESOURCE, REQUEST, REQUEST_STATUS, S3KEY, BACKUPUNIT, LABEL, K8S, NODEPOOL, TEMPLATE, NETWORKLOADBALANCER, FORWARDING_RULE, NATGATEWAY, NATGATEWAY_RULE, NODE, APPLICATIONLOADBALANCER, TARGET_GROUP, SECURITY_GROUP] # noqa: E501 """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { } attribute_map = { } def __init__(self, local_vars_configuration=None): # noqa: E501 """Type - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Type): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Type): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user.py0000644000175100001660000001577015046550311020366 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class User(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'UserMetadata', 'properties': 'UserProperties', 'entities': 'UsersEntities', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', 'entities': 'entities', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, entities=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self._entities = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata self.properties = properties if entities is not None: self.entities = entities @property def id(self): """Gets the id of this User. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this User. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this User. The resource's unique identifier. # noqa: E501 :param id: The id of this User. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this User. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this User. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this User. The type of object that has been created. # noqa: E501 :param type: The type of this User. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this User. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this User. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this User. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this User. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this User. # noqa: E501 :return: The metadata of this User. # noqa: E501 :rtype: UserMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this User. :param metadata: The metadata of this User. # noqa: E501 :type metadata: UserMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this User. # noqa: E501 :return: The properties of this User. # noqa: E501 :rtype: UserProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this User. :param properties: The properties of this User. # noqa: E501 :type properties: UserProperties """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties @property def entities(self): """Gets the entities of this User. # noqa: E501 :return: The entities of this User. # noqa: E501 :rtype: UsersEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this User. :param entities: The entities of this User. # noqa: E501 :type entities: UsersEntities """ self._entities = entities def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, User): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, User): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_group_post.py0000644000175100001660000000733515046550311022645 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserGroupPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', } attribute_map = { 'id': 'id', } def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 """UserGroupPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self.discriminator = None self.id = id @property def id(self): """Gets the id of this UserGroupPost. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this UserGroupPost. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this UserGroupPost. The resource's unique identifier. # noqa: E501 :param id: The id of this UserGroupPost. # noqa: E501 :type id: str """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserGroupPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserGroupPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_metadata.py0000644000175100001660000002475015046550311022224 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserMetadata(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'etag': 'str', 'created_date': 'datetime', 'created_by': 'str', 'created_by_user_id': 'str', 'last_modified_date': 'datetime', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', 'last_login': 'datetime', } attribute_map = { 'etag': 'etag', 'created_date': 'createdDate', 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'last_modified_date': 'lastModifiedDate', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', 'last_login': 'lastLogin', } def __init__(self, etag=None, created_date=None, created_by=None, created_by_user_id=None, last_modified_date=None, last_modified_by=None, last_modified_by_user_id=None, last_login=None, local_vars_configuration=None): # noqa: E501 """UserMetadata - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._etag = None self._created_date = None self._created_by = None self._created_by_user_id = None self._last_modified_date = None self._last_modified_by = None self._last_modified_by_user_id = None self._last_login = None self.discriminator = None if etag is not None: self.etag = etag if created_date is not None: self.created_date = created_date if created_by is not None: self.created_by = created_by if created_by_user_id is not None: self.created_by_user_id = created_by_user_id if last_modified_date is not None: self.last_modified_date = last_modified_date if last_modified_by is not None: self.last_modified_by = last_modified_by if last_modified_by_user_id is not None: self.last_modified_by_user_id = last_modified_by_user_id if last_login is not None: self.last_login = last_login @property def etag(self): """Gets the etag of this UserMetadata. # noqa: E501 Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :return: The etag of this UserMetadata. # noqa: E501 :rtype: str """ return self._etag @etag.setter def etag(self, etag): """Sets the etag of this UserMetadata. Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. # noqa: E501 :param etag: The etag of this UserMetadata. # noqa: E501 :type etag: str """ self._etag = etag @property def created_date(self): """Gets the created_date of this UserMetadata. # noqa: E501 The time the user was created. # noqa: E501 :return: The created_date of this UserMetadata. # noqa: E501 :rtype: datetime """ return self._created_date @created_date.setter def created_date(self, created_date): """Sets the created_date of this UserMetadata. The time the user was created. # noqa: E501 :param created_date: The created_date of this UserMetadata. # noqa: E501 :type created_date: datetime """ self._created_date = created_date @property def created_by(self): """Gets the created_by of this UserMetadata. # noqa: E501 The user who has created the resource. # noqa: E501 :return: The created_by of this UserMetadata. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter def created_by(self, created_by): """Sets the created_by of this UserMetadata. The user who has created the resource. # noqa: E501 :param created_by: The created_by of this UserMetadata. # noqa: E501 :type created_by: str """ self._created_by = created_by @property def created_by_user_id(self): """Gets the created_by_user_id of this UserMetadata. # noqa: E501 The unique ID of the user who created the resource. # noqa: E501 :return: The created_by_user_id of this UserMetadata. # noqa: E501 :rtype: str """ return self._created_by_user_id @created_by_user_id.setter def created_by_user_id(self, created_by_user_id): """Sets the created_by_user_id of this UserMetadata. The unique ID of the user who created the resource. # noqa: E501 :param created_by_user_id: The created_by_user_id of this UserMetadata. # noqa: E501 :type created_by_user_id: str """ self._created_by_user_id = created_by_user_id @property def last_modified_date(self): """Gets the last_modified_date of this UserMetadata. # noqa: E501 The last time the resource was modified. # noqa: E501 :return: The last_modified_date of this UserMetadata. # noqa: E501 :rtype: datetime """ return self._last_modified_date @last_modified_date.setter def last_modified_date(self, last_modified_date): """Sets the last_modified_date of this UserMetadata. The last time the resource was modified. # noqa: E501 :param last_modified_date: The last_modified_date of this UserMetadata. # noqa: E501 :type last_modified_date: datetime """ self._last_modified_date = last_modified_date @property def last_modified_by(self): """Gets the last_modified_by of this UserMetadata. # noqa: E501 The user who last modified the resource. # noqa: E501 :return: The last_modified_by of this UserMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by @last_modified_by.setter def last_modified_by(self, last_modified_by): """Sets the last_modified_by of this UserMetadata. The user who last modified the resource. # noqa: E501 :param last_modified_by: The last_modified_by of this UserMetadata. # noqa: E501 :type last_modified_by: str """ self._last_modified_by = last_modified_by @property def last_modified_by_user_id(self): """Gets the last_modified_by_user_id of this UserMetadata. # noqa: E501 The unique ID of the user who last modified the resource. # noqa: E501 :return: The last_modified_by_user_id of this UserMetadata. # noqa: E501 :rtype: str """ return self._last_modified_by_user_id @last_modified_by_user_id.setter def last_modified_by_user_id(self, last_modified_by_user_id): """Sets the last_modified_by_user_id of this UserMetadata. The unique ID of the user who last modified the resource. # noqa: E501 :param last_modified_by_user_id: The last_modified_by_user_id of this UserMetadata. # noqa: E501 :type last_modified_by_user_id: str """ self._last_modified_by_user_id = last_modified_by_user_id @property def last_login(self): """Gets the last_login of this UserMetadata. # noqa: E501 The time of the last login by the user. # noqa: E501 :return: The last_login of this UserMetadata. # noqa: E501 :rtype: datetime """ return self._last_login @last_login.setter def last_login(self, last_login): """Sets the last_login of this UserMetadata. The time of the last login by the user. # noqa: E501 :param last_login: The last_login of this UserMetadata. # noqa: E501 :type last_login: datetime """ self._last_login = last_login def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserMetadata): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserMetadata): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_post.py0000644000175100001660000000744215046550311021430 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'properties': 'UserPropertiesPost', } attribute_map = { 'properties': 'properties', } def __init__(self, properties=None, local_vars_configuration=None): # noqa: E501 """UserPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._properties = None self.discriminator = None self.properties = properties @property def properties(self): """Gets the properties of this UserPost. # noqa: E501 :return: The properties of this UserPost. # noqa: E501 :rtype: UserPropertiesPost """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this UserPost. :param properties: The properties of this UserPost. # noqa: E501 :type properties: UserPropertiesPost """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_properties.py0000644000175100001660000002342415046550311022635 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'firstname': 'str', 'lastname': 'str', 'email': 'str', 'administrator': 'bool', 'force_sec_auth': 'bool', 'sec_auth_active': 'bool', 's3_canonical_user_id': 'str', 'active': 'bool', } attribute_map = { 'firstname': 'firstname', 'lastname': 'lastname', 'email': 'email', 'administrator': 'administrator', 'force_sec_auth': 'forceSecAuth', 'sec_auth_active': 'secAuthActive', 's3_canonical_user_id': 's3CanonicalUserId', 'active': 'active', } def __init__(self, firstname=None, lastname=None, email=None, administrator=None, force_sec_auth=None, sec_auth_active=None, s3_canonical_user_id=None, active=None, local_vars_configuration=None): # noqa: E501 """UserProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._firstname = None self._lastname = None self._email = None self._administrator = None self._force_sec_auth = None self._sec_auth_active = None self._s3_canonical_user_id = None self._active = None self.discriminator = None if firstname is not None: self.firstname = firstname if lastname is not None: self.lastname = lastname if email is not None: self.email = email if administrator is not None: self.administrator = administrator if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if sec_auth_active is not None: self.sec_auth_active = sec_auth_active if s3_canonical_user_id is not None: self.s3_canonical_user_id = s3_canonical_user_id if active is not None: self.active = active @property def firstname(self): """Gets the firstname of this UserProperties. # noqa: E501 The first name of the user. # noqa: E501 :return: The firstname of this UserProperties. # noqa: E501 :rtype: str """ return self._firstname @firstname.setter def firstname(self, firstname): """Sets the firstname of this UserProperties. The first name of the user. # noqa: E501 :param firstname: The firstname of this UserProperties. # noqa: E501 :type firstname: str """ self._firstname = firstname @property def lastname(self): """Gets the lastname of this UserProperties. # noqa: E501 The last name of the user. # noqa: E501 :return: The lastname of this UserProperties. # noqa: E501 :rtype: str """ return self._lastname @lastname.setter def lastname(self, lastname): """Sets the lastname of this UserProperties. The last name of the user. # noqa: E501 :param lastname: The lastname of this UserProperties. # noqa: E501 :type lastname: str """ self._lastname = lastname @property def email(self): """Gets the email of this UserProperties. # noqa: E501 The email address of the user. # noqa: E501 :return: The email of this UserProperties. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): """Sets the email of this UserProperties. The email address of the user. # noqa: E501 :param email: The email of this UserProperties. # noqa: E501 :type email: str """ self._email = email @property def administrator(self): """Gets the administrator of this UserProperties. # noqa: E501 Indicates if the user has admin rights. # noqa: E501 :return: The administrator of this UserProperties. # noqa: E501 :rtype: bool """ return self._administrator @administrator.setter def administrator(self, administrator): """Sets the administrator of this UserProperties. Indicates if the user has admin rights. # noqa: E501 :param administrator: The administrator of this UserProperties. # noqa: E501 :type administrator: bool """ self._administrator = administrator @property def force_sec_auth(self): """Gets the force_sec_auth of this UserProperties. # noqa: E501 Indicates if secure authentication should be forced on the user. # noqa: E501 :return: The force_sec_auth of this UserProperties. # noqa: E501 :rtype: bool """ return self._force_sec_auth @force_sec_auth.setter def force_sec_auth(self, force_sec_auth): """Sets the force_sec_auth of this UserProperties. Indicates if secure authentication should be forced on the user. # noqa: E501 :param force_sec_auth: The force_sec_auth of this UserProperties. # noqa: E501 :type force_sec_auth: bool """ self._force_sec_auth = force_sec_auth @property def sec_auth_active(self): """Gets the sec_auth_active of this UserProperties. # noqa: E501 Indicates if secure authentication is active for the user. # noqa: E501 :return: The sec_auth_active of this UserProperties. # noqa: E501 :rtype: bool """ return self._sec_auth_active @sec_auth_active.setter def sec_auth_active(self, sec_auth_active): """Sets the sec_auth_active of this UserProperties. Indicates if secure authentication is active for the user. # noqa: E501 :param sec_auth_active: The sec_auth_active of this UserProperties. # noqa: E501 :type sec_auth_active: bool """ self._sec_auth_active = sec_auth_active @property def s3_canonical_user_id(self): """Gets the s3_canonical_user_id of this UserProperties. # noqa: E501 Canonical (Object storage) ID of the user for a given identity. # noqa: E501 :return: The s3_canonical_user_id of this UserProperties. # noqa: E501 :rtype: str """ return self._s3_canonical_user_id @s3_canonical_user_id.setter def s3_canonical_user_id(self, s3_canonical_user_id): """Sets the s3_canonical_user_id of this UserProperties. Canonical (Object storage) ID of the user for a given identity. # noqa: E501 :param s3_canonical_user_id: The s3_canonical_user_id of this UserProperties. # noqa: E501 :type s3_canonical_user_id: str """ self._s3_canonical_user_id = s3_canonical_user_id @property def active(self): """Gets the active of this UserProperties. # noqa: E501 Indicates if the user is active. # noqa: E501 :return: The active of this UserProperties. # noqa: E501 :rtype: bool """ return self._active @active.setter def active(self, active): """Sets the active of this UserProperties. Indicates if the user is active. # noqa: E501 :param active: The active of this UserProperties. # noqa: E501 :type active: bool """ self._active = active def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_properties_post.py0000644000175100001660000002311115046550311023673 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserPropertiesPost(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'firstname': 'str', 'lastname': 'str', 'email': 'str', 'administrator': 'bool', 'force_sec_auth': 'bool', 'sec_auth_active': 'bool', 'password': 'str', 'active': 'bool', } attribute_map = { 'firstname': 'firstname', 'lastname': 'lastname', 'email': 'email', 'administrator': 'administrator', 'force_sec_auth': 'forceSecAuth', 'sec_auth_active': 'secAuthActive', 'password': 'password', 'active': 'active', } def __init__(self, firstname=None, lastname=None, email=None, administrator=None, force_sec_auth=None, sec_auth_active=None, password=None, active=None, local_vars_configuration=None): # noqa: E501 """UserPropertiesPost - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._firstname = None self._lastname = None self._email = None self._administrator = None self._force_sec_auth = None self._sec_auth_active = None self._password = None self._active = None self.discriminator = None if firstname is not None: self.firstname = firstname if lastname is not None: self.lastname = lastname if email is not None: self.email = email if administrator is not None: self.administrator = administrator if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if sec_auth_active is not None: self.sec_auth_active = sec_auth_active if password is not None: self.password = password if active is not None: self.active = active @property def firstname(self): """Gets the firstname of this UserPropertiesPost. # noqa: E501 The first name of the user. # noqa: E501 :return: The firstname of this UserPropertiesPost. # noqa: E501 :rtype: str """ return self._firstname @firstname.setter def firstname(self, firstname): """Sets the firstname of this UserPropertiesPost. The first name of the user. # noqa: E501 :param firstname: The firstname of this UserPropertiesPost. # noqa: E501 :type firstname: str """ self._firstname = firstname @property def lastname(self): """Gets the lastname of this UserPropertiesPost. # noqa: E501 The last name of the user. # noqa: E501 :return: The lastname of this UserPropertiesPost. # noqa: E501 :rtype: str """ return self._lastname @lastname.setter def lastname(self, lastname): """Sets the lastname of this UserPropertiesPost. The last name of the user. # noqa: E501 :param lastname: The lastname of this UserPropertiesPost. # noqa: E501 :type lastname: str """ self._lastname = lastname @property def email(self): """Gets the email of this UserPropertiesPost. # noqa: E501 The email address of the user. # noqa: E501 :return: The email of this UserPropertiesPost. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): """Sets the email of this UserPropertiesPost. The email address of the user. # noqa: E501 :param email: The email of this UserPropertiesPost. # noqa: E501 :type email: str """ self._email = email @property def administrator(self): """Gets the administrator of this UserPropertiesPost. # noqa: E501 Indicates if the user has admin rights. # noqa: E501 :return: The administrator of this UserPropertiesPost. # noqa: E501 :rtype: bool """ return self._administrator @administrator.setter def administrator(self, administrator): """Sets the administrator of this UserPropertiesPost. Indicates if the user has admin rights. # noqa: E501 :param administrator: The administrator of this UserPropertiesPost. # noqa: E501 :type administrator: bool """ self._administrator = administrator @property def force_sec_auth(self): """Gets the force_sec_auth of this UserPropertiesPost. # noqa: E501 Indicates if secure authentication should be forced on the user. # noqa: E501 :return: The force_sec_auth of this UserPropertiesPost. # noqa: E501 :rtype: bool """ return self._force_sec_auth @force_sec_auth.setter def force_sec_auth(self, force_sec_auth): """Sets the force_sec_auth of this UserPropertiesPost. Indicates if secure authentication should be forced on the user. # noqa: E501 :param force_sec_auth: The force_sec_auth of this UserPropertiesPost. # noqa: E501 :type force_sec_auth: bool """ self._force_sec_auth = force_sec_auth @property def sec_auth_active(self): """Gets the sec_auth_active of this UserPropertiesPost. # noqa: E501 Indicates if secure authentication is active for the user. # noqa: E501 :return: The sec_auth_active of this UserPropertiesPost. # noqa: E501 :rtype: bool """ return self._sec_auth_active @sec_auth_active.setter def sec_auth_active(self, sec_auth_active): """Sets the sec_auth_active of this UserPropertiesPost. Indicates if secure authentication is active for the user. # noqa: E501 :param sec_auth_active: The sec_auth_active of this UserPropertiesPost. # noqa: E501 :type sec_auth_active: bool """ self._sec_auth_active = sec_auth_active @property def password(self): """Gets the password of this UserPropertiesPost. # noqa: E501 User password. # noqa: E501 :return: The password of this UserPropertiesPost. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): """Sets the password of this UserPropertiesPost. User password. # noqa: E501 :param password: The password of this UserPropertiesPost. # noqa: E501 :type password: str """ self._password = password @property def active(self): """Gets the active of this UserPropertiesPost. # noqa: E501 Indicates if the user is active. # noqa: E501 :return: The active of this UserPropertiesPost. # noqa: E501 :rtype: bool """ return self._active @active.setter def active(self, active): """Sets the active of this UserPropertiesPost. Indicates if the user is active. # noqa: E501 :param active: The active of this UserPropertiesPost. # noqa: E501 :type active: bool """ self._active = active def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserPropertiesPost): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserPropertiesPost): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_properties_put.py0000644000175100001660000002306115046550311023522 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserPropertiesPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'firstname': 'str', 'lastname': 'str', 'email': 'str', 'password': 'str', 'administrator': 'bool', 'force_sec_auth': 'bool', 'sec_auth_active': 'bool', 'active': 'bool', } attribute_map = { 'firstname': 'firstname', 'lastname': 'lastname', 'email': 'email', 'password': 'password', 'administrator': 'administrator', 'force_sec_auth': 'forceSecAuth', 'sec_auth_active': 'secAuthActive', 'active': 'active', } def __init__(self, firstname=None, lastname=None, email=None, password=None, administrator=None, force_sec_auth=None, sec_auth_active=None, active=None, local_vars_configuration=None): # noqa: E501 """UserPropertiesPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._firstname = None self._lastname = None self._email = None self._password = None self._administrator = None self._force_sec_auth = None self._sec_auth_active = None self._active = None self.discriminator = None if firstname is not None: self.firstname = firstname if lastname is not None: self.lastname = lastname if email is not None: self.email = email if password is not None: self.password = password if administrator is not None: self.administrator = administrator if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if sec_auth_active is not None: self.sec_auth_active = sec_auth_active if active is not None: self.active = active @property def firstname(self): """Gets the firstname of this UserPropertiesPut. # noqa: E501 The first name of the user. # noqa: E501 :return: The firstname of this UserPropertiesPut. # noqa: E501 :rtype: str """ return self._firstname @firstname.setter def firstname(self, firstname): """Sets the firstname of this UserPropertiesPut. The first name of the user. # noqa: E501 :param firstname: The firstname of this UserPropertiesPut. # noqa: E501 :type firstname: str """ self._firstname = firstname @property def lastname(self): """Gets the lastname of this UserPropertiesPut. # noqa: E501 The last name of the user. # noqa: E501 :return: The lastname of this UserPropertiesPut. # noqa: E501 :rtype: str """ return self._lastname @lastname.setter def lastname(self, lastname): """Sets the lastname of this UserPropertiesPut. The last name of the user. # noqa: E501 :param lastname: The lastname of this UserPropertiesPut. # noqa: E501 :type lastname: str """ self._lastname = lastname @property def email(self): """Gets the email of this UserPropertiesPut. # noqa: E501 The email address of the user. # noqa: E501 :return: The email of this UserPropertiesPut. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): """Sets the email of this UserPropertiesPut. The email address of the user. # noqa: E501 :param email: The email of this UserPropertiesPut. # noqa: E501 :type email: str """ self._email = email @property def password(self): """Gets the password of this UserPropertiesPut. # noqa: E501 password of the user # noqa: E501 :return: The password of this UserPropertiesPut. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): """Sets the password of this UserPropertiesPut. password of the user # noqa: E501 :param password: The password of this UserPropertiesPut. # noqa: E501 :type password: str """ self._password = password @property def administrator(self): """Gets the administrator of this UserPropertiesPut. # noqa: E501 Indicates if the user has admin rights. # noqa: E501 :return: The administrator of this UserPropertiesPut. # noqa: E501 :rtype: bool """ return self._administrator @administrator.setter def administrator(self, administrator): """Sets the administrator of this UserPropertiesPut. Indicates if the user has admin rights. # noqa: E501 :param administrator: The administrator of this UserPropertiesPut. # noqa: E501 :type administrator: bool """ self._administrator = administrator @property def force_sec_auth(self): """Gets the force_sec_auth of this UserPropertiesPut. # noqa: E501 Indicates if secure authentication should be forced on the user. # noqa: E501 :return: The force_sec_auth of this UserPropertiesPut. # noqa: E501 :rtype: bool """ return self._force_sec_auth @force_sec_auth.setter def force_sec_auth(self, force_sec_auth): """Sets the force_sec_auth of this UserPropertiesPut. Indicates if secure authentication should be forced on the user. # noqa: E501 :param force_sec_auth: The force_sec_auth of this UserPropertiesPut. # noqa: E501 :type force_sec_auth: bool """ self._force_sec_auth = force_sec_auth @property def sec_auth_active(self): """Gets the sec_auth_active of this UserPropertiesPut. # noqa: E501 Indicates if secure authentication is active for the user. # noqa: E501 :return: The sec_auth_active of this UserPropertiesPut. # noqa: E501 :rtype: bool """ return self._sec_auth_active @sec_auth_active.setter def sec_auth_active(self, sec_auth_active): """Sets the sec_auth_active of this UserPropertiesPut. Indicates if secure authentication is active for the user. # noqa: E501 :param sec_auth_active: The sec_auth_active of this UserPropertiesPut. # noqa: E501 :type sec_auth_active: bool """ self._sec_auth_active = sec_auth_active @property def active(self): """Gets the active of this UserPropertiesPut. # noqa: E501 Indicates if the user is active. # noqa: E501 :return: The active of this UserPropertiesPut. # noqa: E501 :rtype: bool """ return self._active @active.setter def active(self, active): """Sets the active of this UserPropertiesPut. Indicates if the user is active. # noqa: E501 :param active: The active of this UserPropertiesPut. # noqa: E501 :type active: bool """ self._active = active def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserPropertiesPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserPropertiesPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/user_put.py0000644000175100001660000001062115046550311021244 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UserPut(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'properties': 'UserPropertiesPut', } attribute_map = { 'id': 'id', 'properties': 'properties', } def __init__(self, id=None, properties=None, local_vars_configuration=None): # noqa: E501 """UserPut - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._properties = None self.discriminator = None if id is not None: self.id = id self.properties = properties @property def id(self): """Gets the id of this UserPut. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this UserPut. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this UserPut. The resource's unique identifier. # noqa: E501 :param id: The id of this UserPut. # noqa: E501 :type id: str """ self._id = id @property def properties(self): """Gets the properties of this UserPut. # noqa: E501 :return: The properties of this UserPut. # noqa: E501 :rtype: UserPropertiesPut """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this UserPut. :param properties: The properties of this UserPut. # noqa: E501 :type properties: UserPropertiesPut """ if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UserPut): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UserPut): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/users.py0000644000175100001660000001707515046550311020551 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Users(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[User]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Users - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Users. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Users. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Users. The resource's unique identifier. # noqa: E501 :param id: The id of this Users. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Users. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Users. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Users. The type of object that has been created. # noqa: E501 :param type: The type of this Users. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Users. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Users. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Users. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Users. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Users. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Users. # noqa: E501 :rtype: list[User] """ return self._items @items.setter def items(self, items): """Sets the items of this Users. Array of items in the collection. # noqa: E501 :param items: The items of this Users. # noqa: E501 :type items: list[User] """ self._items = items @property def offset(self): """Gets the offset of this Users. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Users. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Users. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Users. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Users. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Users. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Users. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Users. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Users. # noqa: E501 :return: The links of this Users. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Users. :param links: The links of this Users. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Users): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Users): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/users_entities.py0000644000175100001660000001025315046550311022444 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class UsersEntities(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'owns': 'ResourcesUsers', 'groups': 'GroupUsers', } attribute_map = { 'owns': 'owns', 'groups': 'groups', } def __init__(self, owns=None, groups=None, local_vars_configuration=None): # noqa: E501 """UsersEntities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._owns = None self._groups = None self.discriminator = None if owns is not None: self.owns = owns if groups is not None: self.groups = groups @property def owns(self): """Gets the owns of this UsersEntities. # noqa: E501 :return: The owns of this UsersEntities. # noqa: E501 :rtype: ResourcesUsers """ return self._owns @owns.setter def owns(self, owns): """Sets the owns of this UsersEntities. :param owns: The owns of this UsersEntities. # noqa: E501 :type owns: ResourcesUsers """ self._owns = owns @property def groups(self): """Gets the groups of this UsersEntities. # noqa: E501 :return: The groups of this UsersEntities. # noqa: E501 :rtype: GroupUsers """ return self._groups @groups.setter def groups(self, groups): """Sets the groups of this UsersEntities. :param groups: The groups of this UsersEntities. # noqa: E501 :type groups: GroupUsers """ self._groups = groups def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, UsersEntities): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, UsersEntities): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/volume.py0000644000175100001660000001444315046550311020713 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Volume(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'VolumeProperties', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'metadata': 'metadata', 'properties': 'properties', } def __init__(self, id=None, type=None, href=None, metadata=None, properties=None, local_vars_configuration=None): # noqa: E501 """Volume - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._metadata = None self._properties = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if metadata is not None: self.metadata = metadata if properties is not None: self.properties = properties @property def id(self): """Gets the id of this Volume. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Volume. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Volume. The resource's unique identifier. # noqa: E501 :param id: The id of this Volume. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Volume. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Volume. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Volume. The type of object that has been created. # noqa: E501 :param type: The type of this Volume. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Volume. # noqa: E501 The URL to the object representation (absolute path). # noqa: E501 :return: The href of this Volume. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Volume. The URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Volume. # noqa: E501 :type href: str """ self._href = href @property def metadata(self): """Gets the metadata of this Volume. # noqa: E501 :return: The metadata of this Volume. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this Volume. :param metadata: The metadata of this Volume. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this Volume. # noqa: E501 :return: The properties of this Volume. # noqa: E501 :rtype: VolumeProperties """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this Volume. :param properties: The properties of this Volume. # noqa: E501 :type properties: VolumeProperties """ self._properties = properties def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Volume): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Volume): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/volume_properties.py0000644000175100001660000007570015046550311023172 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class VolumeProperties(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'type': 'str', 'size': 'float', 'availability_zone': 'str', 'image': 'str', 'image_password': 'str', 'image_alias': 'str', 'ssh_keys': 'list[str]', 'bus': 'str', 'licence_type': 'str', 'application_type': 'str', 'cpu_hot_plug': 'bool', 'ram_hot_plug': 'bool', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'expose_serial': 'bool', 'require_legacy_bios': 'bool', 'device_number': 'int', 'pci_slot': 'int', 'backupunit_id': 'str', 'user_data': 'str', 'boot_server': 'str', 'boot_order': 'str', } attribute_map = { 'name': 'name', 'type': 'type', 'size': 'size', 'availability_zone': 'availabilityZone', 'image': 'image', 'image_password': 'imagePassword', 'image_alias': 'imageAlias', 'ssh_keys': 'sshKeys', 'bus': 'bus', 'licence_type': 'licenceType', 'application_type': 'applicationType', 'cpu_hot_plug': 'cpuHotPlug', 'ram_hot_plug': 'ramHotPlug', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'expose_serial': 'exposeSerial', 'require_legacy_bios': 'requireLegacyBios', 'device_number': 'deviceNumber', 'pci_slot': 'pciSlot', 'backupunit_id': 'backupunitId', 'user_data': 'userData', 'boot_server': 'bootServer', 'boot_order': 'bootOrder', } def __init__(self, name=None, type=None, size=None, availability_zone=None, image=None, image_password=None, image_alias=None, ssh_keys=None, bus=None, licence_type=None, application_type=None, cpu_hot_plug=None, ram_hot_plug=None, nic_hot_plug=None, nic_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, expose_serial=False, require_legacy_bios=True, device_number=None, pci_slot=None, backupunit_id=None, user_data=None, boot_server=None, boot_order='AUTO', local_vars_configuration=None): # noqa: E501 """VolumeProperties - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._type = None self._size = None self._availability_zone = None self._image = None self._image_password = None self._image_alias = None self._ssh_keys = None self._bus = None self._licence_type = None self._application_type = None self._cpu_hot_plug = None self._ram_hot_plug = None self._nic_hot_plug = None self._nic_hot_unplug = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._expose_serial = None self._require_legacy_bios = None self._device_number = None self._pci_slot = None self._backupunit_id = None self._user_data = None self._boot_server = None self._boot_order = None self.discriminator = None if name is not None: self.name = name if type is not None: self.type = type if size is not None: self.size = size if availability_zone is not None: self.availability_zone = availability_zone if image is not None: self.image = image if image_password is not None: self.image_password = image_password if image_alias is not None: self.image_alias = image_alias if ssh_keys is not None: self.ssh_keys = ssh_keys if bus is not None: self.bus = bus if licence_type is not None: self.licence_type = licence_type if application_type is not None: self.application_type = application_type if cpu_hot_plug is not None: self.cpu_hot_plug = cpu_hot_plug if ram_hot_plug is not None: self.ram_hot_plug = ram_hot_plug if nic_hot_plug is not None: self.nic_hot_plug = nic_hot_plug if nic_hot_unplug is not None: self.nic_hot_unplug = nic_hot_unplug if disc_virtio_hot_plug is not None: self.disc_virtio_hot_plug = disc_virtio_hot_plug if disc_virtio_hot_unplug is not None: self.disc_virtio_hot_unplug = disc_virtio_hot_unplug if expose_serial is not None: self.expose_serial = expose_serial if require_legacy_bios is not None: self.require_legacy_bios = require_legacy_bios if device_number is not None: self.device_number = device_number if pci_slot is not None: self.pci_slot = pci_slot if backupunit_id is not None: self.backupunit_id = backupunit_id if user_data is not None: self.user_data = user_data if boot_server is not None: self.boot_server = boot_server self.boot_order = boot_order @property def name(self): """Gets the name of this VolumeProperties. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this VolumeProperties. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this VolumeProperties. The name of the resource. # noqa: E501 :param name: The name of this VolumeProperties. # noqa: E501 :type name: str """ self._name = name @property def type(self): """Gets the type of this VolumeProperties. # noqa: E501 Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. # noqa: E501 :return: The type of this VolumeProperties. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this VolumeProperties. Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. # noqa: E501 :param type: The type of this VolumeProperties. # noqa: E501 :type type: str """ allowed_values = ["HDD", "SSD", "SSD Standard", "SSD Premium", "DAS", "ISO"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def size(self): """Gets the size of this VolumeProperties. # noqa: E501 The size of the volume in GB. # noqa: E501 :return: The size of this VolumeProperties. # noqa: E501 :rtype: float """ return self._size @size.setter def size(self, size): """Sets the size of this VolumeProperties. The size of the volume in GB. # noqa: E501 :param size: The size of this VolumeProperties. # noqa: E501 :type size: float """ self._size = size @property def availability_zone(self): """Gets the availability_zone of this VolumeProperties. # noqa: E501 The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD. # noqa: E501 :return: The availability_zone of this VolumeProperties. # noqa: E501 :rtype: str """ return self._availability_zone @availability_zone.setter def availability_zone(self, availability_zone): """Sets the availability_zone of this VolumeProperties. The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD. # noqa: E501 :param availability_zone: The availability_zone of this VolumeProperties. # noqa: E501 :type availability_zone: str """ allowed_values = ["AUTO", "ZONE_1", "ZONE_2", "ZONE_3"] # noqa: E501 if self.local_vars_configuration.client_side_validation and availability_zone not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `availability_zone` ({0}), must be one of {1}" # noqa: E501 .format(availability_zone, allowed_values) ) self._availability_zone = availability_zone @property def image(self): """Gets the image of this VolumeProperties. # noqa: E501 Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract. # noqa: E501 :return: The image of this VolumeProperties. # noqa: E501 :rtype: str """ return self._image @image.setter def image(self, image): """Sets the image of this VolumeProperties. Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract. # noqa: E501 :param image: The image of this VolumeProperties. # noqa: E501 :type image: str """ self._image = image @property def image_password(self): """Gets the image_password of this VolumeProperties. # noqa: E501 Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9. # noqa: E501 :return: The image_password of this VolumeProperties. # noqa: E501 :rtype: str """ return self._image_password @image_password.setter def image_password(self, image_password): """Sets the image_password of this VolumeProperties. Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9. # noqa: E501 :param image_password: The image_password of this VolumeProperties. # noqa: E501 :type image_password: str """ self._image_password = image_password @property def image_alias(self): """Gets the image_alias of this VolumeProperties. # noqa: E501 Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract. # noqa: E501 :return: The image_alias of this VolumeProperties. # noqa: E501 :rtype: str """ return self._image_alias @image_alias.setter def image_alias(self, image_alias): """Sets the image_alias of this VolumeProperties. Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract. # noqa: E501 :param image_alias: The image_alias of this VolumeProperties. # noqa: E501 :type image_alias: str """ self._image_alias = image_alias @property def ssh_keys(self): """Gets the ssh_keys of this VolumeProperties. # noqa: E501 Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. # noqa: E501 :return: The ssh_keys of this VolumeProperties. # noqa: E501 :rtype: list[str] """ return self._ssh_keys @ssh_keys.setter def ssh_keys(self, ssh_keys): """Sets the ssh_keys of this VolumeProperties. Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. # noqa: E501 :param ssh_keys: The ssh_keys of this VolumeProperties. # noqa: E501 :type ssh_keys: list[str] """ self._ssh_keys = ssh_keys @property def bus(self): """Gets the bus of this VolumeProperties. # noqa: E501 The bus type for this volume; default is VIRTIO. # noqa: E501 :return: The bus of this VolumeProperties. # noqa: E501 :rtype: str """ return self._bus @bus.setter def bus(self, bus): """Sets the bus of this VolumeProperties. The bus type for this volume; default is VIRTIO. # noqa: E501 :param bus: The bus of this VolumeProperties. # noqa: E501 :type bus: str """ allowed_values = ["VIRTIO", "IDE", "UNKNOWN"] # noqa: E501 if self.local_vars_configuration.client_side_validation and bus not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `bus` ({0}), must be one of {1}" # noqa: E501 .format(bus, allowed_values) ) self._bus = bus @property def licence_type(self): """Gets the licence_type of this VolumeProperties. # noqa: E501 OS type for this volume. # noqa: E501 :return: The licence_type of this VolumeProperties. # noqa: E501 :rtype: str """ return self._licence_type @licence_type.setter def licence_type(self, licence_type): """Sets the licence_type of this VolumeProperties. OS type for this volume. # noqa: E501 :param licence_type: The licence_type of this VolumeProperties. # noqa: E501 :type licence_type: str """ allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2019", "WINDOWS2022", "WINDOWS2025", "RHEL", "LINUX", "OTHER"] # noqa: E501 if self.local_vars_configuration.client_side_validation and licence_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `licence_type` ({0}), must be one of {1}" # noqa: E501 .format(licence_type, allowed_values) ) self._licence_type = licence_type @property def application_type(self): """Gets the application_type of this VolumeProperties. # noqa: E501 The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :return: The application_type of this VolumeProperties. # noqa: E501 :rtype: str """ return self._application_type @application_type.setter def application_type(self, application_type): """Sets the application_type of this VolumeProperties. The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501 :param application_type: The application_type of this VolumeProperties. # noqa: E501 :type application_type: str """ self._application_type = application_type @property def cpu_hot_plug(self): """Gets the cpu_hot_plug of this VolumeProperties. # noqa: E501 Hot-plug capable CPU (no reboot required). # noqa: E501 :return: The cpu_hot_plug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._cpu_hot_plug @cpu_hot_plug.setter def cpu_hot_plug(self, cpu_hot_plug): """Sets the cpu_hot_plug of this VolumeProperties. Hot-plug capable CPU (no reboot required). # noqa: E501 :param cpu_hot_plug: The cpu_hot_plug of this VolumeProperties. # noqa: E501 :type cpu_hot_plug: bool """ self._cpu_hot_plug = cpu_hot_plug @property def ram_hot_plug(self): """Gets the ram_hot_plug of this VolumeProperties. # noqa: E501 Hot-plug capable RAM (no reboot required). # noqa: E501 :return: The ram_hot_plug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._ram_hot_plug @ram_hot_plug.setter def ram_hot_plug(self, ram_hot_plug): """Sets the ram_hot_plug of this VolumeProperties. Hot-plug capable RAM (no reboot required). # noqa: E501 :param ram_hot_plug: The ram_hot_plug of this VolumeProperties. # noqa: E501 :type ram_hot_plug: bool """ self._ram_hot_plug = ram_hot_plug @property def nic_hot_plug(self): """Gets the nic_hot_plug of this VolumeProperties. # noqa: E501 Hot-plug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_plug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_plug @nic_hot_plug.setter def nic_hot_plug(self, nic_hot_plug): """Sets the nic_hot_plug of this VolumeProperties. Hot-plug capable NIC (no reboot required). # noqa: E501 :param nic_hot_plug: The nic_hot_plug of this VolumeProperties. # noqa: E501 :type nic_hot_plug: bool """ self._nic_hot_plug = nic_hot_plug @property def nic_hot_unplug(self): """Gets the nic_hot_unplug of this VolumeProperties. # noqa: E501 Hot-unplug capable NIC (no reboot required). # noqa: E501 :return: The nic_hot_unplug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._nic_hot_unplug @nic_hot_unplug.setter def nic_hot_unplug(self, nic_hot_unplug): """Sets the nic_hot_unplug of this VolumeProperties. Hot-unplug capable NIC (no reboot required). # noqa: E501 :param nic_hot_unplug: The nic_hot_unplug of this VolumeProperties. # noqa: E501 :type nic_hot_unplug: bool """ self._nic_hot_unplug = nic_hot_unplug @property def disc_virtio_hot_plug(self): """Gets the disc_virtio_hot_plug of this VolumeProperties. # noqa: E501 Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :return: The disc_virtio_hot_plug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_plug @disc_virtio_hot_plug.setter def disc_virtio_hot_plug(self, disc_virtio_hot_plug): """Sets the disc_virtio_hot_plug of this VolumeProperties. Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501 :param disc_virtio_hot_plug: The disc_virtio_hot_plug of this VolumeProperties. # noqa: E501 :type disc_virtio_hot_plug: bool """ self._disc_virtio_hot_plug = disc_virtio_hot_plug @property def disc_virtio_hot_unplug(self): """Gets the disc_virtio_hot_unplug of this VolumeProperties. # noqa: E501 Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :return: The disc_virtio_hot_unplug of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._disc_virtio_hot_unplug @disc_virtio_hot_unplug.setter def disc_virtio_hot_unplug(self, disc_virtio_hot_unplug): """Sets the disc_virtio_hot_unplug of this VolumeProperties. Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501 :param disc_virtio_hot_unplug: The disc_virtio_hot_unplug of this VolumeProperties. # noqa: E501 :type disc_virtio_hot_unplug: bool """ self._disc_virtio_hot_unplug = disc_virtio_hot_unplug @property def expose_serial(self): """Gets the expose_serial of this VolumeProperties. # noqa: E501 If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :return: The expose_serial of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._expose_serial @expose_serial.setter def expose_serial(self, expose_serial): """Sets the expose_serial of this VolumeProperties. If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501 :param expose_serial: The expose_serial of this VolumeProperties. # noqa: E501 :type expose_serial: bool """ self._expose_serial = expose_serial @property def require_legacy_bios(self): """Gets the require_legacy_bios of this VolumeProperties. # noqa: E501 Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :return: The require_legacy_bios of this VolumeProperties. # noqa: E501 :rtype: bool """ return self._require_legacy_bios @require_legacy_bios.setter def require_legacy_bios(self, require_legacy_bios): """Sets the require_legacy_bios of this VolumeProperties. Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501 :param require_legacy_bios: The require_legacy_bios of this VolumeProperties. # noqa: E501 :type require_legacy_bios: bool """ self._require_legacy_bios = require_legacy_bios @property def device_number(self): """Gets the device_number of this VolumeProperties. # noqa: E501 The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. # noqa: E501 :return: The device_number of this VolumeProperties. # noqa: E501 :rtype: int """ return self._device_number @device_number.setter def device_number(self, device_number): """Sets the device_number of this VolumeProperties. The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. # noqa: E501 :param device_number: The device_number of this VolumeProperties. # noqa: E501 :type device_number: int """ self._device_number = device_number @property def pci_slot(self): """Gets the pci_slot of this VolumeProperties. # noqa: E501 The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. # noqa: E501 :return: The pci_slot of this VolumeProperties. # noqa: E501 :rtype: int """ return self._pci_slot @pci_slot.setter def pci_slot(self, pci_slot): """Sets the pci_slot of this VolumeProperties. The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. # noqa: E501 :param pci_slot: The pci_slot of this VolumeProperties. # noqa: E501 :type pci_slot: int """ self._pci_slot = pci_slot @property def backupunit_id(self): """Gets the backupunit_id of this VolumeProperties. # noqa: E501 The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. # noqa: E501 :return: The backupunit_id of this VolumeProperties. # noqa: E501 :rtype: str """ return self._backupunit_id @backupunit_id.setter def backupunit_id(self, backupunit_id): """Sets the backupunit_id of this VolumeProperties. The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. # noqa: E501 :param backupunit_id: The backupunit_id of this VolumeProperties. # noqa: E501 :type backupunit_id: str """ self._backupunit_id = backupunit_id @property def user_data(self): """Gets the user_data of this VolumeProperties. # noqa: E501 The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. # noqa: E501 :return: The user_data of this VolumeProperties. # noqa: E501 :rtype: str """ return self._user_data @user_data.setter def user_data(self, user_data): """Sets the user_data of this VolumeProperties. The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. # noqa: E501 :param user_data: The user_data of this VolumeProperties. # noqa: E501 :type user_data: str """ self._user_data = user_data @property def boot_server(self): """Gets the boot_server of this VolumeProperties. # noqa: E501 The UUID of the attached server. # noqa: E501 :return: The boot_server of this VolumeProperties. # noqa: E501 :rtype: str """ return self._boot_server @boot_server.setter def boot_server(self, boot_server): """Sets the boot_server of this VolumeProperties. The UUID of the attached server. # noqa: E501 :param boot_server: The boot_server of this VolumeProperties. # noqa: E501 :type boot_server: str """ self._boot_server = boot_server @property def boot_order(self): """Gets the boot_order of this VolumeProperties. # noqa: E501 Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. # noqa: E501 :return: The boot_order of this VolumeProperties. # noqa: E501 :rtype: str """ return self._boot_order @boot_order.setter def boot_order(self, boot_order): """Sets the boot_order of this VolumeProperties. Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. # noqa: E501 :param boot_order: The boot_order of this VolumeProperties. # noqa: E501 :type boot_order: str """ allowed_values = [None,"AUTO", "NONE", "PRIMARY"] # noqa: E501 if self.local_vars_configuration.client_side_validation and boot_order not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `boot_order` ({0}), must be one of {1}" # noqa: E501 .format(boot_order, allowed_values) ) self._boot_order = boot_order def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, VolumeProperties): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, VolumeProperties): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976457.0 ionoscloud-6.1.13/ionoscloud/models/volumes.py0000644000175100001660000001720315046550311021073 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ionoscloud.configuration import Configuration class Volumes(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'id': 'str', 'type': 'Type', 'href': 'str', 'items': 'list[Volume]', 'offset': 'float', 'limit': 'float', 'links': 'PaginationLinks', } attribute_map = { 'id': 'id', 'type': 'type', 'href': 'href', 'items': 'items', 'offset': 'offset', 'limit': 'limit', 'links': '_links', } def __init__(self, id=None, type=None, href=None, items=None, offset=None, limit=None, links=None, local_vars_configuration=None): # noqa: E501 """Volumes - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None self._type = None self._href = None self._items = None self._offset = None self._limit = None self._links = None self.discriminator = None if id is not None: self.id = id if type is not None: self.type = type if href is not None: self.href = href if items is not None: self.items = items if offset is not None: self.offset = offset if limit is not None: self.limit = limit if links is not None: self.links = links @property def id(self): """Gets the id of this Volumes. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this Volumes. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Volumes. The resource's unique identifier. # noqa: E501 :param id: The id of this Volumes. # noqa: E501 :type id: str """ self._id = id @property def type(self): """Gets the type of this Volumes. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this Volumes. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this Volumes. The type of object that has been created. # noqa: E501 :param type: The type of this Volumes. # noqa: E501 :type type: Type """ self._type = type @property def href(self): """Gets the href of this Volumes. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this Volumes. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this Volumes. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this Volumes. # noqa: E501 :type href: str """ self._href = href @property def items(self): """Gets the items of this Volumes. # noqa: E501 Array of items in the collection. # noqa: E501 :return: The items of this Volumes. # noqa: E501 :rtype: list[Volume] """ return self._items @items.setter def items(self, items): """Sets the items of this Volumes. Array of items in the collection. # noqa: E501 :param items: The items of this Volumes. # noqa: E501 :type items: list[Volume] """ self._items = items @property def offset(self): """Gets the offset of this Volumes. # noqa: E501 The offset (if specified in the request). # noqa: E501 :return: The offset of this Volumes. # noqa: E501 :rtype: float """ return self._offset @offset.setter def offset(self, offset): """Sets the offset of this Volumes. The offset (if specified in the request). # noqa: E501 :param offset: The offset of this Volumes. # noqa: E501 :type offset: float """ self._offset = offset @property def limit(self): """Gets the limit of this Volumes. # noqa: E501 The limit (if specified in the request). # noqa: E501 :return: The limit of this Volumes. # noqa: E501 :rtype: float """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this Volumes. The limit (if specified in the request). # noqa: E501 :param limit: The limit of this Volumes. # noqa: E501 :type limit: float """ self._limit = limit @property def links(self): """Gets the links of this Volumes. # noqa: E501 :return: The links of this Volumes. # noqa: E501 :rtype: PaginationLinks """ return self._links @links.setter def links(self, links): """Sets the links of this Volumes. :param links: The links of this Volumes. # noqa: E501 :type links: PaginationLinks """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Volumes): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, Volumes): return True return self.to_dict() != other.to_dict() ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/ionoscloud/rest.py0000644000175100001660000003305015046550312017072 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import io import json import logging import re import ssl import base64 import hashlib import sys import asn1crypto.x509 import certifi # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode import urllib3 from ionoscloud.exceptions import ApiException, ApiValueError logger = logging.getLogger(__name__) def fingerprint_checking_SSLSocket(_fingerprint): class SSLSocket(ssl.SSLSocket): fingerprint = _fingerprint.replace(':', '').replace(' ', '').lower() def do_handshake(self, *args, **kw): super().do_handshake(*args, **kw) der_bytes = self.getpeercert(True) crt_sha1 = hashlib.sha1(der_bytes).hexdigest().lower() crt_sha256 = hashlib.sha256(der_bytes).hexdigest().lower() if crt_sha256 != self.fingerprint and crt_sha1 != self.fingerprint: raise RuntimeError( 'remote server presented a certificate which does not match the provided fingerprint', ) return SSLSocket class RESTResponse(io.IOBase): def __init__(self, resp): self.urllib3_response = resp self.status = resp.status self.reason = resp.reason self.data = resp.data def getheaders(self): """Returns a dictionary of the response headers.""" return self.urllib3_response.getheaders() def getheader(self, name, default=None): """Returns a given response header.""" return self.urllib3_response.getheader(name, default) class RESTClientObject(object): def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs if configuration.verify_ssl: cert_reqs = ssl.CERT_REQUIRED else: cert_reqs = ssl.CERT_NONE if configuration.fingerprint is not None: cert_reqs = ssl.CERT_NONE # monkey-patch ssl.SSLSocket if sys.version_info >= (3, 7): ssl.SSLContext.sslsocket_class = fingerprint_checking_SSLSocket(configuration.fingerprint) else: ssl.SSLSocket = fingerprint_checking_SSLSocket(configuration.fingerprint) ssl._create_default_https_context = ssl._create_unverified_context # ca_certs if configuration.ssl_ca_cert: ca_certs = configuration.ssl_ca_cert else: # if not set certificate file, use Mozilla's root certificates. ca_certs = certifi.where() addition_pool_args = {} if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: addition_pool_args['retries'] = configuration.retries if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize else: maxsize = 4 # https pool manager if configuration.proxy: self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, ca_certs=ca_certs, cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, **addition_pool_args ) else: self.pool_manager = urllib3.PoolManager( num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, ca_certs=ca_certs, cert_file=configuration.cert_file, key_file=configuration.key_file, **addition_pool_args ) def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ApiValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: raise ApiException(http_resp=r) return r def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): return self.request("GET", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): return self.request("HEAD", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) def OPTIONS(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): return self.request("OPTIONS", url, headers=headers, query_params=query_params, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): return self.request("DELETE", url, headers=headers, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) def POST(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): return self.request("POST", url, headers=headers, query_params=query_params, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) def PUT(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): return self.request("PUT", url, headers=headers, query_params=query_params, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) def PATCH(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): return self.request("PATCH", url, headers=headers, query_params=query_params, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2012737 ionoscloud-6.1.13/ionoscloud.egg-info/0000755000175100001660000000000015046550321017234 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976465.0 ionoscloud-6.1.13/ionoscloud.egg-info/PKG-INFO0000644000175100001660000021644015046550321020340 0ustar00runnerdockerMetadata-Version: 2.1 Name: ionoscloud Version: 6.1.13 Summary: Python SDK for the Ionos Cloud API Home-page: https://github.com/ionos-cloud/ionos-cloud-sdk-python Author: Ionos Cloud Author-email: sdk@cloud.ionos.com Keywords: OpenAPI,OpenAPI-Generator,CLOUD API Classifier: Natural Language :: English Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Software Development :: Libraries :: Application Frameworks Classifier: Topic :: Internet :: WWW/HTTP Description-Content-Type: text/markdown License-File: LICENSE ![CI](https://github.com/ionos-cloud/sdk-resources/workflows/[%20CI%20]%20CloudApi%20V6%20/%20Python/badge.svg) [![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=alert_status)](https://sonarcloud.io/summary?id=ionos-cloud_sdk-python) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=bugs)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-python&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=ionos-cloud_sdk-python) [![Release](https://img.shields.io/github/v/release/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) [![Release Date](https://img.shields.io/github/release-date/ionos-cloud/sdk-python.svg)](https://github.com/ionos-cloud/sdk-python/releases/latest) ![Alt text](.github/IONOS.CLOUD.BLU.svg?raw=true "Title") # Python API client for ionoscloud IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. ## Overview The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. The SDK for Python wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. ### Installation & Usage **Requirements:** - Python >= 3.5 ### pip install Since this package is hosted on [Pypi](https://pypi.org/) you can install it by using: ```bash pip install ionoscloud ``` If the python package is hosted on a repository, you can install directly using: ```bash pip install git+https://github.com/ionos-cloud/sdk-python.git ``` Note: you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ionos-cloud/sdk-python.git` Then import the package: ```python import ionoscloud ``` ### Setuptools Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```bash python setup.py install --user ``` or `sudo python setup.py install` to install the package for all users Then import the package: ```python import ionoscloud ``` > **_NOTE:_** The Python SDK does not support Python 2. It only supports Python >= 3.5. ### Authentication All available server URLs are: - *https://api.ionos.com/cloudapi/v6* - No description provided By default, *https://api.ionos.com/cloudapi/v6* is used, however this can be overriden at authentication, either by setting the `IONOS_API_URL` environment variable or by specifying the `host` parameter when initializing the sdk client. The username and password **or** the authentication token can be manually specified when initializing the SDK client: ```python configuration = ionoscloud.Configuration( username='YOUR_USERNAME', password='YOUR_PASSWORD', token='YOUR_TOKEN', host='API_URL' ) client = ionoscloud.ApiClient(configuration) ``` Environment variables can also be used. This is an example of how one would do that: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), token=os.environ.get('IONOS_TOKEN'), host=os.environ.get('IONOS_API_URL'), ) client = ionoscloud.ApiClient(configuration) ``` **Warning**: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file. ### HTTP proxies You can use http proxies by setting the following environment variables: - `IONOS_HTTP_PROXY` - proxy URL - `IONOS_HTTP_PROXY_HEADERS` - proxy headers Each line in `IONOS_HTTP_PROXY_HEADERS` represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example: ``` Connection: Keep-Alive User-Info: MyID User-Group: my long\nheader value ``` ### Depth Many of the _List_ or _Get_ operations will accept an optional _depth_ argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern. By default, the SDK sets the _depth_ argument to the maximum value. | Depth | Description | | :--- | :--- | | 0 | Only direct properties are included. Children are not included. | | 1 | Direct properties and children's references are returned. | | 2 | Direct properties and children's properties are returned. | | 3 | Direct properties, children's properties, and descendants' references are returned. | | 4 | Direct properties, children's properties, and descendants' properties are returned. | | 5 | Returns all available properties. | ### Pretty The operations will also accept an optional _pretty_ argument. Setting this to a value of `true` or `false` controls whether the response is pretty-printed \(with indentation and new lines\). By default, the SDK sets the _pretty_ argument to `true`. ### Changing the base URL Base URL for the HTTP operation can be changed in the following way: ```python import os configuration = ionoscloud.Configuration( username=os.environ.get('IONOS_USERNAME'), password=os.environ.get('IONOS_PASSWORD'), host=os.environ.get('IONOS_API_URL'), server_index=None, ) client = ionoscloud.ApiClient(configuration) ``` ## Certificate pinning: You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following: Set env variable IONOS_PINNED_CERT= You can get the sha256 fingerprint most easily from the browser by inspecting the certificate. ## Documentation for API Endpoints All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API Endpoints table | Class | Method | HTTP request | Description | | ------------- | ------------- | ------------- | ------------- | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_find_by_application_load_balancer_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_find_by_application_load_balancer_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_flowlogs_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_delete**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_forwardingrules_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_get**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_patch**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_post**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer | | ApplicationLoadBalancersApi | [**datacenters_applicationloadbalancers_put**](docs/api/ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID | | BackupUnitsApi | [**backupunits_delete**](docs/api/BackupUnitsApi.md#backupunits_delete) | **DELETE** /backupunits/{backupunitId} | Delete backup units | | BackupUnitsApi | [**backupunits_find_by_id**](docs/api/BackupUnitsApi.md#backupunits_find_by_id) | **GET** /backupunits/{backupunitId} | Retrieve backup units | | BackupUnitsApi | [**backupunits_get**](docs/api/BackupUnitsApi.md#backupunits_get) | **GET** /backupunits | List backup units | | BackupUnitsApi | [**backupunits_patch**](docs/api/BackupUnitsApi.md#backupunits_patch) | **PATCH** /backupunits/{backupunitId} | Partially modify backup units | | BackupUnitsApi | [**backupunits_post**](docs/api/BackupUnitsApi.md#backupunits_post) | **POST** /backupunits | Create backup units | | BackupUnitsApi | [**backupunits_put**](docs/api/BackupUnitsApi.md#backupunits_put) | **PUT** /backupunits/{backupunitId} | Modify backup units | | BackupUnitsApi | [**backupunits_ssourl_get**](docs/api/BackupUnitsApi.md#backupunits_ssourl_get) | **GET** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs | | ContractResourcesApi | [**contracts_get**](docs/api/ContractResourcesApi.md#contracts_get) | **GET** /contracts | Get Contract Information | | DataCentersApi | [**datacenters_delete**](docs/api/DataCentersApi.md#datacenters_delete) | **DELETE** /datacenters/{datacenterId} | Delete data centers | | DataCentersApi | [**datacenters_find_by_id**](docs/api/DataCentersApi.md#datacenters_find_by_id) | **GET** /datacenters/{datacenterId} | Retrieve data centers | | DataCentersApi | [**datacenters_get**](docs/api/DataCentersApi.md#datacenters_get) | **GET** /datacenters | List your data centers | | DataCentersApi | [**datacenters_patch**](docs/api/DataCentersApi.md#datacenters_patch) | **PATCH** /datacenters/{datacenterId} | Partially modify a Data Center by ID | | DataCentersApi | [**datacenters_post**](docs/api/DataCentersApi.md#datacenters_post) | **POST** /datacenters | Create a Data Center | | DataCentersApi | [**datacenters_put**](docs/api/DataCentersApi.md#datacenters_put) | **PUT** /datacenters/{datacenterId} | Modify a Data Center by ID | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_delete**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_find_by_id**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_get**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_patch**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_post**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule | | FirewallRulesApi | [**datacenters_servers_nics_firewallrules_put**](docs/api/FirewallRulesApi.md#datacenters_servers_nics_firewallrules_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_delete**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_find_by_id**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_get**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_patch**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_post**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log | | FlowLogsApi | [**datacenters_servers_nics_flowlogs_put**](docs/api/FlowLogsApi.md#datacenters_servers_nics_flowlogs_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs | | IPBlocksApi | [**ipblocks_delete**](docs/api/IPBlocksApi.md#ipblocks_delete) | **DELETE** /ipblocks/{ipblockId} | Delete IP blocks | | IPBlocksApi | [**ipblocks_find_by_id**](docs/api/IPBlocksApi.md#ipblocks_find_by_id) | **GET** /ipblocks/{ipblockId} | Retrieve IP blocks | | IPBlocksApi | [**ipblocks_get**](docs/api/IPBlocksApi.md#ipblocks_get) | **GET** /ipblocks | List IP blocks | | IPBlocksApi | [**ipblocks_patch**](docs/api/IPBlocksApi.md#ipblocks_patch) | **PATCH** /ipblocks/{ipblockId} | Partially modify IP blocks | | IPBlocksApi | [**ipblocks_post**](docs/api/IPBlocksApi.md#ipblocks_post) | **POST** /ipblocks | Reserve a IP Block | | IPBlocksApi | [**ipblocks_put**](docs/api/IPBlocksApi.md#ipblocks_put) | **PUT** /ipblocks/{ipblockId} | Modify a IP Block by ID | | ImagesApi | [**images_delete**](docs/api/ImagesApi.md#images_delete) | **DELETE** /images/{imageId} | Delete images | | ImagesApi | [**images_find_by_id**](docs/api/ImagesApi.md#images_find_by_id) | **GET** /images/{imageId} | Retrieve images | | ImagesApi | [**images_get**](docs/api/ImagesApi.md#images_get) | **GET** /images | List images | | ImagesApi | [**images_patch**](docs/api/ImagesApi.md#images_patch) | **PATCH** /images/{imageId} | Partially modify images | | ImagesApi | [**images_put**](docs/api/ImagesApi.md#images_put) | **PUT** /images/{imageId} | Modify an Image by ID | | KubernetesApi | [**k8s_delete**](docs/api/KubernetesApi.md#k8s_delete) | **DELETE** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_find_by_cluster_id**](docs/api/KubernetesApi.md#k8s_find_by_cluster_id) | **GET** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_get**](docs/api/KubernetesApi.md#k8s_get) | **GET** /k8s | Get Kubernetes Clusters | | KubernetesApi | [**k8s_kubeconfig_get**](docs/api/KubernetesApi.md#k8s_kubeconfig_get) | **GET** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File | | KubernetesApi | [**k8s_nodepools_delete**](docs/api/KubernetesApi.md#k8s_nodepools_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_nodepools_get**](docs/api/KubernetesApi.md#k8s_nodepools_get) | **GET** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools | | KubernetesApi | [**k8s_nodepools_nodes_delete**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_find_by_id**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_nodes_get**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_get) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes | | KubernetesApi | [**k8s_nodepools_nodes_replace_post**](docs/api/KubernetesApi.md#k8s_nodepools_nodes_replace_post) | **POST** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID | | KubernetesApi | [**k8s_nodepools_post**](docs/api/KubernetesApi.md#k8s_nodepools_post) | **POST** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool | | KubernetesApi | [**k8s_nodepools_put**](docs/api/KubernetesApi.md#k8s_nodepools_put) | **PUT** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID | | KubernetesApi | [**k8s_post**](docs/api/KubernetesApi.md#k8s_post) | **POST** /k8s | Create a Kubernetes Cluster | | KubernetesApi | [**k8s_put**](docs/api/KubernetesApi.md#k8s_put) | **PUT** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID | | KubernetesApi | [**k8s_versions_default_get**](docs/api/KubernetesApi.md#k8s_versions_default_get) | **GET** /k8s/versions/default | Get Default Kubernetes Version | | KubernetesApi | [**k8s_versions_get**](docs/api/KubernetesApi.md#k8s_versions_get) | **GET** /k8s/versions | Get Kubernetes Versions | | LANsApi | [**datacenters_lans_delete**](docs/api/LANsApi.md#datacenters_lans_delete) | **DELETE** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs | | LANsApi | [**datacenters_lans_find_by_id**](docs/api/LANsApi.md#datacenters_lans_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs | | LANsApi | [**datacenters_lans_get**](docs/api/LANsApi.md#datacenters_lans_get) | **GET** /datacenters/{datacenterId}/lans | List LANs | | LANsApi | [**datacenters_lans_nics_find_by_id**](docs/api/LANsApi.md#datacenters_lans_nics_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs | | LANsApi | [**datacenters_lans_nics_get**](docs/api/LANsApi.md#datacenters_lans_nics_get) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members | | LANsApi | [**datacenters_lans_nics_post**](docs/api/LANsApi.md#datacenters_lans_nics_post) | **POST** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs | | LANsApi | [**datacenters_lans_patch**](docs/api/LANsApi.md#datacenters_lans_patch) | **PATCH** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs | | LANsApi | [**datacenters_lans_post**](docs/api/LANsApi.md#datacenters_lans_post) | **POST** /datacenters/{datacenterId}/lans | Create LANs | | LANsApi | [**datacenters_lans_put**](docs/api/LANsApi.md#datacenters_lans_put) | **PUT** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs | | LabelsApi | [**datacenters_labels_delete**](docs/api/LabelsApi.md#datacenters_labels_delete) | **DELETE** /datacenters/{datacenterId}/labels/{key} | Delete data center labels | | LabelsApi | [**datacenters_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_labels_find_by_key) | **GET** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels | | LabelsApi | [**datacenters_labels_get**](docs/api/LabelsApi.md#datacenters_labels_get) | **GET** /datacenters/{datacenterId}/labels | List data center labels | | LabelsApi | [**datacenters_labels_post**](docs/api/LabelsApi.md#datacenters_labels_post) | **POST** /datacenters/{datacenterId}/labels | Create a Data Center Label | | LabelsApi | [**datacenters_labels_put**](docs/api/LabelsApi.md#datacenters_labels_put) | **PUT** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key | | LabelsApi | [**datacenters_servers_labels_delete**](docs/api/LabelsApi.md#datacenters_servers_labels_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels | | LabelsApi | [**datacenters_servers_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_servers_labels_find_by_key) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels | | LabelsApi | [**datacenters_servers_labels_get**](docs/api/LabelsApi.md#datacenters_servers_labels_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels | | LabelsApi | [**datacenters_servers_labels_post**](docs/api/LabelsApi.md#datacenters_servers_labels_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label | | LabelsApi | [**datacenters_servers_labels_put**](docs/api/LabelsApi.md#datacenters_servers_labels_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label | | LabelsApi | [**datacenters_volumes_labels_delete**](docs/api/LabelsApi.md#datacenters_volumes_labels_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels | | LabelsApi | [**datacenters_volumes_labels_find_by_key**](docs/api/LabelsApi.md#datacenters_volumes_labels_find_by_key) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels | | LabelsApi | [**datacenters_volumes_labels_get**](docs/api/LabelsApi.md#datacenters_volumes_labels_get) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels | | LabelsApi | [**datacenters_volumes_labels_post**](docs/api/LabelsApi.md#datacenters_volumes_labels_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label | | LabelsApi | [**datacenters_volumes_labels_put**](docs/api/LabelsApi.md#datacenters_volumes_labels_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label | | LabelsApi | [**images_labels_delete**](docs/api/LabelsApi.md#images_labels_delete) | **DELETE** /images/{imageId}/labels/{key} | Delete image label | | LabelsApi | [**images_labels_find_by_key**](docs/api/LabelsApi.md#images_labels_find_by_key) | **GET** /images/{imageId}/labels/{key} | Retrieve image labels | | LabelsApi | [**images_labels_get**](docs/api/LabelsApi.md#images_labels_get) | **GET** /images/{imageId}/labels | List image labels | | LabelsApi | [**images_labels_post**](docs/api/LabelsApi.md#images_labels_post) | **POST** /images/{imageId}/labels | Create an Image Label | | LabelsApi | [**images_labels_put**](docs/api/LabelsApi.md#images_labels_put) | **PUT** /images/{imageId}/labels/{key} | Modify an Image Label by Key | | LabelsApi | [**ipblocks_labels_delete**](docs/api/LabelsApi.md#ipblocks_labels_delete) | **DELETE** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels | | LabelsApi | [**ipblocks_labels_find_by_key**](docs/api/LabelsApi.md#ipblocks_labels_find_by_key) | **GET** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels | | LabelsApi | [**ipblocks_labels_get**](docs/api/LabelsApi.md#ipblocks_labels_get) | **GET** /ipblocks/{ipblockId}/labels | List IP block labels | | LabelsApi | [**ipblocks_labels_post**](docs/api/LabelsApi.md#ipblocks_labels_post) | **POST** /ipblocks/{ipblockId}/labels | Create IP block labels | | LabelsApi | [**ipblocks_labels_put**](docs/api/LabelsApi.md#ipblocks_labels_put) | **PUT** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID | | LabelsApi | [**labels_find_by_urn**](docs/api/LabelsApi.md#labels_find_by_urn) | **GET** /labels/{labelurn} | Retrieve labels by URN | | LabelsApi | [**labels_get**](docs/api/LabelsApi.md#labels_get) | **GET** /labels | List labels | | LabelsApi | [**snapshots_labels_delete**](docs/api/LabelsApi.md#snapshots_labels_delete) | **DELETE** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels | | LabelsApi | [**snapshots_labels_find_by_key**](docs/api/LabelsApi.md#snapshots_labels_find_by_key) | **GET** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels | | LabelsApi | [**snapshots_labels_get**](docs/api/LabelsApi.md#snapshots_labels_get) | **GET** /snapshots/{snapshotId}/labels | List snapshot labels | | LabelsApi | [**snapshots_labels_post**](docs/api/LabelsApi.md#snapshots_labels_post) | **POST** /snapshots/{snapshotId}/labels | Create a Snapshot Label | | LabelsApi | [**snapshots_labels_put**](docs/api/LabelsApi.md#snapshots_labels_put) | **PUT** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_find_by_nic_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_find_by_nic_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_get) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_balancednics_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_balancednics_post) | **POST** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs | | LoadBalancersApi | [**datacenters_loadbalancers_delete**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_find_by_id**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_find_by_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_get**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_get) | **GET** /datacenters/{datacenterId}/loadbalancers | List Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_patch**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers | | LoadBalancersApi | [**datacenters_loadbalancers_post**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_post) | **POST** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer | | LoadBalancersApi | [**datacenters_loadbalancers_put**](docs/api/LoadBalancersApi.md#datacenters_loadbalancers_put) | **PUT** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID | | LocationsApi | [**locations_find_by_region_id**](docs/api/LocationsApi.md#locations_find_by_region_id) | **GET** /locations/{regionId} | Get Locations within a Region | | LocationsApi | [**locations_find_by_region_id_and_id**](docs/api/LocationsApi.md#locations_find_by_region_id_and_id) | **GET** /locations/{regionId}/{locationId} | Get Location by ID | | LocationsApi | [**locations_get**](docs/api/LocationsApi.md#locations_get) | **GET** /locations | Get Locations | | NATGatewaysApi | [**datacenters_natgateways_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_find_by_nat_gateway_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_find_by_nat_gateway_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_find_by_flow_log_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log | | NATGatewaysApi | [**datacenters_natgateways_flowlogs_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_flowlogs_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs | | NATGatewaysApi | [**datacenters_natgateways_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_get) | **GET** /datacenters/{datacenterId}/natgateways | List NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_post) | **POST** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway | | NATGatewaysApi | [**datacenters_natgateways_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways | | NATGatewaysApi | [**datacenters_natgateways_rules_delete**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_find_by_nat_gateway_rule_id**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_find_by_nat_gateway_rule_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_get**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules | | NATGatewaysApi | [**datacenters_natgateways_rules_patch**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID | | NATGatewaysApi | [**datacenters_natgateways_rules_post**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule | | NATGatewaysApi | [**datacenters_natgateways_rules_put**](docs/api/NATGatewaysApi.md#datacenters_natgateways_rules_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_find_by_network_load_balancer_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_find_by_network_load_balancer_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_flowlogs_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_delete**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_forwardingrules_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_get**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_patch**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_post**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer | | NetworkLoadBalancersApi | [**datacenters_networkloadbalancers_put**](docs/api/NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers | | NetworkInterfacesApi | [**datacenters_servers_nics_delete**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_find_by_id**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_get**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_patch**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs | | NetworkInterfacesApi | [**datacenters_servers_nics_post**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC | | NetworkInterfacesApi | [**datacenters_servers_nics_put**](docs/api/NetworkInterfacesApi.md#datacenters_servers_nics_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs | | PrivateCrossConnectsApi | [**pccs_delete**](docs/api/PrivateCrossConnectsApi.md#pccs_delete) | **DELETE** /pccs/{pccId} | Delete Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_find_by_id**](docs/api/PrivateCrossConnectsApi.md#pccs_find_by_id) | **GET** /pccs/{pccId} | Retrieve a Cross Connect | | PrivateCrossConnectsApi | [**pccs_get**](docs/api/PrivateCrossConnectsApi.md#pccs_get) | **GET** /pccs | List Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_patch**](docs/api/PrivateCrossConnectsApi.md#pccs_patch) | **PATCH** /pccs/{pccId} | Partially modify a Private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_post**](docs/api/PrivateCrossConnectsApi.md#pccs_post) | **POST** /pccs | Create a Cross Connect | | RequestsApi | [**requests_find_by_id**](docs/api/RequestsApi.md#requests_find_by_id) | **GET** /requests/{requestId} | Retrieve requests | | RequestsApi | [**requests_get**](docs/api/RequestsApi.md#requests_get) | **GET** /requests | List requests | | RequestsApi | [**requests_status_get**](docs/api/RequestsApi.md#requests_status_get) | **GET** /requests/{requestId}/status | Retrieve request status | | SecurityGroupsApi | [**datacenters_securitygroups_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Delete a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Retrieve a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_delete**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Remove a Firewall Rule from a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_firewallrules_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_firewallrules_post) | **POST** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | Create Firewall rule to a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_get) | **GET** /datacenters/{datacenterId}/securitygroups | List Security Groups | | SecurityGroupsApi | [**datacenters_securitygroups_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Partially modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_post**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_post) | **POST** /datacenters/{datacenterId}/securitygroups | Create a Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId} | Modify Security Group | | SecurityGroupsApi | [**datacenters_securitygroups_rules_find_by_id**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_find_by_id) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Retrieve security group rule by id | | SecurityGroupsApi | [**datacenters_securitygroups_rules_get**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_get) | **GET** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules | List Security Group rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_patch**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_patch) | **PATCH** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Partially modify Security Group Rules | | SecurityGroupsApi | [**datacenters_securitygroups_rules_put**](docs/api/SecurityGroupsApi.md#datacenters_securitygroups_rules_put) | **PUT** /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} | Modify a Security Group Rule | | SecurityGroupsApi | [**datacenters_servers_nics_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_nics_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups | Attach a list of Security Groups to a NIC | | SecurityGroupsApi | [**datacenters_servers_securitygroups_put**](docs/api/SecurityGroupsApi.md#datacenters_servers_securitygroups_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/securitygroups | Attach a list of Security Groups to a Server | | ServersApi | [**datacenters_servers_cdroms_delete**](docs/api/ServersApi.md#datacenters_servers_cdroms_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_find_by_id**](docs/api/ServersApi.md#datacenters_servers_cdroms_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID | | ServersApi | [**datacenters_servers_cdroms_get**](docs/api/ServersApi.md#datacenters_servers_cdroms_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs | | ServersApi | [**datacenters_servers_cdroms_post**](docs/api/ServersApi.md#datacenters_servers_cdroms_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM | | ServersApi | [**datacenters_servers_delete**](docs/api/ServersApi.md#datacenters_servers_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId} | Delete servers | | ServersApi | [**datacenters_servers_find_by_id**](docs/api/ServersApi.md#datacenters_servers_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID | | ServersApi | [**datacenters_servers_get**](docs/api/ServersApi.md#datacenters_servers_get) | **GET** /datacenters/{datacenterId}/servers | List servers | | ServersApi | [**datacenters_servers_patch**](docs/api/ServersApi.md#datacenters_servers_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers | | ServersApi | [**datacenters_servers_post**](docs/api/ServersApi.md#datacenters_servers_post) | **POST** /datacenters/{datacenterId}/servers | Create a Server | | ServersApi | [**datacenters_servers_put**](docs/api/ServersApi.md#datacenters_servers_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID | | ServersApi | [**datacenters_servers_reboot_post**](docs/api/ServersApi.md#datacenters_servers_reboot_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers | | ServersApi | [**datacenters_servers_remote_console_get**](docs/api/ServersApi.md#datacenters_servers_remote_console_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link | | ServersApi | [**datacenters_servers_resume_post**](docs/api/ServersApi.md#datacenters_servers_resume_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID | | ServersApi | [**datacenters_servers_start_post**](docs/api/ServersApi.md#datacenters_servers_start_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID | | ServersApi | [**datacenters_servers_stop_post**](docs/api/ServersApi.md#datacenters_servers_stop_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID | | ServersApi | [**datacenters_servers_suspend_post**](docs/api/ServersApi.md#datacenters_servers_suspend_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID | | ServersApi | [**datacenters_servers_token_get**](docs/api/ServersApi.md#datacenters_servers_token_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/token | Get JSON Web Token | | ServersApi | [**datacenters_servers_upgrade_post**](docs/api/ServersApi.md#datacenters_servers_upgrade_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID | | ServersApi | [**datacenters_servers_volumes_delete**](docs/api/ServersApi.md#datacenters_servers_volumes_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID | | ServersApi | [**datacenters_servers_volumes_find_by_id**](docs/api/ServersApi.md#datacenters_servers_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID | | ServersApi | [**datacenters_servers_volumes_get**](docs/api/ServersApi.md#datacenters_servers_volumes_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes | | ServersApi | [**datacenters_servers_volumes_post**](docs/api/ServersApi.md#datacenters_servers_volumes_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server | | SnapshotsApi | [**snapshots_delete**](docs/api/SnapshotsApi.md#snapshots_delete) | **DELETE** /snapshots/{snapshotId} | Delete snapshots | | SnapshotsApi | [**snapshots_find_by_id**](docs/api/SnapshotsApi.md#snapshots_find_by_id) | **GET** /snapshots/{snapshotId} | Retrieve snapshots by ID | | SnapshotsApi | [**snapshots_get**](docs/api/SnapshotsApi.md#snapshots_get) | **GET** /snapshots | List snapshots | | SnapshotsApi | [**snapshots_patch**](docs/api/SnapshotsApi.md#snapshots_patch) | **PATCH** /snapshots/{snapshotId} | Partially modify snapshots | | SnapshotsApi | [**snapshots_put**](docs/api/SnapshotsApi.md#snapshots_put) | **PUT** /snapshots/{snapshotId} | Modify a Snapshot by ID | | TargetGroupsApi | [**target_groups_delete**](docs/api/TargetGroupsApi.md#target_groups_delete) | **DELETE** /targetgroups/{targetGroupId} | Delete a Target Group by ID | | TargetGroupsApi | [**targetgroups_find_by_target_group_id**](docs/api/TargetGroupsApi.md#targetgroups_find_by_target_group_id) | **GET** /targetgroups/{targetGroupId} | Get a Target Group by ID | | TargetGroupsApi | [**targetgroups_get**](docs/api/TargetGroupsApi.md#targetgroups_get) | **GET** /targetgroups | Get Target Groups | | TargetGroupsApi | [**targetgroups_patch**](docs/api/TargetGroupsApi.md#targetgroups_patch) | **PATCH** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID | | TargetGroupsApi | [**targetgroups_post**](docs/api/TargetGroupsApi.md#targetgroups_post) | **POST** /targetgroups | Create a Target Group | | TargetGroupsApi | [**targetgroups_put**](docs/api/TargetGroupsApi.md#targetgroups_put) | **PUT** /targetgroups/{targetGroupId} | Modify a Target Group by ID | | TemplatesApi | [**templates_find_by_id**](docs/api/TemplatesApi.md#templates_find_by_id) | **GET** /templates/{templateId} | Get Cubes Template by ID | | TemplatesApi | [**templates_get**](docs/api/TemplatesApi.md#templates_get) | **GET** /templates | Get Cubes Templates | | UserS3KeysApi | [**um_users_s3keys_delete**](docs/api/UserS3KeysApi.md#um_users_s3keys_delete) | **DELETE** /um/users/{userId}/s3keys/{keyId} | Delete Object storage keys | | UserS3KeysApi | [**um_users_s3keys_find_by_key_id**](docs/api/UserS3KeysApi.md#um_users_s3keys_find_by_key_id) | **GET** /um/users/{userId}/s3keys/{keyId} | Retrieve user Object storage keys by key ID | | UserS3KeysApi | [**um_users_s3keys_get**](docs/api/UserS3KeysApi.md#um_users_s3keys_get) | **GET** /um/users/{userId}/s3keys | List user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_post**](docs/api/UserS3KeysApi.md#um_users_s3keys_post) | **POST** /um/users/{userId}/s3keys | Create user Object storage keys | | UserS3KeysApi | [**um_users_s3keys_put**](docs/api/UserS3KeysApi.md#um_users_s3keys_put) | **PUT** /um/users/{userId}/s3keys/{keyId} | Modify a Object storage Key by Key ID | | UserS3KeysApi | [**um_users_s3ssourl_get**](docs/api/UserS3KeysApi.md#um_users_s3ssourl_get) | **GET** /um/users/{userId}/s3ssourl | Retrieve Object storage single sign-on URLs | | UserManagementApi | [**um_groups_delete**](docs/api/UserManagementApi.md#um_groups_delete) | **DELETE** /um/groups/{groupId} | Delete groups | | UserManagementApi | [**um_groups_find_by_id**](docs/api/UserManagementApi.md#um_groups_find_by_id) | **GET** /um/groups/{groupId} | Retrieve groups | | UserManagementApi | [**um_groups_get**](docs/api/UserManagementApi.md#um_groups_get) | **GET** /um/groups | List all groups | | UserManagementApi | [**um_groups_post**](docs/api/UserManagementApi.md#um_groups_post) | **POST** /um/groups | Create groups | | UserManagementApi | [**um_groups_put**](docs/api/UserManagementApi.md#um_groups_put) | **PUT** /um/groups/{groupId} | Modify groups | | UserManagementApi | [**um_groups_resources_get**](docs/api/UserManagementApi.md#um_groups_resources_get) | **GET** /um/groups/{groupId}/resources | Retrieve group resources | | UserManagementApi | [**um_groups_shares_delete**](docs/api/UserManagementApi.md#um_groups_shares_delete) | **DELETE** /um/groups/{groupId}/shares/{resourceId} | Remove group shares | | UserManagementApi | [**um_groups_shares_find_by_resource_id**](docs/api/UserManagementApi.md#um_groups_shares_find_by_resource_id) | **GET** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares | | UserManagementApi | [**um_groups_shares_get**](docs/api/UserManagementApi.md#um_groups_shares_get) | **GET** /um/groups/{groupId}/shares | List group shares | | UserManagementApi | [**um_groups_shares_post**](docs/api/UserManagementApi.md#um_groups_shares_post) | **POST** /um/groups/{groupId}/shares/{resourceId} | Add group shares | | UserManagementApi | [**um_groups_shares_put**](docs/api/UserManagementApi.md#um_groups_shares_put) | **PUT** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges | | UserManagementApi | [**um_groups_users_delete**](docs/api/UserManagementApi.md#um_groups_users_delete) | **DELETE** /um/groups/{groupId}/users/{userId} | Remove users from groups | | UserManagementApi | [**um_groups_users_get**](docs/api/UserManagementApi.md#um_groups_users_get) | **GET** /um/groups/{groupId}/users | List group members | | UserManagementApi | [**um_groups_users_post**](docs/api/UserManagementApi.md#um_groups_users_post) | **POST** /um/groups/{groupId}/users | Add a Group Member | | UserManagementApi | [**um_resources_find_by_type**](docs/api/UserManagementApi.md#um_resources_find_by_type) | **GET** /um/resources/{resourceType} | List resources by type | | UserManagementApi | [**um_resources_find_by_type_and_id**](docs/api/UserManagementApi.md#um_resources_find_by_type_and_id) | **GET** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type | | UserManagementApi | [**um_resources_get**](docs/api/UserManagementApi.md#um_resources_get) | **GET** /um/resources | List all resources | | UserManagementApi | [**um_users_delete**](docs/api/UserManagementApi.md#um_users_delete) | **DELETE** /um/users/{userId} | Delete users | | UserManagementApi | [**um_users_find_by_id**](docs/api/UserManagementApi.md#um_users_find_by_id) | **GET** /um/users/{userId} | Retrieve users | | UserManagementApi | [**um_users_get**](docs/api/UserManagementApi.md#um_users_get) | **GET** /um/users | List all users | | UserManagementApi | [**um_users_groups_get**](docs/api/UserManagementApi.md#um_users_groups_get) | **GET** /um/users/{userId}/groups | Retrieve group resources by user ID | | UserManagementApi | [**um_users_owns_get**](docs/api/UserManagementApi.md#um_users_owns_get) | **GET** /um/users/{userId}/owns | Retrieve user resources by user ID | | UserManagementApi | [**um_users_post**](docs/api/UserManagementApi.md#um_users_post) | **POST** /um/users | Create users | | UserManagementApi | [**um_users_put**](docs/api/UserManagementApi.md#um_users_put) | **PUT** /um/users/{userId} | Modify users | | VolumesApi | [**datacenters_volumes_create_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_create_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots | | VolumesApi | [**datacenters_volumes_delete**](docs/api/VolumesApi.md#datacenters_volumes_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes | | VolumesApi | [**datacenters_volumes_find_by_id**](docs/api/VolumesApi.md#datacenters_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes | | VolumesApi | [**datacenters_volumes_get**](docs/api/VolumesApi.md#datacenters_volumes_get) | **GET** /datacenters/{datacenterId}/volumes | List volumes | | VolumesApi | [**datacenters_volumes_patch**](docs/api/VolumesApi.md#datacenters_volumes_patch) | **PATCH** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes | | VolumesApi | [**datacenters_volumes_post**](docs/api/VolumesApi.md#datacenters_volumes_post) | **POST** /datacenters/{datacenterId}/volumes | Create a Volume | | VolumesApi | [**datacenters_volumes_put**](docs/api/VolumesApi.md#datacenters_volumes_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID | | VolumesApi | [**datacenters_volumes_restore_snapshot_post**](docs/api/VolumesApi.md#datacenters_volumes_restore_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots | | Api | [**api_info_get**](docs/api/Api.md#api_info_get) | **GET** / | Get API information |
## Documentation For Models All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API models list - [ApplicationLoadBalancer](docs/models/ApplicationLoadBalancer) - [ApplicationLoadBalancerEntities](docs/models/ApplicationLoadBalancerEntities) - [ApplicationLoadBalancerForwardingRule](docs/models/ApplicationLoadBalancerForwardingRule) - [ApplicationLoadBalancerForwardingRuleProperties](docs/models/ApplicationLoadBalancerForwardingRuleProperties) - [ApplicationLoadBalancerForwardingRulePut](docs/models/ApplicationLoadBalancerForwardingRulePut) - [ApplicationLoadBalancerForwardingRules](docs/models/ApplicationLoadBalancerForwardingRules) - [ApplicationLoadBalancerHttpRule](docs/models/ApplicationLoadBalancerHttpRule) - [ApplicationLoadBalancerHttpRuleCondition](docs/models/ApplicationLoadBalancerHttpRuleCondition) - [ApplicationLoadBalancerProperties](docs/models/ApplicationLoadBalancerProperties) - [ApplicationLoadBalancerPut](docs/models/ApplicationLoadBalancerPut) - [ApplicationLoadBalancers](docs/models/ApplicationLoadBalancers) - [AttachedVolumes](docs/models/AttachedVolumes) - [BackupUnit](docs/models/BackupUnit) - [BackupUnitProperties](docs/models/BackupUnitProperties) - [BackupUnitSSO](docs/models/BackupUnitSSO) - [BackupUnits](docs/models/BackupUnits) - [BalancedNics](docs/models/BalancedNics) - [Cdroms](docs/models/Cdroms) - [ConnectableDatacenter](docs/models/ConnectableDatacenter) - [Contract](docs/models/Contract) - [ContractProperties](docs/models/ContractProperties) - [Contracts](docs/models/Contracts) - [CpuArchitectureProperties](docs/models/CpuArchitectureProperties) - [CreateSnapshot](docs/models/CreateSnapshot) - [CreateSnapshotProperties](docs/models/CreateSnapshotProperties) - [DataCenterEntities](docs/models/DataCenterEntities) - [Datacenter](docs/models/Datacenter) - [DatacenterElementMetadata](docs/models/DatacenterElementMetadata) - [DatacenterPost](docs/models/DatacenterPost) - [DatacenterProperties](docs/models/DatacenterProperties) - [DatacenterPropertiesPost](docs/models/DatacenterPropertiesPost) - [DatacenterPropertiesPut](docs/models/DatacenterPropertiesPut) - [DatacenterPut](docs/models/DatacenterPut) - [Datacenters](docs/models/Datacenters) - [Error](docs/models/Error) - [ErrorMessage](docs/models/ErrorMessage) - [FirewallRule](docs/models/FirewallRule) - [FirewallRules](docs/models/FirewallRules) - [FirewallruleProperties](docs/models/FirewallruleProperties) - [FlowLog](docs/models/FlowLog) - [FlowLogProperties](docs/models/FlowLogProperties) - [FlowLogPut](docs/models/FlowLogPut) - [FlowLogs](docs/models/FlowLogs) - [Group](docs/models/Group) - [GroupEntities](docs/models/GroupEntities) - [GroupMembers](docs/models/GroupMembers) - [GroupProperties](docs/models/GroupProperties) - [GroupShare](docs/models/GroupShare) - [GroupShareProperties](docs/models/GroupShareProperties) - [GroupShares](docs/models/GroupShares) - [GroupUsers](docs/models/GroupUsers) - [Groups](docs/models/Groups) - [IPFailover](docs/models/IPFailover) - [Image](docs/models/Image) - [ImageProperties](docs/models/ImageProperties) - [Images](docs/models/Images) - [Info](docs/models/Info) - [IpBlock](docs/models/IpBlock) - [IpBlockProperties](docs/models/IpBlockProperties) - [IpBlocks](docs/models/IpBlocks) - [IpConsumer](docs/models/IpConsumer) - [KubernetesAutoScaling](docs/models/KubernetesAutoScaling) - [KubernetesCluster](docs/models/KubernetesCluster) - [KubernetesClusterEntities](docs/models/KubernetesClusterEntities) - [KubernetesClusterForPost](docs/models/KubernetesClusterForPost) - [KubernetesClusterForPut](docs/models/KubernetesClusterForPut) - [KubernetesClusterProperties](docs/models/KubernetesClusterProperties) - [KubernetesClusterPropertiesForPost](docs/models/KubernetesClusterPropertiesForPost) - [KubernetesClusterPropertiesForPut](docs/models/KubernetesClusterPropertiesForPut) - [KubernetesClusters](docs/models/KubernetesClusters) - [KubernetesMaintenanceWindow](docs/models/KubernetesMaintenanceWindow) - [KubernetesNode](docs/models/KubernetesNode) - [KubernetesNodeMetadata](docs/models/KubernetesNodeMetadata) - [KubernetesNodePool](docs/models/KubernetesNodePool) - [KubernetesNodePoolForPost](docs/models/KubernetesNodePoolForPost) - [KubernetesNodePoolForPut](docs/models/KubernetesNodePoolForPut) - [KubernetesNodePoolLan](docs/models/KubernetesNodePoolLan) - [KubernetesNodePoolLanRoutes](docs/models/KubernetesNodePoolLanRoutes) - [KubernetesNodePoolProperties](docs/models/KubernetesNodePoolProperties) - [KubernetesNodePoolPropertiesForPost](docs/models/KubernetesNodePoolPropertiesForPost) - [KubernetesNodePoolPropertiesForPut](docs/models/KubernetesNodePoolPropertiesForPut) - [KubernetesNodePoolServerType](docs/models/KubernetesNodePoolServerType) - [KubernetesNodePools](docs/models/KubernetesNodePools) - [KubernetesNodeProperties](docs/models/KubernetesNodeProperties) - [KubernetesNodes](docs/models/KubernetesNodes) - [Label](docs/models/Label) - [LabelProperties](docs/models/LabelProperties) - [LabelResource](docs/models/LabelResource) - [LabelResourceProperties](docs/models/LabelResourceProperties) - [LabelResources](docs/models/LabelResources) - [Labels](docs/models/Labels) - [Lan](docs/models/Lan) - [LanEntities](docs/models/LanEntities) - [LanNics](docs/models/LanNics) - [LanProperties](docs/models/LanProperties) - [Lans](docs/models/Lans) - [ListOfIds](docs/models/ListOfIds) - [Loadbalancer](docs/models/Loadbalancer) - [LoadbalancerEntities](docs/models/LoadbalancerEntities) - [LoadbalancerProperties](docs/models/LoadbalancerProperties) - [Loadbalancers](docs/models/Loadbalancers) - [Location](docs/models/Location) - [LocationProperties](docs/models/LocationProperties) - [Locations](docs/models/Locations) - [NatGateway](docs/models/NatGateway) - [NatGatewayEntities](docs/models/NatGatewayEntities) - [NatGatewayLanProperties](docs/models/NatGatewayLanProperties) - [NatGatewayProperties](docs/models/NatGatewayProperties) - [NatGatewayPut](docs/models/NatGatewayPut) - [NatGatewayRule](docs/models/NatGatewayRule) - [NatGatewayRuleProperties](docs/models/NatGatewayRuleProperties) - [NatGatewayRuleProtocol](docs/models/NatGatewayRuleProtocol) - [NatGatewayRulePut](docs/models/NatGatewayRulePut) - [NatGatewayRuleType](docs/models/NatGatewayRuleType) - [NatGatewayRules](docs/models/NatGatewayRules) - [NatGateways](docs/models/NatGateways) - [NetworkLoadBalancer](docs/models/NetworkLoadBalancer) - [NetworkLoadBalancerEntities](docs/models/NetworkLoadBalancerEntities) - [NetworkLoadBalancerForwardingRule](docs/models/NetworkLoadBalancerForwardingRule) - [NetworkLoadBalancerForwardingRuleHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleHealthCheck) - [NetworkLoadBalancerForwardingRuleProperties](docs/models/NetworkLoadBalancerForwardingRuleProperties) - [NetworkLoadBalancerForwardingRulePut](docs/models/NetworkLoadBalancerForwardingRulePut) - [NetworkLoadBalancerForwardingRuleTarget](docs/models/NetworkLoadBalancerForwardingRuleTarget) - [NetworkLoadBalancerForwardingRuleTargetHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck) - [NetworkLoadBalancerForwardingRules](docs/models/NetworkLoadBalancerForwardingRules) - [NetworkLoadBalancerProperties](docs/models/NetworkLoadBalancerProperties) - [NetworkLoadBalancerPut](docs/models/NetworkLoadBalancerPut) - [NetworkLoadBalancers](docs/models/NetworkLoadBalancers) - [Nic](docs/models/Nic) - [NicEntities](docs/models/NicEntities) - [NicProperties](docs/models/NicProperties) - [NicPut](docs/models/NicPut) - [Nics](docs/models/Nics) - [NoStateMetaData](docs/models/NoStateMetaData) - [PaginationLinks](docs/models/PaginationLinks) - [Peer](docs/models/Peer) - [PrivateCrossConnect](docs/models/PrivateCrossConnect) - [PrivateCrossConnectProperties](docs/models/PrivateCrossConnectProperties) - [PrivateCrossConnects](docs/models/PrivateCrossConnects) - [RemoteConsoleUrl](docs/models/RemoteConsoleUrl) - [Request](docs/models/Request) - [RequestMetadata](docs/models/RequestMetadata) - [RequestProperties](docs/models/RequestProperties) - [RequestStatus](docs/models/RequestStatus) - [RequestStatusMetadata](docs/models/RequestStatusMetadata) - [RequestTarget](docs/models/RequestTarget) - [Requests](docs/models/Requests) - [Resource](docs/models/Resource) - [ResourceEntities](docs/models/ResourceEntities) - [ResourceGroups](docs/models/ResourceGroups) - [ResourceLimits](docs/models/ResourceLimits) - [ResourceProperties](docs/models/ResourceProperties) - [ResourceReference](docs/models/ResourceReference) - [Resources](docs/models/Resources) - [ResourcesUsers](docs/models/ResourcesUsers) - [RestoreSnapshot](docs/models/RestoreSnapshot) - [RestoreSnapshotProperties](docs/models/RestoreSnapshotProperties) - [S3Bucket](docs/models/S3Bucket) - [S3Key](docs/models/S3Key) - [S3KeyMetadata](docs/models/S3KeyMetadata) - [S3KeyProperties](docs/models/S3KeyProperties) - [S3Keys](docs/models/S3Keys) - [S3ObjectStorageSSO](docs/models/S3ObjectStorageSSO) - [SecurityGroup](docs/models/SecurityGroup) - [SecurityGroupEntities](docs/models/SecurityGroupEntities) - [SecurityGroupEntitiesRequest](docs/models/SecurityGroupEntitiesRequest) - [SecurityGroupProperties](docs/models/SecurityGroupProperties) - [SecurityGroupRequest](docs/models/SecurityGroupRequest) - [SecurityGroups](docs/models/SecurityGroups) - [Server](docs/models/Server) - [ServerEntities](docs/models/ServerEntities) - [ServerProperties](docs/models/ServerProperties) - [Servers](docs/models/Servers) - [Snapshot](docs/models/Snapshot) - [SnapshotProperties](docs/models/SnapshotProperties) - [Snapshots](docs/models/Snapshots) - [TargetGroup](docs/models/TargetGroup) - [TargetGroupHealthCheck](docs/models/TargetGroupHealthCheck) - [TargetGroupHttpHealthCheck](docs/models/TargetGroupHttpHealthCheck) - [TargetGroupProperties](docs/models/TargetGroupProperties) - [TargetGroupPut](docs/models/TargetGroupPut) - [TargetGroupTarget](docs/models/TargetGroupTarget) - [TargetGroups](docs/models/TargetGroups) - [TargetPortRange](docs/models/TargetPortRange) - [Template](docs/models/Template) - [TemplateProperties](docs/models/TemplateProperties) - [Templates](docs/models/Templates) - [Token](docs/models/Token) - [Type](docs/models/Type) - [User](docs/models/User) - [UserGroupPost](docs/models/UserGroupPost) - [UserMetadata](docs/models/UserMetadata) - [UserPost](docs/models/UserPost) - [UserProperties](docs/models/UserProperties) - [UserPropertiesPost](docs/models/UserPropertiesPost) - [UserPropertiesPut](docs/models/UserPropertiesPut) - [UserPut](docs/models/UserPut) - [Users](docs/models/Users) - [UsersEntities](docs/models/UsersEntities) - [Volume](docs/models/Volume) - [VolumeProperties](docs/models/VolumeProperties) - [Volumes](docs/models/Volumes) [[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976465.0 ionoscloud-6.1.13/ionoscloud.egg-info/SOURCES.txt0000644000175100001660000002245115046550321021124 0ustar00runnerdockerLICENSE README.md setup.cfg setup.py ionoscloud/__init__.py ionoscloud/api_client.py ionoscloud/configuration.py ionoscloud/exceptions.py ionoscloud/rest.py ionoscloud.egg-info/PKG-INFO ionoscloud.egg-info/SOURCES.txt ionoscloud.egg-info/dependency_links.txt ionoscloud.egg-info/requires.txt ionoscloud.egg-info/top_level.txt ionoscloud/api/__api.py ionoscloud/api/__init__.py ionoscloud/api/application_load_balancers_api.py ionoscloud/api/backup_units_api.py ionoscloud/api/contract_resources_api.py ionoscloud/api/data_centers_api.py ionoscloud/api/firewall_rules_api.py ionoscloud/api/flow_logs_api.py ionoscloud/api/images_api.py ionoscloud/api/ip_blocks_api.py ionoscloud/api/kubernetes_api.py ionoscloud/api/labels_api.py ionoscloud/api/lans_api.py ionoscloud/api/load_balancers_api.py ionoscloud/api/locations_api.py ionoscloud/api/nat_gateways_api.py ionoscloud/api/network_interfaces_api.py ionoscloud/api/network_load_balancers_api.py ionoscloud/api/private_cross_connects_api.py ionoscloud/api/requests_api.py ionoscloud/api/security_groups_api.py ionoscloud/api/servers_api.py ionoscloud/api/snapshots_api.py ionoscloud/api/target_groups_api.py ionoscloud/api/templates_api.py ionoscloud/api/user_management_api.py ionoscloud/api/user_s3_keys_api.py ionoscloud/api/volumes_api.py ionoscloud/models/__init__.py ionoscloud/models/application_load_balancer.py ionoscloud/models/application_load_balancer_entities.py ionoscloud/models/application_load_balancer_forwarding_rule.py ionoscloud/models/application_load_balancer_forwarding_rule_properties.py ionoscloud/models/application_load_balancer_forwarding_rule_put.py ionoscloud/models/application_load_balancer_forwarding_rules.py ionoscloud/models/application_load_balancer_http_rule.py ionoscloud/models/application_load_balancer_http_rule_condition.py ionoscloud/models/application_load_balancer_properties.py ionoscloud/models/application_load_balancer_put.py ionoscloud/models/application_load_balancers.py ionoscloud/models/attached_volumes.py ionoscloud/models/backup_unit.py ionoscloud/models/backup_unit_properties.py ionoscloud/models/backup_unit_sso.py ionoscloud/models/backup_units.py ionoscloud/models/balanced_nics.py ionoscloud/models/cdroms.py ionoscloud/models/connectable_datacenter.py ionoscloud/models/contract.py ionoscloud/models/contract_properties.py ionoscloud/models/contracts.py ionoscloud/models/cpu_architecture_properties.py ionoscloud/models/create_snapshot.py ionoscloud/models/create_snapshot_properties.py ionoscloud/models/data_center_entities.py ionoscloud/models/datacenter.py ionoscloud/models/datacenter_element_metadata.py ionoscloud/models/datacenter_post.py ionoscloud/models/datacenter_properties.py ionoscloud/models/datacenter_properties_post.py ionoscloud/models/datacenter_properties_put.py ionoscloud/models/datacenter_put.py ionoscloud/models/datacenters.py ionoscloud/models/error.py ionoscloud/models/error_message.py ionoscloud/models/firewall_rule.py ionoscloud/models/firewall_rules.py ionoscloud/models/firewallrule_properties.py ionoscloud/models/flow_log.py ionoscloud/models/flow_log_properties.py ionoscloud/models/flow_log_put.py ionoscloud/models/flow_logs.py ionoscloud/models/group.py ionoscloud/models/group_entities.py ionoscloud/models/group_members.py ionoscloud/models/group_properties.py ionoscloud/models/group_share.py ionoscloud/models/group_share_properties.py ionoscloud/models/group_shares.py ionoscloud/models/group_users.py ionoscloud/models/groups.py ionoscloud/models/image.py ionoscloud/models/image_properties.py ionoscloud/models/images.py ionoscloud/models/info.py ionoscloud/models/ip_block.py ionoscloud/models/ip_block_properties.py ionoscloud/models/ip_blocks.py ionoscloud/models/ip_consumer.py ionoscloud/models/ip_failover.py ionoscloud/models/kubernetes_auto_scaling.py ionoscloud/models/kubernetes_cluster.py ionoscloud/models/kubernetes_cluster_entities.py ionoscloud/models/kubernetes_cluster_for_post.py ionoscloud/models/kubernetes_cluster_for_put.py ionoscloud/models/kubernetes_cluster_properties.py ionoscloud/models/kubernetes_cluster_properties_for_post.py ionoscloud/models/kubernetes_cluster_properties_for_put.py ionoscloud/models/kubernetes_clusters.py ionoscloud/models/kubernetes_maintenance_window.py ionoscloud/models/kubernetes_node.py ionoscloud/models/kubernetes_node_metadata.py ionoscloud/models/kubernetes_node_pool.py ionoscloud/models/kubernetes_node_pool_for_post.py ionoscloud/models/kubernetes_node_pool_for_put.py ionoscloud/models/kubernetes_node_pool_lan.py ionoscloud/models/kubernetes_node_pool_lan_routes.py ionoscloud/models/kubernetes_node_pool_properties.py ionoscloud/models/kubernetes_node_pool_properties_for_post.py ionoscloud/models/kubernetes_node_pool_properties_for_put.py ionoscloud/models/kubernetes_node_pool_server_type.py ionoscloud/models/kubernetes_node_pools.py ionoscloud/models/kubernetes_node_properties.py ionoscloud/models/kubernetes_nodes.py ionoscloud/models/label.py ionoscloud/models/label_properties.py ionoscloud/models/label_resource.py ionoscloud/models/label_resource_properties.py ionoscloud/models/label_resources.py ionoscloud/models/labels.py ionoscloud/models/lan.py ionoscloud/models/lan_entities.py ionoscloud/models/lan_nics.py ionoscloud/models/lan_properties.py ionoscloud/models/lans.py ionoscloud/models/list_of_ids.py ionoscloud/models/loadbalancer.py ionoscloud/models/loadbalancer_entities.py ionoscloud/models/loadbalancer_properties.py ionoscloud/models/loadbalancers.py ionoscloud/models/location.py ionoscloud/models/location_properties.py ionoscloud/models/locations.py ionoscloud/models/nat_gateway.py ionoscloud/models/nat_gateway_entities.py ionoscloud/models/nat_gateway_lan_properties.py ionoscloud/models/nat_gateway_properties.py ionoscloud/models/nat_gateway_put.py ionoscloud/models/nat_gateway_rule.py ionoscloud/models/nat_gateway_rule_properties.py ionoscloud/models/nat_gateway_rule_protocol.py ionoscloud/models/nat_gateway_rule_put.py ionoscloud/models/nat_gateway_rule_type.py ionoscloud/models/nat_gateway_rules.py ionoscloud/models/nat_gateways.py ionoscloud/models/network_load_balancer.py ionoscloud/models/network_load_balancer_entities.py ionoscloud/models/network_load_balancer_forwarding_rule.py ionoscloud/models/network_load_balancer_forwarding_rule_health_check.py ionoscloud/models/network_load_balancer_forwarding_rule_properties.py ionoscloud/models/network_load_balancer_forwarding_rule_put.py ionoscloud/models/network_load_balancer_forwarding_rule_target.py ionoscloud/models/network_load_balancer_forwarding_rule_target_health_check.py ionoscloud/models/network_load_balancer_forwarding_rules.py ionoscloud/models/network_load_balancer_properties.py ionoscloud/models/network_load_balancer_put.py ionoscloud/models/network_load_balancers.py ionoscloud/models/nic.py ionoscloud/models/nic_entities.py ionoscloud/models/nic_properties.py ionoscloud/models/nic_put.py ionoscloud/models/nics.py ionoscloud/models/no_state_meta_data.py ionoscloud/models/pagination_links.py ionoscloud/models/peer.py ionoscloud/models/private_cross_connect.py ionoscloud/models/private_cross_connect_properties.py ionoscloud/models/private_cross_connects.py ionoscloud/models/remote_console_url.py ionoscloud/models/request.py ionoscloud/models/request_metadata.py ionoscloud/models/request_properties.py ionoscloud/models/request_status.py ionoscloud/models/request_status_metadata.py ionoscloud/models/request_target.py ionoscloud/models/requests.py ionoscloud/models/resource.py ionoscloud/models/resource_entities.py ionoscloud/models/resource_groups.py ionoscloud/models/resource_limits.py ionoscloud/models/resource_properties.py ionoscloud/models/resource_reference.py ionoscloud/models/resources.py ionoscloud/models/resources_users.py ionoscloud/models/restore_snapshot.py ionoscloud/models/restore_snapshot_properties.py ionoscloud/models/s3_bucket.py ionoscloud/models/s3_key.py ionoscloud/models/s3_key_metadata.py ionoscloud/models/s3_key_properties.py ionoscloud/models/s3_keys.py ionoscloud/models/s3_object_storage_sso.py ionoscloud/models/security_group.py ionoscloud/models/security_group_entities.py ionoscloud/models/security_group_entities_request.py ionoscloud/models/security_group_properties.py ionoscloud/models/security_group_request.py ionoscloud/models/security_groups.py ionoscloud/models/server.py ionoscloud/models/server_entities.py ionoscloud/models/server_properties.py ionoscloud/models/servers.py ionoscloud/models/snapshot.py ionoscloud/models/snapshot_properties.py ionoscloud/models/snapshots.py ionoscloud/models/target_group.py ionoscloud/models/target_group_health_check.py ionoscloud/models/target_group_http_health_check.py ionoscloud/models/target_group_properties.py ionoscloud/models/target_group_put.py ionoscloud/models/target_group_target.py ionoscloud/models/target_groups.py ionoscloud/models/target_port_range.py ionoscloud/models/template.py ionoscloud/models/template_properties.py ionoscloud/models/templates.py ionoscloud/models/token.py ionoscloud/models/type.py ionoscloud/models/user.py ionoscloud/models/user_group_post.py ionoscloud/models/user_metadata.py ionoscloud/models/user_post.py ionoscloud/models/user_properties.py ionoscloud/models/user_properties_post.py ionoscloud/models/user_properties_put.py ionoscloud/models/user_put.py ionoscloud/models/users.py ionoscloud/models/users_entities.py ionoscloud/models/volume.py ionoscloud/models/volume_properties.py ionoscloud/models/volumes.py././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976465.0 ionoscloud-6.1.13/ionoscloud.egg-info/dependency_links.txt0000644000175100001660000000000115046550321023302 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976465.0 ionoscloud-6.1.13/ionoscloud.egg-info/requires.txt0000644000175100001660000000007315046550321021634 0ustar00runnerdockerurllib3>=1.15 six>=1.10 certifi python-dateutil asn1crypto ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976465.0 ionoscloud-6.1.13/ionoscloud.egg-info/top_level.txt0000644000175100001660000000001315046550321021760 0ustar00runnerdockerionoscloud ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1754976465.2402747 ionoscloud-6.1.13/setup.cfg0000644000175100001660000000010515046550321015201 0ustar00runnerdocker[flake8] max-line-length = 99 [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1754976458.0 ionoscloud-6.1.13/setup.py0000644000175100001660000000426515046550312015105 0ustar00runnerdocker# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. # noqa: E501 The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech """ from setuptools import setup # noqa: H301 import os import codecs NAME = "ionoscloud" VERSION = "6.1.13" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "asn1crypto"] here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): return codecs.open(os.path.join(here, *parts), 'r', 'utf-8').read() if os.path.isfile("README.md"): long_desc = read('README.md') else: long_desc = "Ionos Cloud API Client Library for Python" setup( name=NAME, version=VERSION, description="Python SDK for the Ionos Cloud API", author='Ionos Cloud', author_email='sdk@cloud.ionos.com', long_description=long_desc, long_description_content_type='text/markdown', url="https://github.com/ionos-cloud/ionos-cloud-sdk-python", keywords=["OpenAPI", "OpenAPI-Generator", "CLOUD API"], install_requires=REQUIRES, packages=['ionoscloud', 'ionoscloud.api', 'ionoscloud.models'], include_package_data=True, classifiers=[ 'Natural Language :: English', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Libraries :: Application Frameworks', 'Topic :: Internet :: WWW/HTTP'] )