pax_global_header00006660000000000000000000000064145400222150014505gustar00rootroot0000000000000052 comment=8041aedc17a8743147494ea950cba5b7915962d7 sdk-python-6.1.9/000077500000000000000000000000001454002221500136225ustar00rootroot00000000000000sdk-python-6.1.9/.gitbook.yaml000066400000000000000000000001001454002221500162110ustar00rootroot00000000000000root: docs structure: readme: README.md summary: summary.md sdk-python-6.1.9/.github/000077500000000000000000000000001454002221500151625ustar00rootroot00000000000000sdk-python-6.1.9/.github/ISSUE_TEMPLATE/000077500000000000000000000000001454002221500173455ustar00rootroot00000000000000sdk-python-6.1.9/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000017421454002221500220430ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: LiviusP --- ## Description ## Expected behavior ## Environment Python Version: ``` ``` SDK version: ``` ``` OS: ``` ``` ## Configuration Files ## How to Reproduce ## Error and Debug Output ## Additional Notes ## References sdk-python-6.1.9/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000002161454002221500213340ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: IONOS Cloud API url: https://devops.ionos.com/api/ about: View API documentation sdk-python-6.1.9/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000032421454002221500230730ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: '' labels: enhancement assignees: LiviusP --- ### Current SDK Version ``` ... ``` ### Use-cases ### Attempted Solutions ### Proposal ### References sdk-python-6.1.9/.github/workflows/000077500000000000000000000000001454002221500172175ustar00rootroot00000000000000sdk-python-6.1.9/.github/workflows/build.yml000066400000000000000000000011031454002221500210340ustar00rootroot00000000000000name: Build on: push: branches: - master pull_request: types: [opened, synchronize, reopened] jobs: sonarcloud: name: SonarCloud runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} sdk-python-6.1.9/.github/workflows/issues.yml000066400000000000000000000054751454002221500212700ustar00rootroot00000000000000name: Issue Creation Tracker on: issues: types: [ opened, reopened ] jobs: build: runs-on: ubuntu-latest steps: - name: Git Issue Details run: | echo "Issue creator: ${{ github.event.issue.user.login }}" echo "Issue title: ${{ github.event.issue.title }}" echo "Issue number: ${{ github.event.issue.number }}" echo "Issue url: ${{ github.event.issue.html_url }}" - name: Google Chat Notification run: | curl --location --request POST '${{ secrets.ISSUE_TRACKER_WEBHOOK }}' \ --header 'Content-Type: application/json' \ --data-raw '{ "cards": [ { "header": { "title": "New Issue 🔨", "subtitle": "Issue No: #${{ github.event.issue.number }}" }, "sections": [ { "widgets": [ { "keyValue": { "topLabel": "Repository", "content": "${{ github.repository }}" }, }, { "keyValue": { "topLabel": "Title", "content": "${{ github.event.issue.title }}" } }, { "keyValue": { "topLabel": "Assigned Labels", "content": "- ${{ join(github.event.issue.labels.*.name) }}" } }, { "buttons": [ { "textButton": { "text": "OPEN ISSUE", "onClick": { "openLink": { "url": "${{ github.event.issue.html_url }}" } } } } ] } ] } ] } ] }' sdk-python-6.1.9/.gitignore000066400000000000000000000014471454002221500156200ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *,cover .hypothesis/ venv/ .venv/ .python-version .pytest_cache # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ #Ipython Notebook .ipynb_checkpoints sdk-python-6.1.9/.gitlab-ci.yml000066400000000000000000000012061454002221500162550ustar00rootroot00000000000000# ref: https://docs.gitlab.com/ee/ci/README.html stages: - test .nosetest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=ionoscloud nosetest-2.7: extends: .nosetest image: python:2.7-alpine nosetest-3.3: extends: .nosetest image: python:3.3-alpine nosetest-3.4: extends: .nosetest image: python:3.4-alpine nosetest-3.5: extends: .nosetest image: python:3.5-alpine nosetest-3.6: extends: .nosetest image: python:3.6-alpine nosetest-3.7: extends: .nosetest image: python:3.7-alpine nosetest-3.8: extends: .nosetest image: python:3.8-alpine sdk-python-6.1.9/.travis.yml000066400000000000000000000005241454002221500157340ustar00rootroot00000000000000# ref: https://docs.travis-ci.com/user/languages/python language: python python: - "2.7" - "3.2" - "3.3" - "3.4" - "3.5" - "3.6" - "3.7" - "3.8" # command to install dependencies install: - "pip install -r requirements.txt" - "pip install -r test-requirements.txt" # command to run tests script: pytest --cov=ionoscloud sdk-python-6.1.9/LICENSE000066400000000000000000000247751454002221500146460ustar00rootroot00000000000000 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.sdk-python-6.1.9/README.md000066400000000000000000002020151454002221500151010ustar00rootroot00000000000000![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 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' ) 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') ) 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 | [**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 private Cross-Connects | | 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 private Cross-Connects | | PrivateCrossConnectsApi | [**pccs_post**](docs/api/PrivateCrossConnectsApi.md#pccs_post) | **POST** /pccs | Create a Private 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 | | 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 JASON 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 S3 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 S3 keys by key ID | | UserS3KeysApi | [**um_users_s3keys_get**](docs/api/UserS3KeysApi.md#um_users_s3keys_get) | **GET** /um/users/{userId}/s3keys | List user S3 keys | | UserS3KeysApi | [**um_users_s3keys_post**](docs/api/UserS3KeysApi.md#um_users_s3keys_post) | **POST** /um/users/{userId}/s3keys | Create user S3 keys | | UserS3KeysApi | [**um_users_s3keys_put**](docs/api/UserS3KeysApi.md#um_users_s3keys_put) | **PUT** /um/users/{userId}/s3keys/{keyId} | Modify a S3 Key by Key ID | | UserS3KeysApi | [**um_users_s3ssourl_get**](docs/api/UserS3KeysApi.md#um_users_s3ssourl_get) | **GET** /um/users/{userId}/s3ssourl | Retrieve S3 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) - [DataCenterEntities](docs/models/DataCenterEntities) - [Datacenter](docs/models/Datacenter) - [DatacenterElementMetadata](docs/models/DatacenterElementMetadata) - [DatacenterProperties](docs/models/DatacenterProperties) - [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) - [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) - [LanPost](docs/models/LanPost) - [LanProperties](docs/models/LanProperties) - [LanPropertiesPost](docs/models/LanPropertiesPost) - [Lans](docs/models/Lans) - [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) - [S3Bucket](docs/models/S3Bucket) - [S3Key](docs/models/S3Key) - [S3KeyMetadata](docs/models/S3KeyMetadata) - [S3KeyProperties](docs/models/S3KeyProperties) - [S3Keys](docs/models/S3Keys) - [S3ObjectStorageSSO](docs/models/S3ObjectStorageSSO) - [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) - [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)
sdk-python-6.1.9/docs/000077500000000000000000000000001454002221500145525ustar00rootroot00000000000000sdk-python-6.1.9/docs/CHANGELOG.md000066400000000000000000000077461454002221500164010ustar00rootroot00000000000000# CHANGELOG ## 6.1.8 ### Features: Added support for **Private Kubernetes Clusters**: - New parameters on `KubernetesClusterProperties` and `KubernetesClusterPropertiesForPost`: `location`, `nat_gateway_ip`, `node_subnet` and `public` ### Fixes: - Fixed wrong parsing of `IONOS_HTTP_PROXY_HEADERS` by @hegerdes ## 6.1.7 ### Features: Added support for **IPv6**: - New parameter on `DatacenterProperties`: `ipv6_cidr_block` - New parameter on `LanProperties` and `LanPropertiesPost`: `ipv6_cidr_block` - New parameters on `NicProperties`: `dhcpv6`, `ipv6_cidr_block` and `ipv6_ips` More details about IPv6 configuration can be found [here](https://docs.ionos.com/cloud/compute-engine/networks/ipv6). ### Fixes: - Fixed wrong error being shown when timeout is reached inside `wait_for`. ## 6.1.6 ## Features: - New licenceType supported: **RHEL** ## 6.1.4 \(July 14th, 2022\) ### Fixes: - fix `manage_dbaas` typo in `model_group_properties.py` ## 6.1.3 \(July 14th, 2022\) ### Known issues: - typo in `manage_dbaas` field in `model_group_properties.py` - generated as `manage_d_baa_s` ## 6.1.2 \(July 14th, 2022\) ### Fixes: - fix: added asn1crypto as required module ## 6.1.1 \(July 14th, 2022\) ### Features - added `manage_dbaas` field in `model_group_properties.py` : provides privilege for a group to manage DBaaS related functionality. Admin users already here this enabled by default. - added `delete_volumes` to `datacenters_servers_delete`: If true, all attached storage volumes will also be deleted. - added `boot_order` to volume properties : 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. | [optional] [default to 'AUTO'] | - added certificate pinning to sdk python. Enabling certificate pinning allows you to bypass normal certificate checking, by supplying a SHA256 or SHA1 fingerprint of the leaf cert to be checked against what the server provides. ## 6.1.0 \(June 15th, 2022\) ### Enhancements: * added Application Load Balancer and Target Group, 18 new models and 2 new APIs ## 6.0.4 \(May 17th, 2022\) ### Fixes: * removed parameter for `KubernetesClusterProperties`, `KubernetesClusterPropertiesForPost` models: `public` * removed parameter for `KubernetesNodePoolProperties` model: `gateway_ip` ## 6.0.3 \(April 7th, 2022\) ### Enhancements: * added support for filter query parameters on GET requests * added support for http proxy (_**IONOS_HTTP_PROXY**_ and _**IONOS_HTTP_PROXY_HEADERS**_ environment variables) ## 6.0.2 \(February 18th, 2022\) ### Enhancements: * support for Token Authentication: new parameters on **ionoscloud.Configuration**: `token` _(instead of api_key)_ and **token_prefix** _(instead of api_key_prefix)_ ## 6.0.1 \(February 4th, 2022\) ### Enhancements: * new licence type: `WINDOWS2022` * new parameter on **KubernetesClusterProperties**, **KubernetesClusterPropertiesForPost** models: `public` * new parameter on **KubernetesNodePoolProperties** model: `gateway_ip` * new read-only parameter on **VolumeProperties** model: `boot_server` ## 6.0.0 \(December 9th, 2021\) ### Misc: * new Python requirements: **Python ≥ 3.5** * **LansApi** class renamed to **LANsApi** * `backupunits_patch()` method parameter _backup_unit_properties_ changed to _backup_unit_ * **UserPropertiesPut** new property: `password` * **KubernetesNodePoolPropertiesForPut**: `name` is no longer a required parameter * `k8s_nodepools_put()` method parameter _kubernetes_node_pool_for_put_ changed to _kubernetes_node_pool_ * `k8s_nodepools_post()` method parameter _kubernetes_node_pool_ type is **KubernetesNodePoolForPost** instead of **KubernetesNodePool** sdk-python-6.1.9/docs/README.md000066400000000000000000000112721454002221500160340ustar00rootroot00000000000000# Python SDK ## 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. ## Getting Started An IONOS account is required for access to the Cloud API; credentials from your registration are used to authenticate against the IONOS Cloud API. ### Installation & Usage **Requirements:** - Python >= 3.5 ### pip install Since this package is hosted on PyPI \([https://pypi.org/](https://pypi.org/)\) you can install it like this ```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 ``` \(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 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' ) 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') ) 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 ### 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) ``` ## Feature Reference The IONOS Cloud SDK for Python aims to offer access to all resources in the IONOS Cloud API and also offers some additional features that make the integration easier: * authentication for API calls * handling of asynchronous requests ## FAQ 1. How can I open a bug/feature request? Bugs & feature requests can be open on the repository issues: [https://github.com/ionos-cloud/sdk-python/issues/new/choose](https://github.com/ionos-cloud/sdk-python/issues/new/choose) 1. Can I contribute to the Python SDK? Pure SDKs are automatically generated using OpenAPI Generator and don’t support manual changes. If you need changes please open an issue and we’ll try to take care of it. sdk-python-6.1.9/docs/api/000077500000000000000000000000001454002221500153235ustar00rootroot00000000000000sdk-python-6.1.9/docs/api/Api.md000066400000000000000000000042271454002221500163630ustar00rootroot00000000000000# Api All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**api_info_get**](Api.md#api_info_get) | **GET** / | Get API information | # **api_info_get** > Info api_info_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get API information Retrieves the API information such as API version. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) with ionoscloud.ApiClient() as api_client: # Create an instance of the API class api_instance = ionoscloud.Api(api_client) try: # Get API information api_response = api_instance.api_info_get() print(api_response) except ApiException as e: print('Exception when calling Api.api_info_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Info**](../models/Info.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/ApplicationLoadBalancersApi.md000066400000000000000000001722301454002221500231620ustar00rootroot00000000000000# ApplicationLoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_applicationloadbalancers_delete**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID | | [**datacenters_applicationloadbalancers_find_by_application_load_balancer_id**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_find_by_application_load_balancer_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID | | [**datacenters_applicationloadbalancers_flowlogs_delete**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID | | [**datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID | | [**datacenters_applicationloadbalancers_flowlogs_get**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs | | [**datacenters_applicationloadbalancers_flowlogs_patch**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID | | [**datacenters_applicationloadbalancers_flowlogs_post**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log | | [**datacenters_applicationloadbalancers_flowlogs_put**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID | | [**datacenters_applicationloadbalancers_forwardingrules_delete**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID | | [**datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID | | [**datacenters_applicationloadbalancers_forwardingrules_get**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules | | [**datacenters_applicationloadbalancers_forwardingrules_patch**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID | | [**datacenters_applicationloadbalancers_forwardingrules_post**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule | | [**datacenters_applicationloadbalancers_forwardingrules_put**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID | | [**datacenters_applicationloadbalancers_get**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_get) | **GET** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers | | [**datacenters_applicationloadbalancers_patch**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID | | [**datacenters_applicationloadbalancers_post**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_post) | **POST** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer | | [**datacenters_applicationloadbalancers_put**](ApplicationLoadBalancersApi.md#datacenters_applicationloadbalancers_put) | **PUT** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID | # **datacenters_applicationloadbalancers_delete** > datacenters_applicationloadbalancers_delete(datacenter_id, application_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete an Application Load Balancer by ID Removes the specified Application Load Balancer from the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. try: # Delete an Application Load Balancer by ID api_instance.datacenters_applicationloadbalancers_delete(datacenter_id, application_load_balancer_id) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_find_by_application_load_balancer_id** > ApplicationLoadBalancer datacenters_applicationloadbalancers_find_by_application_load_balancer_id(datacenter_id, application_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get an Application Load Balancer by ID Retrieves the properties of the specified Application Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. try: # Get an Application Load Balancer by ID api_response = api_instance.datacenters_applicationloadbalancers_find_by_application_load_balancer_id(datacenter_id, application_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_find_by_application_load_balancer_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_delete** > datacenters_applicationloadbalancers_flowlogs_delete(datacenter_id, application_load_balancer_id, flow_log_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete an ALB Flow Log by ID Deletes the Application Load Balancer flow log specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the flow log. try: # Delete an ALB Flow Log by ID api_instance.datacenters_applicationloadbalancers_flowlogs_delete(datacenter_id, application_load_balancer_id, flow_log_id) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the flow log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id** > FlowLog datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, application_load_balancer_id, flow_log_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get an ALB Flow Log by ID Retrieves the Application Load Balancer flow log specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the flow log. try: # Get an ALB Flow Log by ID api_response = api_instance.datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, application_load_balancer_id, flow_log_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_find_by_flow_log_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the flow log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_get** > FlowLogs datacenters_applicationloadbalancers_flowlogs_get(datacenter_id, application_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get ALB Flow Logs Retrieves the flow logs for the specified Application Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. try: # Get ALB Flow Logs api_response = api_instance.datacenters_applicationloadbalancers_flowlogs_get(datacenter_id, application_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_patch** > FlowLog datacenters_applicationloadbalancers_flowlogs_patch(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially Modify an ALB Flow Log by ID Updates the properties of the Application Load Balancer flow log specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the flow log. application_load_balancer_flow_log_properties = ionoscloud.FlowLogProperties() # FlowLogProperties | The properties of the ALB flow log to be updated. try: # Partially Modify an ALB Flow Log by ID api_response = api_instance.datacenters_applicationloadbalancers_flowlogs_patch(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log_properties) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the flow log. | | | **application_load_balancer_flow_log_properties** | [**FlowLogProperties**](../models/FlowLogProperties.md)| The properties of the ALB flow log to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_post** > FlowLog datacenters_applicationloadbalancers_flowlogs_post(datacenter_id, application_load_balancer_id, application_load_balancer_flow_log, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create an ALB Flow Log Creates a flow log for the Application Load Balancer specified by ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. application_load_balancer_flow_log = ionoscloud.FlowLog() # FlowLog | The flow log to create. try: # Create an ALB Flow Log api_response = api_instance.datacenters_applicationloadbalancers_flowlogs_post(datacenter_id, application_load_balancer_id, application_load_balancer_flow_log) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **application_load_balancer_flow_log** | [**FlowLog**](../models/FlowLog.md)| The flow log to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_applicationloadbalancers_flowlogs_put** > FlowLog datacenters_applicationloadbalancers_flowlogs_put(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify an ALB Flow Log by ID Modifies the Application Load Balancer flow log specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the flow log. application_load_balancer_flow_log = ionoscloud.FlowLogPut() # FlowLogPut | The modified ALB flow log. try: # Modify an ALB Flow Log by ID api_response = api_instance.datacenters_applicationloadbalancers_flowlogs_put(datacenter_id, application_load_balancer_id, flow_log_id, application_load_balancer_flow_log) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_flowlogs_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the flow log. | | | **application_load_balancer_flow_log** | [**FlowLogPut**](../models/FlowLogPut.md)| The modified ALB flow log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_delete** > datacenters_applicationloadbalancers_forwardingrules_delete(datacenter_id, application_load_balancer_id, forwarding_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete an ALB Forwarding Rule by ID Deletes the Application Load Balancer forwarding rule specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. try: # Delete an ALB Forwarding Rule by ID api_instance.datacenters_applicationloadbalancers_forwardingrules_delete(datacenter_id, application_load_balancer_id, forwarding_rule_id) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id** > ApplicationLoadBalancerForwardingRule datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, application_load_balancer_id, forwarding_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get an ALB Forwarding Rule by ID Retrieves the Application Load Balancer forwarding rule specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. try: # Get an ALB Forwarding Rule by ID api_response = api_instance.datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, application_load_balancer_id, forwarding_rule_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_find_by_forwarding_rule_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_get** > ApplicationLoadBalancerForwardingRules datacenters_applicationloadbalancers_forwardingrules_get(datacenter_id, application_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get ALB Forwarding Rules Lists the forwarding rules of the specified Application Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. try: # Get ALB Forwarding Rules api_response = api_instance.datacenters_applicationloadbalancers_forwardingrules_get(datacenter_id, application_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancerForwardingRules**](../models/ApplicationLoadBalancerForwardingRules.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_patch** > ApplicationLoadBalancerForwardingRule datacenters_applicationloadbalancers_forwardingrules_patch(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify an ALB Forwarding Rule by ID Updates the properties of the Application Load Balancer forwarding rule specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. application_load_balancer_forwarding_rule_properties = ionoscloud.ApplicationLoadBalancerForwardingRuleProperties() # ApplicationLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated. try: # Partially modify an ALB Forwarding Rule by ID api_response = api_instance.datacenters_applicationloadbalancers_forwardingrules_patch(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule_properties) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **application_load_balancer_forwarding_rule_properties** | [**ApplicationLoadBalancerForwardingRuleProperties**](../models/ApplicationLoadBalancerForwardingRuleProperties.md)| The properties of the forwarding rule to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_post** > ApplicationLoadBalancerForwardingRule datacenters_applicationloadbalancers_forwardingrules_post(datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create an ALB Forwarding Rule Creates a forwarding rule for the specified Application Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. application_load_balancer_forwarding_rule = ionoscloud.ApplicationLoadBalancerForwardingRule() # ApplicationLoadBalancerForwardingRule | The forwarding rule to create. try: # Create an ALB Forwarding Rule api_response = api_instance.datacenters_applicationloadbalancers_forwardingrules_post(datacenter_id, application_load_balancer_id, application_load_balancer_forwarding_rule) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **application_load_balancer_forwarding_rule** | [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md)| The forwarding rule to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_applicationloadbalancers_forwardingrules_put** > ApplicationLoadBalancerForwardingRule datacenters_applicationloadbalancers_forwardingrules_put(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify an ALB Forwarding Rule by ID Modifies the Application Load Balancer forwarding rule specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. application_load_balancer_forwarding_rule = ionoscloud.ApplicationLoadBalancerForwardingRulePut() # ApplicationLoadBalancerForwardingRulePut | The modified ALB forwarding rule. try: # Modify an ALB Forwarding Rule by ID api_response = api_instance.datacenters_applicationloadbalancers_forwardingrules_put(datacenter_id, application_load_balancer_id, forwarding_rule_id, application_load_balancer_forwarding_rule) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_forwardingrules_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **application_load_balancer_forwarding_rule** | [**ApplicationLoadBalancerForwardingRulePut**](../models/ApplicationLoadBalancerForwardingRulePut.md)| The modified ALB forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_applicationloadbalancers_get** > ApplicationLoadBalancers datacenters_applicationloadbalancers_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) Get Application Load Balancers Lists all Application Load Balancers within a data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # Get Application Load Balancers api_response = api_instance.datacenters_applicationloadbalancers_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**ApplicationLoadBalancers**](../models/ApplicationLoadBalancers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_patch** > ApplicationLoadBalancer datacenters_applicationloadbalancers_patch(datacenter_id, application_load_balancer_id, application_load_balancer_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially Modify an Application Load Balancer by ID Updates the properties of the specified Application Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. application_load_balancer_properties = ionoscloud.ApplicationLoadBalancerProperties() # ApplicationLoadBalancerProperties | The Application Load Balancer properties to be updated. try: # Partially Modify an Application Load Balancer by ID api_response = api_instance.datacenters_applicationloadbalancers_patch(datacenter_id, application_load_balancer_id, application_load_balancer_properties) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **application_load_balancer_properties** | [**ApplicationLoadBalancerProperties**](../models/ApplicationLoadBalancerProperties.md)| The Application Load Balancer properties to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_applicationloadbalancers_post** > ApplicationLoadBalancer datacenters_applicationloadbalancers_post(datacenter_id, application_load_balancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create an Application Load Balancer Creates an Application Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer = ionoscloud.ApplicationLoadBalancer() # ApplicationLoadBalancer | The Application Load Balancer to create. try: # Create an Application Load Balancer api_response = api_instance.datacenters_applicationloadbalancers_post(datacenter_id, application_load_balancer) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer** | [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md)| The Application Load Balancer to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_applicationloadbalancers_put** > ApplicationLoadBalancer datacenters_applicationloadbalancers_put(datacenter_id, application_load_balancer_id, application_load_balancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify an Application Load Balancer by ID Modifies the properties of the specified Application Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ApplicationLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. application_load_balancer_id = 'application_load_balancer_id_example' # str | The unique ID of the Application Load Balancer. application_load_balancer = ionoscloud.ApplicationLoadBalancerPut() # ApplicationLoadBalancerPut | The modified Application Load Balancer. try: # Modify an Application Load Balancer by ID api_response = api_instance.datacenters_applicationloadbalancers_put(datacenter_id, application_load_balancer_id, application_load_balancer) print(api_response) except ApiException as e: print('Exception when calling ApplicationLoadBalancersApi.datacenters_applicationloadbalancers_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **application_load_balancer_id** | **str**| The unique ID of the Application Load Balancer. | | | **application_load_balancer** | [**ApplicationLoadBalancerPut**](../models/ApplicationLoadBalancerPut.md)| The modified Application Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/BackupUnitsApi.md000066400000000000000000000424411454002221500205340ustar00rootroot00000000000000# BackupUnitsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**backupunits_delete**](BackupUnitsApi.md#backupunits_delete) | **DELETE** /backupunits/{backupunitId} | Delete backup units | | [**backupunits_find_by_id**](BackupUnitsApi.md#backupunits_find_by_id) | **GET** /backupunits/{backupunitId} | Retrieve backup units | | [**backupunits_get**](BackupUnitsApi.md#backupunits_get) | **GET** /backupunits | List backup units | | [**backupunits_patch**](BackupUnitsApi.md#backupunits_patch) | **PATCH** /backupunits/{backupunitId} | Partially modify backup units | | [**backupunits_post**](BackupUnitsApi.md#backupunits_post) | **POST** /backupunits | Create backup units | | [**backupunits_put**](BackupUnitsApi.md#backupunits_put) | **PUT** /backupunits/{backupunitId} | Modify backup units | | [**backupunits_ssourl_get**](BackupUnitsApi.md#backupunits_ssourl_get) | **GET** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs | # **backupunits_delete** > backupunits_delete(backupunit_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete backup units 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 ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backupunit_id = 'backupunit_id_example' # str | The unique ID of the backup unit. try: # Delete backup units api_instance.backupunits_delete(backupunit_id) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backupunit_id** | **str**| The unique ID of the backup unit. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **backupunits_find_by_id** > BackupUnit backupunits_find_by_id(backupunit_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve backup units Retrieve the properties of the specified backup unit. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backupunit_id = 'backupunit_id_example' # str | The unique ID of the backup unit. try: # Retrieve backup units api_response = api_instance.backupunits_find_by_id(backupunit_id) print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backupunit_id** | **str**| The unique ID of the backup unit. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **backupunits_get** > BackupUnits backupunits_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List backup units List all available backup units. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) try: # List backup units api_response = api_instance.backupunits_get() print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnits**](../models/BackupUnits.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **backupunits_patch** > BackupUnit backupunits_patch(backupunit_id, backup_unit, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify backup units Update the properties of the specified backup unit. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backupunit_id = 'backupunit_id_example' # str | The unique ID of the backup unit. backup_unit = ionoscloud.BackupUnitProperties() # BackupUnitProperties | The properties of the backup unit to be updated. try: # Partially modify backup units api_response = api_instance.backupunits_patch(backupunit_id, backup_unit) print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backupunit_id** | **str**| The unique ID of the backup unit. | | | **backup_unit** | [**BackupUnitProperties**](../models/BackupUnitProperties.md)| The properties of the backup unit to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **backupunits_post** > BackupUnit backupunits_post(backup_unit, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create backup units Create a backup unit. Backup units are resources, same as storage volumes or snapshots; they can be shared through groups in User management. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backup_unit = ionoscloud.BackupUnit() # BackupUnit | The backup unit to create. try: # Create backup units api_response = api_instance.backupunits_post(backup_unit) print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backup_unit** | [**BackupUnit**](../models/BackupUnit.md)| The backup unit to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **backupunits_put** > BackupUnit backupunits_put(backupunit_id, backup_unit, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify backup units Modify the properties of the specified backup unit. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backupunit_id = 'backupunit_id_example' # str | The unique ID of the backup unit. backup_unit = ionoscloud.BackupUnit() # BackupUnit | The modified backup unit. try: # Modify backup units api_response = api_instance.backupunits_put(backupunit_id, backup_unit) print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backupunit_id** | **str**| The unique ID of the backup unit. | | | **backup_unit** | [**BackupUnit**](../models/BackupUnit.md)| The modified backup unit. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **backupunits_ssourl_get** > BackupUnitSSO backupunits_ssourl_get(backupunit_id, pretty=pretty, x_contract_number=x_contract_number) Retrieve BU single sign-on URLs Retrieve a single sign-on URL for the specified backup unit. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.BackupUnitsApi(api_client) backupunit_id = 'backupunit_id_example' # str | The unique ID of the backup unit. try: # Retrieve BU single sign-on URLs api_response = api_instance.backupunits_ssourl_get(backupunit_id) print(api_response) except ApiException as e: print('Exception when calling BackupUnitsApi.backupunits_ssourl_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **backupunit_id** | **str**| The unique ID of the backup unit. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BackupUnitSSO**](../models/BackupUnitSSO.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/ContractResourcesApi.md000066400000000000000000000050071454002221500217510ustar00rootroot00000000000000# ContractResourcesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**contracts_get**](ContractResourcesApi.md#contracts_get) | **GET** /contracts | Get Contract Information | # **contracts_get** > Contracts contracts_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Contract Information Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ContractResourcesApi(api_client) try: # Get Contract Information api_response = api_instance.contracts_get() print(api_response) except ApiException as e: print('Exception when calling ContractResourcesApi.contracts_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Contracts**](../models/Contracts.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/DataCentersApi.md000066400000000000000000000402771454002221500205060ustar00rootroot00000000000000# DataCentersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_delete**](DataCentersApi.md#datacenters_delete) | **DELETE** /datacenters/{datacenterId} | Delete data centers | | [**datacenters_find_by_id**](DataCentersApi.md#datacenters_find_by_id) | **GET** /datacenters/{datacenterId} | Retrieve data centers | | [**datacenters_get**](DataCentersApi.md#datacenters_get) | **GET** /datacenters | List your data centers | | [**datacenters_patch**](DataCentersApi.md#datacenters_patch) | **PATCH** /datacenters/{datacenterId} | Partially modify a Data Center by ID | | [**datacenters_post**](DataCentersApi.md#datacenters_post) | **POST** /datacenters | Create a Data Center | | [**datacenters_put**](DataCentersApi.md#datacenters_put) | **PUT** /datacenters/{datacenterId} | Modify a Data Center by ID | # **datacenters_delete** > datacenters_delete(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete data centers Delete the specified data center and all the elements it contains. This method is destructive and should be used carefully. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # Delete data centers api_instance.datacenters_delete(datacenter_id) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_find_by_id** > Datacenter datacenters_find_by_id(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve data centers 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # Retrieve data centers api_response = api_instance.datacenters_find_by_id(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Datacenter**](../models/Datacenter.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_get** > Datacenters datacenters_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List your data centers List the data centers for your account. Default limit is the first 100 items; use pagination query parameters for listing more items. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) try: # List your data centers api_response = api_instance.datacenters_get() print(api_response) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Datacenters**](../models/Datacenters.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_patch** > Datacenter datacenters_patch(datacenter_id, datacenter, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify a Data Center by ID Updates the properties of the specified data center, rename it, or change the description. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. datacenter = ionoscloud.DatacenterProperties() # DatacenterProperties | The properties of the data center to be updated. try: # Partially modify a Data Center by ID api_response = api_instance.datacenters_patch(datacenter_id, datacenter) print(api_response) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **datacenter** | [**DatacenterProperties**](../models/DatacenterProperties.md)| The properties of the data center to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Datacenter**](../models/Datacenter.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_post** > Datacenter datacenters_post(datacenter, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Data Center 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) datacenter = ionoscloud.Datacenter() # Datacenter | The data center to create. try: # Create a Data Center api_response = api_instance.datacenters_post(datacenter) print(api_response) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter** | [**Datacenter**](../models/Datacenter.md)| The data center to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Datacenter**](../models/Datacenter.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_put** > Datacenter datacenters_put(datacenter_id, datacenter, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Data Center by ID Modifies the properties of the specified data center, rename it, or change the description. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.DataCentersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. datacenter = ionoscloud.Datacenter() # Datacenter | The modified data center. try: # Modify a Data Center by ID api_response = api_instance.datacenters_put(datacenter_id, datacenter) print(api_response) except ApiException as e: print('Exception when calling DataCentersApi.datacenters_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **datacenter** | [**Datacenter**](../models/Datacenter.md)| The modified data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Datacenter**](../models/Datacenter.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/FirewallRulesApi.md000066400000000000000000000473631454002221500210740ustar00rootroot00000000000000# FirewallRulesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_servers_nics_firewallrules_delete**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules | | [**datacenters_servers_nics_firewallrules_find_by_id**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules | | [**datacenters_servers_nics_firewallrules_get**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules | | [**datacenters_servers_nics_firewallrules_patch**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules | | [**datacenters_servers_nics_firewallrules_post**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule | | [**datacenters_servers_nics_firewallrules_put**](FirewallRulesApi.md#datacenters_servers_nics_firewallrules_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule | # **datacenters_servers_nics_firewallrules_delete** > datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete firewall rules Delete the specified firewall rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. firewallrule_id = 'firewallrule_id_example' # str | The unique ID of the firewall rule. try: # Delete firewall rules api_instance.datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **firewallrule_id** | **str**| The unique ID of the firewall rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_firewallrules_find_by_id** > FirewallRule datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve firewall rules Retrieve the properties of the specified firewall rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. firewallrule_id = 'firewallrule_id_example' # str | The unique ID of the firewall rule. try: # Retrieve firewall rules api_response = api_instance.datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id) print(api_response) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **firewallrule_id** | **str**| The unique ID of the firewall rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_firewallrules_get** > FirewallRules datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List firewall rules List all firewall rules for the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # List firewall rules api_response = api_instance.datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id) print(api_response) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**FirewallRules**](../models/FirewallRules.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_firewallrules_patch** > FirewallRule datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify firewall rules Update the properties of the specified firewall rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. firewallrule_id = 'firewallrule_id_example' # str | The unique ID of the firewall rule. firewallrule = ionoscloud.FirewallruleProperties() # FirewallruleProperties | The properties of the firewall rule to be updated. try: # Partially modify firewall rules api_response = api_instance.datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule) print(api_response) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **firewallrule_id** | **str**| The unique ID of the firewall rule. | | | **firewallrule** | [**FirewallruleProperties**](../models/FirewallruleProperties.md)| The properties of the firewall rule to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_firewallrules_post** > FirewallRule datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Firewall Rule Creates a firewall rule for the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. firewallrule = ionoscloud.FirewallRule() # FirewallRule | The firewall rule to create. try: # Create a Firewall Rule api_response = api_instance.datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule) print(api_response) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **firewallrule** | [**FirewallRule**](../models/FirewallRule.md)| The firewall rule to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_firewallrules_put** > FirewallRule datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Firewall Rule Modifies the properties of the specified firewall rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FirewallRulesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. firewallrule_id = 'firewallrule_id_example' # str | The unique ID of the firewall rule. firewallrule = ionoscloud.FirewallRule() # FirewallRule | The modified firewall rule. try: # Modify a Firewall Rule api_response = api_instance.datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule) print(api_response) except ApiException as e: print('Exception when calling FirewallRulesApi.datacenters_servers_nics_firewallrules_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **firewallrule_id** | **str**| The unique ID of the firewall rule. | | | **firewallrule** | [**FirewallRule**](../models/FirewallRule.md)| The modified firewall rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/FlowLogsApi.md000066400000000000000000000433771454002221500200510ustar00rootroot00000000000000# FlowLogsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_servers_nics_flowlogs_delete**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs | | [**datacenters_servers_nics_flowlogs_find_by_id**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs | | [**datacenters_servers_nics_flowlogs_get**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs | | [**datacenters_servers_nics_flowlogs_patch**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs | | [**datacenters_servers_nics_flowlogs_post**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log | | [**datacenters_servers_nics_flowlogs_put**](FlowLogsApi.md#datacenters_servers_nics_flowlogs_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs | # **datacenters_servers_nics_flowlogs_delete** > datacenters_servers_nics_flowlogs_delete(datacenter_id, server_id, nic_id, flowlog_id, pretty=pretty, depth=depth) Delete Flow Logs Delete the specified Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. flowlog_id = 'flowlog_id_example' # str | The unique ID of the Flow Log. try: # Delete Flow Logs api_instance.datacenters_servers_nics_flowlogs_delete(datacenter_id, server_id, nic_id, flowlog_id) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **flowlog_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_flowlogs_find_by_id** > FlowLog datacenters_servers_nics_flowlogs_find_by_id(datacenter_id, server_id, nic_id, flowlog_id, pretty=pretty, depth=depth) Retrieve Flow Logs Retrieve the properties of the specified Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. flowlog_id = 'flowlog_id_example' # str | The unique ID of the Flow Log. try: # Retrieve Flow Logs api_response = api_instance.datacenters_servers_nics_flowlogs_find_by_id(datacenter_id, server_id, nic_id, flowlog_id) print(api_response) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **flowlog_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_flowlogs_get** > FlowLogs datacenters_servers_nics_flowlogs_get(datacenter_id, server_id, nic_id, pretty=pretty, depth=depth, offset=offset, limit=limit) List Flow Logs List all the Flow Logs for the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # List Flow Logs api_response = api_instance.datacenters_servers_nics_flowlogs_get(datacenter_id, server_id, nic_id) print(api_response) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_flowlogs_patch** > FlowLog datacenters_servers_nics_flowlogs_patch(datacenter_id, server_id, nic_id, flowlog_id, flowlog, pretty=pretty, depth=depth) Partially modify Flow Logs Update the specified Flow Log record. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. flowlog_id = 'flowlog_id_example' # str | The unique ID of the Flow Log. flowlog = ionoscloud.FlowLogProperties() # FlowLogProperties | The Flow Log record to be updated. try: # Partially modify Flow Logs api_response = api_instance.datacenters_servers_nics_flowlogs_patch(datacenter_id, server_id, nic_id, flowlog_id, flowlog) print(api_response) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **flowlog_id** | **str**| The unique ID of the Flow Log. | | | **flowlog** | [**FlowLogProperties**](../models/FlowLogProperties.md)| The Flow Log record to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_flowlogs_post** > FlowLog datacenters_servers_nics_flowlogs_post(datacenter_id, server_id, nic_id, flowlog, pretty=pretty, depth=depth) Create a Flow Log Adds a new Flow Log for the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. flowlog = ionoscloud.FlowLog() # FlowLog | The Flow Log to create. try: # Create a Flow Log api_response = api_instance.datacenters_servers_nics_flowlogs_post(datacenter_id, server_id, nic_id, flowlog) print(api_response) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **flowlog** | [**FlowLog**](../models/FlowLog.md)| The Flow Log to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_flowlogs_put** > FlowLog datacenters_servers_nics_flowlogs_put(datacenter_id, server_id, nic_id, flowlog_id, flowlog, pretty=pretty, depth=depth) Modify Flow Logs Modify the specified Flow Log record. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.FlowLogsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. flowlog_id = 'flowlog_id_example' # str | The unique ID of the Flow Log. flowlog = ionoscloud.FlowLogPut() # FlowLogPut | The modified Flow Log. try: # Modify Flow Logs api_response = api_instance.datacenters_servers_nics_flowlogs_put(datacenter_id, server_id, nic_id, flowlog_id, flowlog) print(api_response) except ApiException as e: print('Exception when calling FlowLogsApi.datacenters_servers_nics_flowlogs_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **flowlog_id** | **str**| The unique ID of the Flow Log. | | | **flowlog** | [**FlowLogPut**](../models/FlowLogPut.md)| The modified Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/IPBlocksApi.md000066400000000000000000000356721454002221500177620ustar00rootroot00000000000000# IPBlocksApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**ipblocks_delete**](IPBlocksApi.md#ipblocks_delete) | **DELETE** /ipblocks/{ipblockId} | Delete IP blocks | | [**ipblocks_find_by_id**](IPBlocksApi.md#ipblocks_find_by_id) | **GET** /ipblocks/{ipblockId} | Retrieve IP blocks | | [**ipblocks_get**](IPBlocksApi.md#ipblocks_get) | **GET** /ipblocks | List IP blocks | | [**ipblocks_patch**](IPBlocksApi.md#ipblocks_patch) | **PATCH** /ipblocks/{ipblockId} | Partially modify IP blocks | | [**ipblocks_post**](IPBlocksApi.md#ipblocks_post) | **POST** /ipblocks | Reserve a IP Block | | [**ipblocks_put**](IPBlocksApi.md#ipblocks_put) | **PUT** /ipblocks/{ipblockId} | Modify a IP Block by ID | # **ipblocks_delete** > ipblocks_delete(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete IP blocks Remove the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. try: # Delete IP blocks api_instance.ipblocks_delete(ipblock_id) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_find_by_id** > IpBlock ipblocks_find_by_id(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve IP blocks Retrieve the properties of the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. try: # Retrieve IP blocks api_response = api_instance.ipblocks_find_by_id(ipblock_id) print(api_response) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**IpBlock**](../models/IpBlock.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_get** > IpBlocks ipblocks_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List IP blocks List all reserved IP blocks. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) try: # List IP blocks api_response = api_instance.ipblocks_get() print(api_response) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 100] | ### Return type [**IpBlocks**](../models/IpBlocks.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_patch** > IpBlock ipblocks_patch(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify IP blocks Update the properties of the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. ipblock = ionoscloud.IpBlockProperties() # IpBlockProperties | The properties of the IP block to be updated. try: # Partially modify IP blocks api_response = api_instance.ipblocks_patch(ipblock_id, ipblock) print(api_response) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **ipblock** | [**IpBlockProperties**](../models/IpBlockProperties.md)| The properties of the IP block to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**IpBlock**](../models/IpBlock.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **ipblocks_post** > IpBlock ipblocks_post(ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Reserve a IP Block Reserves a new IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) ipblock = ionoscloud.IpBlock() # IpBlock | The IP block to be reserved. try: # Reserve a IP Block api_response = api_instance.ipblocks_post(ipblock) print(api_response) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock** | [**IpBlock**](../models/IpBlock.md)| The IP block to be reserved. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**IpBlock**](../models/IpBlock.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **ipblocks_put** > IpBlock ipblocks_put(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a IP Block by ID Modifies the properties of the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.IPBlocksApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. ipblock = ionoscloud.IpBlock() # IpBlock | The modified IP block. try: # Modify a IP Block by ID api_response = api_instance.ipblocks_put(ipblock_id, ipblock) print(api_response) except ApiException as e: print('Exception when calling IPBlocksApi.ipblocks_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **ipblock** | [**IpBlock**](../models/IpBlock.md)| The modified IP block. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**IpBlock**](../models/IpBlock.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/ImagesApi.md000066400000000000000000000277331454002221500175200ustar00rootroot00000000000000# ImagesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**images_delete**](ImagesApi.md#images_delete) | **DELETE** /images/{imageId} | Delete images | | [**images_find_by_id**](ImagesApi.md#images_find_by_id) | **GET** /images/{imageId} | Retrieve images | | [**images_get**](ImagesApi.md#images_get) | **GET** /images | List images | | [**images_patch**](ImagesApi.md#images_patch) | **PATCH** /images/{imageId} | Partially modify images | | [**images_put**](ImagesApi.md#images_put) | **PUT** /images/{imageId} | Modify an Image by ID | # **images_delete** > images_delete(image_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete images Delete the specified image; this operation is only supported for private images. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id = 'image_id_example' # str | The unique ID of the image. try: # Delete images api_instance.images_delete(image_id) except ApiException as e: print('Exception when calling ImagesApi.images_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **image_id** | **str**| The unique ID of the image. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **images_find_by_id** > Image images_find_by_id(image_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve images Retrieve the properties of the specified image. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id = 'image_id_example' # str | The unique ID of the image. try: # Retrieve images api_response = api_instance.images_find_by_id(image_id) print(api_response) except ApiException as e: print('Exception when calling ImagesApi.images_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **image_id** | **str**| The unique ID of the image. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Image**](../models/Image.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **images_get** > Images images_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List images List all the images within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) try: # List images api_response = api_instance.images_get() print(api_response) except ApiException as e: print('Exception when calling ImagesApi.images_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Images**](../models/Images.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **images_patch** > Image images_patch(image_id, image, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify images Update the properties of the specified image. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id = 'image_id_example' # str | The unique ID of the image. image = ionoscloud.ImageProperties() # ImageProperties | The image properties to be updated. try: # Partially modify images api_response = api_instance.images_patch(image_id, image) print(api_response) except ApiException as e: print('Exception when calling ImagesApi.images_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **image_id** | **str**| The unique ID of the image. | | | **image** | [**ImageProperties**](../models/ImageProperties.md)| The image properties to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Image**](../models/Image.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **images_put** > Image images_put(image_id, image, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify an Image by ID Modifies the properties of the specified image. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id = 'image_id_example' # str | The unique ID of the image. image = ionoscloud.Image() # Image | The modified image try: # Modify an Image by ID api_response = api_instance.images_put(image_id, image) print(api_response) except ApiException as e: print('Exception when calling ImagesApi.images_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **image_id** | **str**| The unique ID of the image. | | | **image** | [**Image**](../models/Image.md)| The modified image | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Image**](../models/Image.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/KubernetesApi.md000066400000000000000000001264771454002221500204270ustar00rootroot00000000000000# KubernetesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**k8s_delete**](KubernetesApi.md#k8s_delete) | **DELETE** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID | | [**k8s_find_by_cluster_id**](KubernetesApi.md#k8s_find_by_cluster_id) | **GET** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID | | [**k8s_get**](KubernetesApi.md#k8s_get) | **GET** /k8s | Get Kubernetes Clusters | | [**k8s_kubeconfig_get**](KubernetesApi.md#k8s_kubeconfig_get) | **GET** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File | | [**k8s_nodepools_delete**](KubernetesApi.md#k8s_nodepools_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID | | [**k8s_nodepools_find_by_id**](KubernetesApi.md#k8s_nodepools_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID | | [**k8s_nodepools_get**](KubernetesApi.md#k8s_nodepools_get) | **GET** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools | | [**k8s_nodepools_nodes_delete**](KubernetesApi.md#k8s_nodepools_nodes_delete) | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID | | [**k8s_nodepools_nodes_find_by_id**](KubernetesApi.md#k8s_nodepools_nodes_find_by_id) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID | | [**k8s_nodepools_nodes_get**](KubernetesApi.md#k8s_nodepools_nodes_get) | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes | | [**k8s_nodepools_nodes_replace_post**](KubernetesApi.md#k8s_nodepools_nodes_replace_post) | **POST** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID | | [**k8s_nodepools_post**](KubernetesApi.md#k8s_nodepools_post) | **POST** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool | | [**k8s_nodepools_put**](KubernetesApi.md#k8s_nodepools_put) | **PUT** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID | | [**k8s_post**](KubernetesApi.md#k8s_post) | **POST** /k8s | Create a Kubernetes Cluster | | [**k8s_put**](KubernetesApi.md#k8s_put) | **PUT** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID | | [**k8s_versions_default_get**](KubernetesApi.md#k8s_versions_default_get) | **GET** /k8s/versions/default | Get Default Kubernetes Version | | [**k8s_versions_get**](KubernetesApi.md#k8s_versions_get) | **GET** /k8s/versions | Get Kubernetes Versions | # **k8s_delete** > k8s_delete(k8s_cluster_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete a Kubernetes Cluster by ID Deletes the K8s cluster specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. try: # Delete a Kubernetes Cluster by ID api_instance.k8s_delete(k8s_cluster_id) except ApiException as e: print('Exception when calling KubernetesApi.k8s_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_find_by_cluster_id** > KubernetesCluster k8s_find_by_cluster_id(k8s_cluster_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get a Kubernetes Cluster by ID Retrieves the K8s cluster specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the K8s cluster to be retrieved. try: # Get a Kubernetes Cluster by ID api_response = api_instance.k8s_find_by_cluster_id(k8s_cluster_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_find_by_cluster_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the K8s cluster to be retrieved. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_get** > KubernetesClusters k8s_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Kubernetes Clusters Retrieves a list of all K8s clusters provisioned under your account. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) try: # Get Kubernetes Clusters api_response = api_instance.k8s_get() print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesClusters**](../models/KubernetesClusters.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_kubeconfig_get** > str k8s_kubeconfig_get(k8s_cluster_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Kubernetes Configuration File 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. try: # Get Kubernetes Configuration File api_response = api_instance.k8s_kubeconfig_get(k8s_cluster_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_kubeconfig_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type **str** ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/yaml, application/x-yaml, application/json # **k8s_nodepools_delete** > k8s_nodepools_delete(k8s_cluster_id, nodepool_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete a Kubernetes Node Pool by ID Deletes the K8s node pool specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. try: # Delete a Kubernetes Node Pool by ID api_instance.k8s_nodepools_delete(k8s_cluster_id, nodepool_id) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_find_by_id** > KubernetesNodePool k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get a Kubernetes Node Pool by ID Retrieves the K8s node pool specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. try: # Get a Kubernetes Node Pool by ID api_response = api_instance.k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_get** > KubernetesNodePools k8s_nodepools_get(k8s_cluster_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Kubernetes Node Pools Retrieves a list of K8s node pools of a cluster specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. try: # Get Kubernetes Node Pools api_response = api_instance.k8s_nodepools_get(k8s_cluster_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNodePools**](../models/KubernetesNodePools.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_nodes_delete** > k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete a Kubernetes Node by ID Deletes the K8s node specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. node_id = 'node_id_example' # str | The unique ID of the Kubernetes node. try: # Delete a Kubernetes Node by ID api_instance.k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_nodes_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **node_id** | **str**| The unique ID of the Kubernetes node. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_nodes_find_by_id** > KubernetesNode k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Kubernetes Node by ID Retrieves the K8s node specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. node_id = 'node_id_example' # str | The unique ID of the Kubernetes node. try: # Get Kubernetes Node by ID api_response = api_instance.k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_nodes_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **node_id** | **str**| The unique ID of the Kubernetes node. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNode**](../models/KubernetesNode.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_nodes_get** > KubernetesNodes k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Kubernetes Nodes Retrieves the list of all K8s nodes of the specified node pool. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. try: # Get Kubernetes Nodes api_response = api_instance.k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_nodes_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNodes**](../models/KubernetesNodes.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_nodes_replace_post** > k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Recreate a Kubernetes Node by ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. node_id = 'node_id_example' # str | The unique ID of the Kubernetes node. try: # Recreate a Kubernetes Node by ID api_instance.k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_nodes_replace_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **node_id** | **str**| The unique ID of the Kubernetes node. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_nodepools_post** > KubernetesNodePool k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Kubernetes Node Pool Creates a node pool inside the specified K8s cluster. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. kubernetes_node_pool = ionoscloud.KubernetesNodePoolForPost() # KubernetesNodePoolForPost | The Kubernetes node pool to create. try: # Create a Kubernetes Node Pool api_response = api_instance.k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **kubernetes_node_pool** | [**KubernetesNodePoolForPost**](../models/KubernetesNodePoolForPost.md)| The Kubernetes node pool to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **k8s_nodepools_put** > KubernetesNodePool k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Kubernetes Node Pool by ID Modifies the K8s node pool specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. nodepool_id = 'nodepool_id_example' # str | The unique ID of the Kubernetes node pool. kubernetes_node_pool = ionoscloud.KubernetesNodePoolForPut() # KubernetesNodePoolForPut | Details of the Kubernetes Node Pool try: # Modify a Kubernetes Node Pool by ID api_response = api_instance.k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_nodepools_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **nodepool_id** | **str**| The unique ID of the Kubernetes node pool. | | | **kubernetes_node_pool** | [**KubernetesNodePoolForPut**](../models/KubernetesNodePoolForPut.md)| Details of the Kubernetes Node Pool | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **k8s_post** > KubernetesCluster k8s_post(kubernetes_cluster, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Kubernetes Cluster Creates a K8s cluster provisioned under your account. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) kubernetes_cluster = ionoscloud.KubernetesClusterForPost() # KubernetesClusterForPost | The Kubernetes cluster to create. try: # Create a Kubernetes Cluster api_response = api_instance.k8s_post(kubernetes_cluster) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **kubernetes_cluster** | [**KubernetesClusterForPost**](../models/KubernetesClusterForPost.md)| The Kubernetes cluster to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **k8s_put** > KubernetesCluster k8s_put(k8s_cluster_id, kubernetes_cluster, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Kubernetes Cluster by ID Modifies the K8s cluster specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) k8s_cluster_id = 'k8s_cluster_id_example' # str | The unique ID of the Kubernetes cluster. kubernetes_cluster = ionoscloud.KubernetesClusterForPut() # KubernetesClusterForPut | The modified Kubernetes cluster. try: # Modify a Kubernetes Cluster by ID api_response = api_instance.k8s_put(k8s_cluster_id, kubernetes_cluster) print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **k8s_cluster_id** | **str**| The unique ID of the Kubernetes cluster. | | | **kubernetes_cluster** | [**KubernetesClusterForPut**](../models/KubernetesClusterForPut.md)| The modified Kubernetes cluster. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **k8s_versions_default_get** > str k8s_versions_default_get() Get Default Kubernetes Version Retrieves the current default K8s version to be used by the clusters and node pools. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) try: # Get Default Kubernetes Version api_response = api_instance.k8s_versions_default_get() print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_versions_default_get: %s\n' % e) ``` ### Parameters This endpoint does not need any parameter. ### Return type **str** ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **k8s_versions_get** > list[str] k8s_versions_get() Get Kubernetes Versions Lists available K8s versions. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.KubernetesApi(api_client) try: # Get Kubernetes Versions api_response = api_instance.k8s_versions_get() print(api_response) except ApiException as e: print('Exception when calling KubernetesApi.k8s_versions_get: %s\n' % e) ``` ### Parameters This endpoint does not need any parameter. ### Return type **list[str]** ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/LANsApi.md000066400000000000000000000610041454002221500170750ustar00rootroot00000000000000# LANsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_lans_delete**](LANsApi.md#datacenters_lans_delete) | **DELETE** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs | | [**datacenters_lans_find_by_id**](LANsApi.md#datacenters_lans_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs | | [**datacenters_lans_get**](LANsApi.md#datacenters_lans_get) | **GET** /datacenters/{datacenterId}/lans | List LANs | | [**datacenters_lans_nics_find_by_id**](LANsApi.md#datacenters_lans_nics_find_by_id) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs | | [**datacenters_lans_nics_get**](LANsApi.md#datacenters_lans_nics_get) | **GET** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members | | [**datacenters_lans_nics_post**](LANsApi.md#datacenters_lans_nics_post) | **POST** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs | | [**datacenters_lans_patch**](LANsApi.md#datacenters_lans_patch) | **PATCH** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs | | [**datacenters_lans_post**](LANsApi.md#datacenters_lans_post) | **POST** /datacenters/{datacenterId}/lans | Create LANs | | [**datacenters_lans_put**](LANsApi.md#datacenters_lans_put) | **PUT** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs | # **datacenters_lans_delete** > datacenters_lans_delete(datacenter_id, lan_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete LANs Delete the specified LAN within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. try: # Delete LANs api_instance.datacenters_lans_delete(datacenter_id, lan_id) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_lans_find_by_id** > Lan datacenters_lans_find_by_id(datacenter_id, lan_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve LANs Retrieve the properties of the specified LAN within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. try: # Retrieve LANs api_response = api_instance.datacenters_lans_find_by_id(datacenter_id, lan_id) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Lan**](../models/Lan.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_lans_get** > Lans datacenters_lans_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List LANs List all LANs within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List LANs api_response = api_instance.datacenters_lans_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Lans**](../models/Lans.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_lans_nics_find_by_id** > Nic datacenters_lans_nics_find_by_id(datacenter_id, lan_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve attached NICs Retrieve the properties of the NIC, attached to the specified LAN. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # Retrieve attached NICs api_response = api_instance.datacenters_lans_nics_find_by_id(datacenter_id, lan_id, nic_id) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_nics_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_lans_nics_get** > LanNics datacenters_lans_nics_get(datacenter_id, lan_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List LAN members List all NICs, attached to the specified LAN. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. try: # List LAN members api_response = api_instance.datacenters_lans_nics_get(datacenter_id, lan_id) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_nics_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**LanNics**](../models/LanNics.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_lans_nics_post** > Nic datacenters_lans_nics_post(datacenter_id, lan_id, nic, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Attach NICs Attach an existing NIC to the specified LAN. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. nic = ionoscloud.Nic() # Nic | The NIC to be attached. try: # Attach NICs api_response = api_instance.datacenters_lans_nics_post(datacenter_id, lan_id, nic) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_nics_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **nic** | [**Nic**](../models/Nic.md)| The NIC to be attached. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_lans_patch** > Lan datacenters_lans_patch(datacenter_id, lan_id, lan, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify LANs Update the properties of the specified LAN within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. lan = ionoscloud.LanProperties() # LanProperties | The properties of the LAN to be updated. try: # Partially modify LANs api_response = api_instance.datacenters_lans_patch(datacenter_id, lan_id, lan) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **lan** | [**LanProperties**](../models/LanProperties.md)| The properties of the LAN to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Lan**](../models/Lan.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_lans_post** > LanPost datacenters_lans_post(datacenter_id, lan, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create LANs Creates a LAN within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan = ionoscloud.LanPost() # LanPost | The LAN to create. try: # Create LANs api_response = api_instance.datacenters_lans_post(datacenter_id, lan) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan** | [**LanPost**](../models/LanPost.md)| The LAN to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LanPost**](../models/LanPost.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_lans_put** > Lan datacenters_lans_put(datacenter_id, lan_id, lan, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify LANs Modify the properties of the specified LAN within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LANsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. lan_id = 'lan_id_example' # str | The unique ID of the LAN. lan = ionoscloud.Lan() # Lan | The modified LAN try: # Modify LANs api_response = api_instance.datacenters_lans_put(datacenter_id, lan_id, lan) print(api_response) except ApiException as e: print('Exception when calling LANsApi.datacenters_lans_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **lan_id** | **str**| The unique ID of the LAN. | | | **lan** | [**Lan**](../models/Lan.md)| The modified LAN | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Lan**](../models/Lan.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/LabelsApi.md000066400000000000000000002174421454002221500175130ustar00rootroot00000000000000# LabelsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_labels_delete**](LabelsApi.md#datacenters_labels_delete) | **DELETE** /datacenters/{datacenterId}/labels/{key} | Delete data center labels | | [**datacenters_labels_find_by_key**](LabelsApi.md#datacenters_labels_find_by_key) | **GET** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels | | [**datacenters_labels_get**](LabelsApi.md#datacenters_labels_get) | **GET** /datacenters/{datacenterId}/labels | List data center labels | | [**datacenters_labels_post**](LabelsApi.md#datacenters_labels_post) | **POST** /datacenters/{datacenterId}/labels | Create a Data Center Label | | [**datacenters_labels_put**](LabelsApi.md#datacenters_labels_put) | **PUT** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key | | [**datacenters_servers_labels_delete**](LabelsApi.md#datacenters_servers_labels_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels | | [**datacenters_servers_labels_find_by_key**](LabelsApi.md#datacenters_servers_labels_find_by_key) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels | | [**datacenters_servers_labels_get**](LabelsApi.md#datacenters_servers_labels_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels | | [**datacenters_servers_labels_post**](LabelsApi.md#datacenters_servers_labels_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label | | [**datacenters_servers_labels_put**](LabelsApi.md#datacenters_servers_labels_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label | | [**datacenters_volumes_labels_delete**](LabelsApi.md#datacenters_volumes_labels_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels | | [**datacenters_volumes_labels_find_by_key**](LabelsApi.md#datacenters_volumes_labels_find_by_key) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels | | [**datacenters_volumes_labels_get**](LabelsApi.md#datacenters_volumes_labels_get) | **GET** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels | | [**datacenters_volumes_labels_post**](LabelsApi.md#datacenters_volumes_labels_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label | | [**datacenters_volumes_labels_put**](LabelsApi.md#datacenters_volumes_labels_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label | | [**ipblocks_labels_delete**](LabelsApi.md#ipblocks_labels_delete) | **DELETE** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels | | [**ipblocks_labels_find_by_key**](LabelsApi.md#ipblocks_labels_find_by_key) | **GET** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels | | [**ipblocks_labels_get**](LabelsApi.md#ipblocks_labels_get) | **GET** /ipblocks/{ipblockId}/labels | List IP block labels | | [**ipblocks_labels_post**](LabelsApi.md#ipblocks_labels_post) | **POST** /ipblocks/{ipblockId}/labels | Create IP block labels | | [**ipblocks_labels_put**](LabelsApi.md#ipblocks_labels_put) | **PUT** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID | | [**labels_find_by_urn**](LabelsApi.md#labels_find_by_urn) | **GET** /labels/{labelurn} | Retrieve labels by URN | | [**labels_get**](LabelsApi.md#labels_get) | **GET** /labels | List labels | | [**snapshots_labels_delete**](LabelsApi.md#snapshots_labels_delete) | **DELETE** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels | | [**snapshots_labels_find_by_key**](LabelsApi.md#snapshots_labels_find_by_key) | **GET** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels | | [**snapshots_labels_get**](LabelsApi.md#snapshots_labels_get) | **GET** /snapshots/{snapshotId}/labels | List snapshot labels | | [**snapshots_labels_post**](LabelsApi.md#snapshots_labels_post) | **POST** /snapshots/{snapshotId}/labels | Create a Snapshot Label | | [**snapshots_labels_put**](LabelsApi.md#snapshots_labels_put) | **PUT** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID | # **datacenters_labels_delete** > datacenters_labels_delete(datacenter_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete data center labels Delete the specified data center label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. key = 'key_example' # str | The label key try: # Delete data center labels api_instance.datacenters_labels_delete(datacenter_id, key) except ApiException as e: print('Exception when calling LabelsApi.datacenters_labels_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_labels_find_by_key** > LabelResource datacenters_labels_find_by_key(datacenter_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve data center labels Retrieve the properties of the specified data center label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. key = 'key_example' # str | The label key try: # Retrieve data center labels api_response = api_instance.datacenters_labels_find_by_key(datacenter_id, key) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_labels_find_by_key: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_labels_get** > LabelResources datacenters_labels_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List data center labels List all the the labels for the specified data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List data center labels api_response = api_instance.datacenters_labels_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResources**](../models/LabelResources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_labels_post** > LabelResource datacenters_labels_post(datacenter_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Data Center Label Adds a new label to the specified data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. label = ionoscloud.LabelResource() # LabelResource | The label to create. try: # Create a Data Center Label api_response = api_instance.datacenters_labels_post(datacenter_id, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_labels_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **label** | [**LabelResource**](../models/LabelResource.md)| The label to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_labels_put** > LabelResource datacenters_labels_put(datacenter_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Data Center Label by Key Modifies the specified data center label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. key = 'key_example' # str | The label key label = ionoscloud.LabelResource() # LabelResource | The modified label try: # Modify a Data Center Label by Key api_response = api_instance.datacenters_labels_put(datacenter_id, key, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_labels_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **key** | **str**| The label key | | | **label** | [**LabelResource**](../models/LabelResource.md)| The modified label | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_labels_delete** > datacenters_servers_labels_delete(datacenter_id, server_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete server labels Delete the specified server label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. key = 'key_example' # str | The label key try: # Delete server labels api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key) except ApiException as e: print('Exception when calling LabelsApi.datacenters_servers_labels_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_labels_find_by_key** > LabelResource datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve server labels Retrieve the properties of the specified server label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. key = 'key_example' # str | The label key try: # Retrieve server labels api_response = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_servers_labels_find_by_key: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_labels_get** > LabelResources datacenters_servers_labels_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List server labels List all the the labels for the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # List server labels api_response = api_instance.datacenters_servers_labels_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_servers_labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResources**](../models/LabelResources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_labels_post** > LabelResource datacenters_servers_labels_post(datacenter_id, server_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Server Label Adds a new label to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. label = ionoscloud.LabelResource() # LabelResource | The label to create. try: # Create a Server Label api_response = api_instance.datacenters_servers_labels_post(datacenter_id, server_id, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_servers_labels_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **label** | [**LabelResource**](../models/LabelResource.md)| The label to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_labels_put** > LabelResource datacenters_servers_labels_put(datacenter_id, server_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Server Label Modifies the specified server label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. key = 'key_example' # str | The label key label = ionoscloud.LabelResource() # LabelResource | The modified label try: # Modify a Server Label api_response = api_instance.datacenters_servers_labels_put(datacenter_id, server_id, key, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_servers_labels_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **key** | **str**| The label key | | | **label** | [**LabelResource**](../models/LabelResource.md)| The modified label | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_volumes_labels_delete** > datacenters_volumes_labels_delete(datacenter_id, volume_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete volume labels Delete the specified volume label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. key = 'key_example' # str | The label key try: # Delete volume labels api_instance.datacenters_volumes_labels_delete(datacenter_id, volume_id, key) except ApiException as e: print('Exception when calling LabelsApi.datacenters_volumes_labels_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_labels_find_by_key** > LabelResource datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve volume labels Retrieve the properties of the specified volume label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. key = 'key_example' # str | The label key try: # Retrieve volume labels api_response = api_instance.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_volumes_labels_find_by_key: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_labels_get** > LabelResources datacenters_volumes_labels_get(datacenter_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List volume labels List all the the labels for the specified volume. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # List volume labels api_response = api_instance.datacenters_volumes_labels_get(datacenter_id, volume_id) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_volumes_labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResources**](../models/LabelResources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_labels_post** > LabelResource datacenters_volumes_labels_post(datacenter_id, volume_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Volume Label Adds a new label to the specified volume. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. label = ionoscloud.LabelResource() # LabelResource | The label to create. try: # Create a Volume Label api_response = api_instance.datacenters_volumes_labels_post(datacenter_id, volume_id, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_volumes_labels_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **label** | [**LabelResource**](../models/LabelResource.md)| The label to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_volumes_labels_put** > LabelResource datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Volume Label Modifies the specified volume label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. key = 'key_example' # str | The label key label = ionoscloud.LabelResource() # LabelResource | The modified label try: # Modify a Volume Label api_response = api_instance.datacenters_volumes_labels_put(datacenter_id, volume_id, key, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.datacenters_volumes_labels_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **key** | **str**| The label key | | | **label** | [**LabelResource**](../models/LabelResource.md)| The modified label | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **ipblocks_labels_delete** > ipblocks_labels_delete(ipblock_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete IP block labels Delete the specified IP block label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. key = 'key_example' # str | The label key try: # Delete IP block labels api_instance.ipblocks_labels_delete(ipblock_id, key) except ApiException as e: print('Exception when calling LabelsApi.ipblocks_labels_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_labels_find_by_key** > LabelResource ipblocks_labels_find_by_key(ipblock_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve IP block labels Retrieve the properties of the specified IP block label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. key = 'key_example' # str | The label key try: # Retrieve IP block labels api_response = api_instance.ipblocks_labels_find_by_key(ipblock_id, key) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.ipblocks_labels_find_by_key: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_labels_get** > LabelResources ipblocks_labels_get(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List IP block labels List all the the labels for the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. try: # List IP block labels api_response = api_instance.ipblocks_labels_get(ipblock_id) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.ipblocks_labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResources**](../models/LabelResources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **ipblocks_labels_post** > LabelResource ipblocks_labels_post(ipblock_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create IP block labels Add a new label to the specified IP block. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. label = ionoscloud.LabelResource() # LabelResource | The label to create. try: # Create IP block labels api_response = api_instance.ipblocks_labels_post(ipblock_id, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.ipblocks_labels_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **label** | [**LabelResource**](../models/LabelResource.md)| The label to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **ipblocks_labels_put** > LabelResource ipblocks_labels_put(ipblock_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a IP Block Label by ID Modifies the specified IP block label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) ipblock_id = 'ipblock_id_example' # str | The unique ID of the IP block. key = 'key_example' # str | The label key label = ionoscloud.LabelResource() # LabelResource | The modified label try: # Modify a IP Block Label by ID api_response = api_instance.ipblocks_labels_put(ipblock_id, key, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.ipblocks_labels_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **ipblock_id** | **str**| The unique ID of the IP block. | | | **key** | **str**| The label key | | | **label** | [**LabelResource**](../models/LabelResource.md)| The modified label | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **labels_find_by_urn** > Label labels_find_by_urn(labelurn, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve labels by URN Retrieve a label by label URN. The URN is unique for each label, and consists of: urn:label::: ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) labelurn = 'labelurn_example' # str | The label URN; URN is unique for each label, and consists of: urn:label::: try: # Retrieve labels by URN api_response = api_instance.labels_find_by_urn(labelurn) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.labels_find_by_urn: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **labelurn** | **str**| The label URN; URN is unique for each label, and consists of: urn:label:<resource_type>:<resource_uuid>:<key><key> | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Label**](../models/Label.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **labels_get** > Labels labels_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List labels List all available labels. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) try: # List labels api_response = api_instance.labels_get() print(api_response) except ApiException as e: print('Exception when calling LabelsApi.labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Labels**](../models/Labels.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_labels_delete** > snapshots_labels_delete(snapshot_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete snapshot labels Delete the specified snapshot label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. key = 'key_example' # str | The label key try: # Delete snapshot labels api_instance.snapshots_labels_delete(snapshot_id, key) except ApiException as e: print('Exception when calling LabelsApi.snapshots_labels_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_labels_find_by_key** > LabelResource snapshots_labels_find_by_key(snapshot_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve snapshot labels Retrieve the properties of the specified snapshot label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. key = 'key_example' # str | The label key try: # Retrieve snapshot labels api_response = api_instance.snapshots_labels_find_by_key(snapshot_id, key) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.snapshots_labels_find_by_key: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **key** | **str**| The label key | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_labels_get** > LabelResources snapshots_labels_get(snapshot_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List snapshot labels List all the the labels for the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. try: # List snapshot labels api_response = api_instance.snapshots_labels_get(snapshot_id) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.snapshots_labels_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResources**](../models/LabelResources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_labels_post** > LabelResource snapshots_labels_post(snapshot_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Snapshot Label Adds a new label to the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. label = ionoscloud.LabelResource() # LabelResource | The label to create. try: # Create a Snapshot Label api_response = api_instance.snapshots_labels_post(snapshot_id, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.snapshots_labels_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **label** | [**LabelResource**](../models/LabelResource.md)| The label to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **snapshots_labels_put** > LabelResource snapshots_labels_put(snapshot_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Snapshot Label by ID Modifies the specified snapshot label. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LabelsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. key = 'key_example' # str | The label key label = ionoscloud.LabelResource() # LabelResource | The modified label try: # Modify a Snapshot Label by ID api_response = api_instance.snapshots_labels_put(snapshot_id, key, label) print(api_response) except ApiException as e: print('Exception when calling LabelsApi.snapshots_labels_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **key** | **str**| The label key | | | **label** | [**LabelResource**](../models/LabelResource.md)| The modified label | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**LabelResource**](../models/LabelResource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/LoadBalancersApi.md000066400000000000000000000724001454002221500207740ustar00rootroot00000000000000# LoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_loadbalancers_balancednics_delete**](LoadBalancersApi.md#datacenters_loadbalancers_balancednics_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs | | [**datacenters_loadbalancers_balancednics_find_by_nic_id**](LoadBalancersApi.md#datacenters_loadbalancers_balancednics_find_by_nic_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs | | [**datacenters_loadbalancers_balancednics_get**](LoadBalancersApi.md#datacenters_loadbalancers_balancednics_get) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs | | [**datacenters_loadbalancers_balancednics_post**](LoadBalancersApi.md#datacenters_loadbalancers_balancednics_post) | **POST** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs | | [**datacenters_loadbalancers_delete**](LoadBalancersApi.md#datacenters_loadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers | | [**datacenters_loadbalancers_find_by_id**](LoadBalancersApi.md#datacenters_loadbalancers_find_by_id) | **GET** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers | | [**datacenters_loadbalancers_get**](LoadBalancersApi.md#datacenters_loadbalancers_get) | **GET** /datacenters/{datacenterId}/loadbalancers | List Load Balancers | | [**datacenters_loadbalancers_patch**](LoadBalancersApi.md#datacenters_loadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers | | [**datacenters_loadbalancers_post**](LoadBalancersApi.md#datacenters_loadbalancers_post) | **POST** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer | | [**datacenters_loadbalancers_put**](LoadBalancersApi.md#datacenters_loadbalancers_put) | **PUT** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID | # **datacenters_loadbalancers_balancednics_delete** > datacenters_loadbalancers_balancednics_delete(datacenter_id, loadbalancer_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Detach balanced NICs Detach the specified NIC from the Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # Detach balanced NICs api_instance.datacenters_loadbalancers_balancednics_delete(datacenter_id, loadbalancer_id, nic_id) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_balancednics_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_balancednics_find_by_nic_id** > Nic datacenters_loadbalancers_balancednics_find_by_nic_id(datacenter_id, loadbalancer_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve balanced NICs Retrieve the properties of the specified NIC, attached to the Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # Retrieve balanced NICs api_response = api_instance.datacenters_loadbalancers_balancednics_find_by_nic_id(datacenter_id, loadbalancer_id, nic_id) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_balancednics_find_by_nic_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_balancednics_get** > BalancedNics datacenters_loadbalancers_balancednics_get(datacenter_id, loadbalancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List balanced NICs List all NICs, attached to the specified Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. try: # List balanced NICs api_response = api_instance.datacenters_loadbalancers_balancednics_get(datacenter_id, loadbalancer_id) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_balancednics_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**BalancedNics**](../models/BalancedNics.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_balancednics_post** > Nic datacenters_loadbalancers_balancednics_post(datacenter_id, loadbalancer_id, nic, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Attach balanced NICs Attachs an existing NIC to the specified Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. nic = ionoscloud.Nic() # Nic | The NIC to be attached. try: # Attach balanced NICs api_response = api_instance.datacenters_loadbalancers_balancednics_post(datacenter_id, loadbalancer_id, nic) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_balancednics_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **nic** | [**Nic**](../models/Nic.md)| The NIC to be attached. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_loadbalancers_delete** > datacenters_loadbalancers_delete(datacenter_id, loadbalancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete Load Balancers Remove the specified Load Balancer from the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. try: # Delete Load Balancers api_instance.datacenters_loadbalancers_delete(datacenter_id, loadbalancer_id) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_find_by_id** > Loadbalancer datacenters_loadbalancers_find_by_id(datacenter_id, loadbalancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve Load Balancers Retrieve the properties of the specified Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. try: # Retrieve Load Balancers api_response = api_instance.datacenters_loadbalancers_find_by_id(datacenter_id, loadbalancer_id) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_get** > Loadbalancers datacenters_loadbalancers_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List Load Balancers List all the Load Balancers within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List Load Balancers api_response = api_instance.datacenters_loadbalancers_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Loadbalancers**](../models/Loadbalancers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_loadbalancers_patch** > Loadbalancer datacenters_loadbalancers_patch(datacenter_id, loadbalancer_id, loadbalancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify Load Balancers Update the properties of the specified Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. loadbalancer = ionoscloud.LoadbalancerProperties() # LoadbalancerProperties | The properties of the Load Balancer to be updated. try: # Partially modify Load Balancers api_response = api_instance.datacenters_loadbalancers_patch(datacenter_id, loadbalancer_id, loadbalancer) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **loadbalancer** | [**LoadbalancerProperties**](../models/LoadbalancerProperties.md)| The properties of the Load Balancer to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_loadbalancers_post** > Loadbalancer datacenters_loadbalancers_post(datacenter_id, loadbalancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Load Balancer Creates a Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer = ionoscloud.Loadbalancer() # Loadbalancer | The Load Balancer to create. try: # Create a Load Balancer api_response = api_instance.datacenters_loadbalancers_post(datacenter_id, loadbalancer) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer** | [**Loadbalancer**](../models/Loadbalancer.md)| The Load Balancer to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_loadbalancers_put** > Loadbalancer datacenters_loadbalancers_put(datacenter_id, loadbalancer_id, loadbalancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Load Balancer by ID Modifies the properties of the specified Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. loadbalancer_id = 'loadbalancer_id_example' # str | The unique ID of the Load Balancer. loadbalancer = ionoscloud.Loadbalancer() # Loadbalancer | The modified Load Balancer. try: # Modify a Load Balancer by ID api_response = api_instance.datacenters_loadbalancers_put(datacenter_id, loadbalancer_id, loadbalancer) print(api_response) except ApiException as e: print('Exception when calling LoadBalancersApi.datacenters_loadbalancers_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **loadbalancer_id** | **str**| The unique ID of the Load Balancer. | | | **loadbalancer** | [**Loadbalancer**](../models/Loadbalancer.md)| The modified Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/LocationsApi.md000066400000000000000000000201601454002221500202310ustar00rootroot00000000000000# LocationsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**locations_find_by_region_id**](LocationsApi.md#locations_find_by_region_id) | **GET** /locations/{regionId} | Get Locations within a Region | | [**locations_find_by_region_id_and_id**](LocationsApi.md#locations_find_by_region_id_and_id) | **GET** /locations/{regionId}/{locationId} | Get Location by ID | | [**locations_get**](LocationsApi.md#locations_get) | **GET** /locations | Get Locations | # **locations_find_by_region_id** > Locations locations_find_by_region_id(region_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Locations within a Region 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'. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LocationsApi(api_client) region_id = 'region_id_example' # str | The unique ID of the region. try: # Get Locations within a Region api_response = api_instance.locations_find_by_region_id(region_id) print(api_response) except ApiException as e: print('Exception when calling LocationsApi.locations_find_by_region_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **region_id** | **str**| The unique ID of the region. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Locations**](../models/Locations.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **locations_find_by_region_id_and_id** > Location locations_find_by_region_id_and_id(region_id, location_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Location by ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LocationsApi(api_client) region_id = 'region_id_example' # str | The unique ID of the region. location_id = 'location_id_example' # str | The unique ID of the location. try: # Get Location by ID api_response = api_instance.locations_find_by_region_id_and_id(region_id, location_id) print(api_response) except ApiException as e: print('Exception when calling LocationsApi.locations_find_by_region_id_and_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **region_id** | **str**| The unique ID of the region. | | | **location_id** | **str**| The unique ID of the location. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Location**](../models/Location.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **locations_get** > Locations locations_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Locations 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.LocationsApi(api_client) try: # Get Locations api_response = api_instance.locations_get() print(api_response) except ApiException as e: print('Exception when calling LocationsApi.locations_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Locations**](../models/Locations.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/NATGatewaysApi.md000066400000000000000000001523351454002221500204370ustar00rootroot00000000000000# NATGatewaysApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_natgateways_delete**](NATGatewaysApi.md#datacenters_natgateways_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways | | [**datacenters_natgateways_find_by_nat_gateway_id**](NATGatewaysApi.md#datacenters_natgateways_find_by_nat_gateway_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways | | [**datacenters_natgateways_flowlogs_delete**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs | | [**datacenters_natgateways_flowlogs_find_by_flow_log_id**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs | | [**datacenters_natgateways_flowlogs_get**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs | | [**datacenters_natgateways_flowlogs_patch**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs | | [**datacenters_natgateways_flowlogs_post**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log | | [**datacenters_natgateways_flowlogs_put**](NATGatewaysApi.md#datacenters_natgateways_flowlogs_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs | | [**datacenters_natgateways_get**](NATGatewaysApi.md#datacenters_natgateways_get) | **GET** /datacenters/{datacenterId}/natgateways | List NAT Gateways | | [**datacenters_natgateways_patch**](NATGatewaysApi.md#datacenters_natgateways_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways | | [**datacenters_natgateways_post**](NATGatewaysApi.md#datacenters_natgateways_post) | **POST** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway | | [**datacenters_natgateways_put**](NATGatewaysApi.md#datacenters_natgateways_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways | | [**datacenters_natgateways_rules_delete**](NATGatewaysApi.md#datacenters_natgateways_rules_delete) | **DELETE** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules | | [**datacenters_natgateways_rules_find_by_nat_gateway_rule_id**](NATGatewaysApi.md#datacenters_natgateways_rules_find_by_nat_gateway_rule_id) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules | | [**datacenters_natgateways_rules_get**](NATGatewaysApi.md#datacenters_natgateways_rules_get) | **GET** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules | | [**datacenters_natgateways_rules_patch**](NATGatewaysApi.md#datacenters_natgateways_rules_patch) | **PATCH** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID | | [**datacenters_natgateways_rules_post**](NATGatewaysApi.md#datacenters_natgateways_rules_post) | **POST** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule | | [**datacenters_natgateways_rules_put**](NATGatewaysApi.md#datacenters_natgateways_rules_put) | **PUT** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID | # **datacenters_natgateways_delete** > datacenters_natgateways_delete(datacenter_id, nat_gateway_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete NAT Gateways Remove the specified NAT Gateway from the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. try: # Delete NAT Gateways api_instance.datacenters_natgateways_delete(datacenter_id, nat_gateway_id) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_find_by_nat_gateway_id** > NatGateway datacenters_natgateways_find_by_nat_gateway_id(datacenter_id, nat_gateway_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve NAT Gateways Retrieve the properties of the specified NAT Gateway within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. try: # Retrieve NAT Gateways api_response = api_instance.datacenters_natgateways_find_by_nat_gateway_id(datacenter_id, nat_gateway_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_find_by_nat_gateway_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGateway**](../models/NatGateway.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_flowlogs_delete** > datacenters_natgateways_flowlogs_delete(datacenter_id, nat_gateway_id, flow_log_id, pretty=pretty, depth=depth) Delete NAT Gateway Flow Logs Delete the specified NAT Gateway Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. try: # Delete NAT Gateway Flow Logs api_instance.datacenters_natgateways_flowlogs_delete(datacenter_id, nat_gateway_id, flow_log_id) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_flowlogs_find_by_flow_log_id** > FlowLog datacenters_natgateways_flowlogs_find_by_flow_log_id(datacenter_id, nat_gateway_id, flow_log_id, pretty=pretty, depth=depth) Retrieve NAT Gateway Flow Logs Retrieve the specified NAT Gateway Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. try: # Retrieve NAT Gateway Flow Logs api_response = api_instance.datacenters_natgateways_flowlogs_find_by_flow_log_id(datacenter_id, nat_gateway_id, flow_log_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_find_by_flow_log_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_flowlogs_get** > FlowLogs datacenters_natgateways_flowlogs_get(datacenter_id, nat_gateway_id, pretty=pretty, depth=depth, offset=offset, limit=limit) List NAT Gateway Flow Logs List all the Flow Logs for the specified NAT Gateway. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. try: # List NAT Gateway Flow Logs api_response = api_instance.datacenters_natgateways_flowlogs_get(datacenter_id, nat_gateway_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_flowlogs_patch** > FlowLog datacenters_natgateways_flowlogs_patch(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties, pretty=pretty, depth=depth) Partially modify NAT Gateway Flow Logs Update the properties of the specified NAT Gateway Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. nat_gateway_flow_log_properties = ionoscloud.FlowLogProperties() # FlowLogProperties | The properties of the Flow Log to be updated. try: # Partially modify NAT Gateway Flow Logs api_response = api_instance.datacenters_natgateways_flowlogs_patch(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log_properties) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **nat_gateway_flow_log_properties** | [**FlowLogProperties**](../models/FlowLogProperties.md)| The properties of the Flow Log to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_flowlogs_post** > FlowLog datacenters_natgateways_flowlogs_post(datacenter_id, nat_gateway_id, nat_gateway_flow_log, pretty=pretty, depth=depth) Create a NAT Gateway Flow Log Adds a new Flow Log to the specified NAT Gateway. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_flow_log = ionoscloud.FlowLog() # FlowLog | The Flow Log to create. try: # Create a NAT Gateway Flow Log api_response = api_instance.datacenters_natgateways_flowlogs_post(datacenter_id, nat_gateway_id, nat_gateway_flow_log) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_flow_log** | [**FlowLog**](../models/FlowLog.md)| The Flow Log to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_natgateways_flowlogs_put** > FlowLog datacenters_natgateways_flowlogs_put(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log, pretty=pretty, depth=depth) Modify NAT Gateway Flow Logs Modify the specified NAT Gateway Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. nat_gateway_flow_log = ionoscloud.FlowLogPut() # FlowLogPut | The modified NAT Gateway Flow Log. try: # Modify NAT Gateway Flow Logs api_response = api_instance.datacenters_natgateways_flowlogs_put(datacenter_id, nat_gateway_id, flow_log_id, nat_gateway_flow_log) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_flowlogs_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **nat_gateway_flow_log** | [**FlowLogPut**](../models/FlowLogPut.md)| The modified NAT Gateway Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_natgateways_get** > NatGateways datacenters_natgateways_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List NAT Gateways List all NAT Gateways within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List NAT Gateways api_response = api_instance.datacenters_natgateways_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGateways**](../models/NatGateways.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_patch** > NatGateway datacenters_natgateways_patch(datacenter_id, nat_gateway_id, nat_gateway_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify NAT Gateways Update the properties of the specified NAT Gateway within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_properties = ionoscloud.NatGatewayProperties() # NatGatewayProperties | The properties of the NAT Gateway to be updated. try: # Partially modify NAT Gateways api_response = api_instance.datacenters_natgateways_patch(datacenter_id, nat_gateway_id, nat_gateway_properties) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_properties** | [**NatGatewayProperties**](../models/NatGatewayProperties.md)| The properties of the NAT Gateway to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGateway**](../models/NatGateway.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_post** > NatGateway datacenters_natgateways_post(datacenter_id, nat_gateway, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a NAT Gateway Creates a NAT Gateway within the data center. This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway = ionoscloud.NatGateway() # NatGateway | The NAT Gateway to create. try: # Create a NAT Gateway api_response = api_instance.datacenters_natgateways_post(datacenter_id, nat_gateway) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway** | [**NatGateway**](../models/NatGateway.md)| The NAT Gateway to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGateway**](../models/NatGateway.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_natgateways_put** > NatGateway datacenters_natgateways_put(datacenter_id, nat_gateway_id, nat_gateway, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify NAT Gateways Modify the properties of the specified NAT Gateway within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway = ionoscloud.NatGatewayPut() # NatGatewayPut | The modified NAT Gateway. try: # Modify NAT Gateways api_response = api_instance.datacenters_natgateways_put(datacenter_id, nat_gateway_id, nat_gateway) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway** | [**NatGatewayPut**](../models/NatGatewayPut.md)| The modified NAT Gateway. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGateway**](../models/NatGateway.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_natgateways_rules_delete** > datacenters_natgateways_rules_delete(datacenter_id, nat_gateway_id, nat_gateway_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete NAT Gateway rules Delete the specified NAT Gateway rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_rule_id = 'nat_gateway_rule_id_example' # str | The unique ID of the NAT Gateway rule. try: # Delete NAT Gateway rules api_instance.datacenters_natgateways_rules_delete(datacenter_id, nat_gateway_id, nat_gateway_rule_id) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_rule_id** | **str**| The unique ID of the NAT Gateway rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_rules_find_by_nat_gateway_rule_id** > NatGatewayRule datacenters_natgateways_rules_find_by_nat_gateway_rule_id(datacenter_id, nat_gateway_id, nat_gateway_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve NAT Gateway rules Retrieve the properties of the specified NAT Gateway rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_rule_id = 'nat_gateway_rule_id_example' # str | The unique ID of the NAT Gateway rule. try: # Retrieve NAT Gateway rules api_response = api_instance.datacenters_natgateways_rules_find_by_nat_gateway_rule_id(datacenter_id, nat_gateway_id, nat_gateway_rule_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_find_by_nat_gateway_rule_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_rule_id** | **str**| The unique ID of the NAT Gateway rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_rules_get** > NatGatewayRules datacenters_natgateways_rules_get(datacenter_id, nat_gateway_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List NAT Gateway rules List all rules for the specified NAT Gateway. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. try: # List NAT Gateway rules api_response = api_instance.datacenters_natgateways_rules_get(datacenter_id, nat_gateway_id) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGatewayRules**](../models/NatGatewayRules.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_rules_patch** > NatGatewayRule datacenters_natgateways_rules_patch(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially Modify a NAT Gateway Rule by ID Updates the properties of the specified NAT Gateway rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_rule_id = 'nat_gateway_rule_id_example' # str | The unique ID of the NAT Gateway rule. nat_gateway_rule_properties = ionoscloud.NatGatewayRuleProperties() # NatGatewayRuleProperties | The properties of the NAT Gateway rule to be updated. try: # Partially Modify a NAT Gateway Rule by ID api_response = api_instance.datacenters_natgateways_rules_patch(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule_properties) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_rule_id** | **str**| The unique ID of the NAT Gateway rule. | | | **nat_gateway_rule_properties** | [**NatGatewayRuleProperties**](../models/NatGatewayRuleProperties.md)| The properties of the NAT Gateway rule to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_natgateways_rules_post** > NatGatewayRule datacenters_natgateways_rules_post(datacenter_id, nat_gateway_id, nat_gateway_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a NAT Gateway Rule Creates a rule for the specified NAT Gateway. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_rule = ionoscloud.NatGatewayRule() # NatGatewayRule | The NAT Gateway rule to create. try: # Create a NAT Gateway Rule api_response = api_instance.datacenters_natgateways_rules_post(datacenter_id, nat_gateway_id, nat_gateway_rule) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_rule** | [**NatGatewayRule**](../models/NatGatewayRule.md)| The NAT Gateway rule to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_natgateways_rules_put** > NatGatewayRule datacenters_natgateways_rules_put(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a NAT Gateway Rule by ID Modify the specified NAT Gateway rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NATGatewaysApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. nat_gateway_id = 'nat_gateway_id_example' # str | The unique ID of the NAT Gateway. nat_gateway_rule_id = 'nat_gateway_rule_id_example' # str | The unique ID of the NAT Gateway rule. nat_gateway_rule = ionoscloud.NatGatewayRulePut() # NatGatewayRulePut | The modified NAT Gateway rule. try: # Modify a NAT Gateway Rule by ID api_response = api_instance.datacenters_natgateways_rules_put(datacenter_id, nat_gateway_id, nat_gateway_rule_id, nat_gateway_rule) print(api_response) except ApiException as e: print('Exception when calling NATGatewaysApi.datacenters_natgateways_rules_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **nat_gateway_id** | **str**| The unique ID of the NAT Gateway. | | | **nat_gateway_rule_id** | **str**| The unique ID of the NAT Gateway rule. | | | **nat_gateway_rule** | [**NatGatewayRulePut**](../models/NatGatewayRulePut.md)| The modified NAT Gateway rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/NetworkInterfacesApi.md000066400000000000000000000431031454002221500217350ustar00rootroot00000000000000# NetworkInterfacesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_servers_nics_delete**](NetworkInterfacesApi.md#datacenters_servers_nics_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs | | [**datacenters_servers_nics_find_by_id**](NetworkInterfacesApi.md#datacenters_servers_nics_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs | | [**datacenters_servers_nics_get**](NetworkInterfacesApi.md#datacenters_servers_nics_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs | | [**datacenters_servers_nics_patch**](NetworkInterfacesApi.md#datacenters_servers_nics_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs | | [**datacenters_servers_nics_post**](NetworkInterfacesApi.md#datacenters_servers_nics_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC | | [**datacenters_servers_nics_put**](NetworkInterfacesApi.md#datacenters_servers_nics_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs | # **datacenters_servers_nics_delete** > datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete NICs Remove the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # Delete NICs api_instance.datacenters_servers_nics_delete(datacenter_id, server_id, nic_id) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_find_by_id** > Nic datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve NICs Retrieve the properties of the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. try: # Retrieve NICs api_response = api_instance.datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id) print(api_response) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_get** > Nics datacenters_servers_nics_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List NICs List all NICs, attached to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # List NICs api_response = api_instance.datacenters_servers_nics_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Nics**](../models/Nics.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_nics_patch** > Nic datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify NICs Update the properties of the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. nic = ionoscloud.NicProperties() # NicProperties | The properties of the NIC to be updated. try: # Partially modify NICs api_response = api_instance.datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic) print(api_response) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **nic** | [**NicProperties**](../models/NicProperties.md)| The properties of the NIC to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_post** > Nic datacenters_servers_nics_post(datacenter_id, server_id, nic, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a NIC Adds a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic = ionoscloud.Nic() # Nic | The NIC to create. try: # Create a NIC api_response = api_instance.datacenters_servers_nics_post(datacenter_id, server_id, nic) print(api_response) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic** | [**Nic**](../models/Nic.md)| The NIC to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_nics_put** > Nic datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify NICs Modify the properties of the specified NIC. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkInterfacesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. nic_id = 'nic_id_example' # str | The unique ID of the NIC. nic = ionoscloud.NicPut() # NicPut | The modified NIC try: # Modify NICs api_response = api_instance.datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic) print(api_response) except ApiException as e: print('Exception when calling NetworkInterfacesApi.datacenters_servers_nics_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **nic_id** | **str**| The unique ID of the NIC. | | | **nic** | [**NicPut**](../models/NicPut.md)| The modified NIC | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Nic**](../models/Nic.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/NetworkLoadBalancersApi.md000066400000000000000000001661031454002221500223520ustar00rootroot00000000000000# NetworkLoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_networkloadbalancers_delete**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers | | [**datacenters_networkloadbalancers_find_by_network_load_balancer_id**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_find_by_network_load_balancer_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers | | [**datacenters_networkloadbalancers_flowlogs_delete**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs | | [**datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs | | [**datacenters_networkloadbalancers_flowlogs_get**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs | | [**datacenters_networkloadbalancers_flowlogs_patch**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs | | [**datacenters_networkloadbalancers_flowlogs_post**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log | | [**datacenters_networkloadbalancers_flowlogs_put**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_flowlogs_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs | | [**datacenters_networkloadbalancers_forwardingrules_delete**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_delete) | **DELETE** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules | | [**datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules | | [**datacenters_networkloadbalancers_forwardingrules_get**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules | | [**datacenters_networkloadbalancers_forwardingrules_patch**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules | | [**datacenters_networkloadbalancers_forwardingrules_post**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule | | [**datacenters_networkloadbalancers_forwardingrules_put**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_forwardingrules_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules | | [**datacenters_networkloadbalancers_get**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_get) | **GET** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers | | [**datacenters_networkloadbalancers_patch**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_patch) | **PATCH** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers | | [**datacenters_networkloadbalancers_post**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_post) | **POST** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer | | [**datacenters_networkloadbalancers_put**](NetworkLoadBalancersApi.md#datacenters_networkloadbalancers_put) | **PUT** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers | # **datacenters_networkloadbalancers_delete** > datacenters_networkloadbalancers_delete(datacenter_id, network_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete Network Load Balancers Remove the specified Network Load Balancer from the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. try: # Delete Network Load Balancers api_instance.datacenters_networkloadbalancers_delete(datacenter_id, network_load_balancer_id) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_find_by_network_load_balancer_id** > NetworkLoadBalancer datacenters_networkloadbalancers_find_by_network_load_balancer_id(datacenter_id, network_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve Network Load Balancers Retrieve the properties of the specified Network Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. try: # Retrieve Network Load Balancers api_response = api_instance.datacenters_networkloadbalancers_find_by_network_load_balancer_id(datacenter_id, network_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_find_by_network_load_balancer_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_delete** > datacenters_networkloadbalancers_flowlogs_delete(datacenter_id, network_load_balancer_id, flow_log_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete NLB Flow Logs Delete the specified Network Load Balancer Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. try: # Delete NLB Flow Logs api_instance.datacenters_networkloadbalancers_flowlogs_delete(datacenter_id, network_load_balancer_id, flow_log_id) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id** > FlowLog datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, network_load_balancer_id, flow_log_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve NLB Flow Logs Retrieve the specified Network Load Balancer Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. try: # Retrieve NLB Flow Logs api_response = api_instance.datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id(datacenter_id, network_load_balancer_id, flow_log_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_find_by_flow_log_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_get** > FlowLogs datacenters_networkloadbalancers_flowlogs_get(datacenter_id, network_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List NLB Flow Logs List all the Flow Logs for the specified Network Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. try: # List NLB Flow Logs api_response = api_instance.datacenters_networkloadbalancers_flowlogs_get(datacenter_id, network_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_patch** > FlowLog datacenters_networkloadbalancers_flowlogs_patch(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify NLB Flow Logs Update the properties of the specified Network Load Balancer Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. network_load_balancer_flow_log_properties = ionoscloud.FlowLogProperties() # FlowLogProperties | The properties of the Flow Log to be updated. try: # Partially modify NLB Flow Logs api_response = api_instance.datacenters_networkloadbalancers_flowlogs_patch(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log_properties) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **network_load_balancer_flow_log_properties** | [**FlowLogProperties**](../models/FlowLogProperties.md)| The properties of the Flow Log to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_post** > FlowLog datacenters_networkloadbalancers_flowlogs_post(datacenter_id, network_load_balancer_id, network_load_balancer_flow_log, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a NLB Flow Log Adds a new Flow Log for the Network Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. network_load_balancer_flow_log = ionoscloud.FlowLog() # FlowLog | The Flow Log to create. try: # Create a NLB Flow Log api_response = api_instance.datacenters_networkloadbalancers_flowlogs_post(datacenter_id, network_load_balancer_id, network_load_balancer_flow_log) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **network_load_balancer_flow_log** | [**FlowLog**](../models/FlowLog.md)| The Flow Log to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_networkloadbalancers_flowlogs_put** > FlowLog datacenters_networkloadbalancers_flowlogs_put(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify NLB Flow Logs Modify the specified Network Load Balancer Flow Log. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. flow_log_id = 'flow_log_id_example' # str | The unique ID of the Flow Log. network_load_balancer_flow_log = ionoscloud.FlowLogPut() # FlowLogPut | The modified NLB Flow Log. try: # Modify NLB Flow Logs api_response = api_instance.datacenters_networkloadbalancers_flowlogs_put(datacenter_id, network_load_balancer_id, flow_log_id, network_load_balancer_flow_log) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_flowlogs_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **flow_log_id** | **str**| The unique ID of the Flow Log. | | | **network_load_balancer_flow_log** | [**FlowLogPut**](../models/FlowLogPut.md)| The modified NLB Flow Log. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**FlowLog**](../models/FlowLog.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_delete** > datacenters_networkloadbalancers_forwardingrules_delete(datacenter_id, network_load_balancer_id, forwarding_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete NLB forwarding rules Delete the specified Network Load Balancer forwarding rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. try: # Delete NLB forwarding rules api_instance.datacenters_networkloadbalancers_forwardingrules_delete(datacenter_id, network_load_balancer_id, forwarding_rule_id) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id** > NetworkLoadBalancerForwardingRule datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, network_load_balancer_id, forwarding_rule_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve NLB forwarding rules Retrieve the specified Network Load Balance forwarding rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. try: # Retrieve NLB forwarding rules api_response = api_instance.datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id(datacenter_id, network_load_balancer_id, forwarding_rule_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_find_by_forwarding_rule_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_get** > NetworkLoadBalancerForwardingRules datacenters_networkloadbalancers_forwardingrules_get(datacenter_id, network_load_balancer_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List NLB forwarding rules List the forwarding rules for the specified Network Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. try: # List NLB forwarding rules api_response = api_instance.datacenters_networkloadbalancers_forwardingrules_get(datacenter_id, network_load_balancer_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancerForwardingRules**](../models/NetworkLoadBalancerForwardingRules.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_patch** > NetworkLoadBalancerForwardingRule datacenters_networkloadbalancers_forwardingrules_patch(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify NLB forwarding rules Update the properties of the specified Network Load Balancer forwarding rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. network_load_balancer_forwarding_rule_properties = ionoscloud.NetworkLoadBalancerForwardingRuleProperties() # NetworkLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated. try: # Partially modify NLB forwarding rules api_response = api_instance.datacenters_networkloadbalancers_forwardingrules_patch(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule_properties) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **network_load_balancer_forwarding_rule_properties** | [**NetworkLoadBalancerForwardingRuleProperties**](../models/NetworkLoadBalancerForwardingRuleProperties.md)| The properties of the forwarding rule to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_post** > NetworkLoadBalancerForwardingRule datacenters_networkloadbalancers_forwardingrules_post(datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a NLB Forwarding Rule Creates a forwarding rule for the specified Network Load Balancer. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. network_load_balancer_forwarding_rule = ionoscloud.NetworkLoadBalancerForwardingRule() # NetworkLoadBalancerForwardingRule | The forwarding rule to create. try: # Create a NLB Forwarding Rule api_response = api_instance.datacenters_networkloadbalancers_forwardingrules_post(datacenter_id, network_load_balancer_id, network_load_balancer_forwarding_rule) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **network_load_balancer_forwarding_rule** | [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md)| The forwarding rule to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_networkloadbalancers_forwardingrules_put** > NetworkLoadBalancerForwardingRule datacenters_networkloadbalancers_forwardingrules_put(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify NLB forwarding rules Modify the specified Network Load Balancer forwarding rule. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. forwarding_rule_id = 'forwarding_rule_id_example' # str | The unique ID of the forwarding rule. network_load_balancer_forwarding_rule = ionoscloud.NetworkLoadBalancerForwardingRulePut() # NetworkLoadBalancerForwardingRulePut | The modified NLB forwarding rule. try: # Modify NLB forwarding rules api_response = api_instance.datacenters_networkloadbalancers_forwardingrules_put(datacenter_id, network_load_balancer_id, forwarding_rule_id, network_load_balancer_forwarding_rule) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_forwardingrules_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **forwarding_rule_id** | **str**| The unique ID of the forwarding rule. | | | **network_load_balancer_forwarding_rule** | [**NetworkLoadBalancerForwardingRulePut**](../models/NetworkLoadBalancerForwardingRulePut.md)| The modified NLB forwarding rule. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_networkloadbalancers_get** > NetworkLoadBalancers datacenters_networkloadbalancers_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List Network Load Balancers List all the Network Load Balancers within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List Network Load Balancers api_response = api_instance.datacenters_networkloadbalancers_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**NetworkLoadBalancers**](../models/NetworkLoadBalancers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_patch** > NetworkLoadBalancer datacenters_networkloadbalancers_patch(datacenter_id, network_load_balancer_id, network_load_balancer_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify Network Load Balancers Update the properties of the specified Network Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. network_load_balancer_properties = ionoscloud.NetworkLoadBalancerProperties() # NetworkLoadBalancerProperties | The properties of the Network Load Balancer to be updated. try: # Partially modify Network Load Balancers api_response = api_instance.datacenters_networkloadbalancers_patch(datacenter_id, network_load_balancer_id, network_load_balancer_properties) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **network_load_balancer_properties** | [**NetworkLoadBalancerProperties**](../models/NetworkLoadBalancerProperties.md)| The properties of the Network Load Balancer to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_networkloadbalancers_post** > NetworkLoadBalancer datacenters_networkloadbalancers_post(datacenter_id, network_load_balancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Network Load Balancer Creates a Network Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer = ionoscloud.NetworkLoadBalancer() # NetworkLoadBalancer | The Network Load Balancer to create. try: # Create a Network Load Balancer api_response = api_instance.datacenters_networkloadbalancers_post(datacenter_id, network_load_balancer) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer** | [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md)| The Network Load Balancer to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_networkloadbalancers_put** > NetworkLoadBalancer datacenters_networkloadbalancers_put(datacenter_id, network_load_balancer_id, network_load_balancer, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify Network Load Balancers Modify the properties of the specified Network Load Balancer within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.NetworkLoadBalancersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. network_load_balancer_id = 'network_load_balancer_id_example' # str | The unique ID of the Network Load Balancer. network_load_balancer = ionoscloud.NetworkLoadBalancerPut() # NetworkLoadBalancerPut | The modified Network Load Balancer. try: # Modify Network Load Balancers api_response = api_instance.datacenters_networkloadbalancers_put(datacenter_id, network_load_balancer_id, network_load_balancer) print(api_response) except ApiException as e: print('Exception when calling NetworkLoadBalancersApi.datacenters_networkloadbalancers_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **network_load_balancer_id** | **str**| The unique ID of the Network Load Balancer. | | | **network_load_balancer** | [**NetworkLoadBalancerPut**](../models/NetworkLoadBalancerPut.md)| The modified Network Load Balancer. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/PrivateCrossConnectsApi.md000066400000000000000000000313611454002221500224240ustar00rootroot00000000000000# PrivateCrossConnectsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**pccs_delete**](PrivateCrossConnectsApi.md#pccs_delete) | **DELETE** /pccs/{pccId} | Delete private Cross-Connects | | [**pccs_find_by_id**](PrivateCrossConnectsApi.md#pccs_find_by_id) | **GET** /pccs/{pccId} | Retrieve private Cross-Connects | | [**pccs_get**](PrivateCrossConnectsApi.md#pccs_get) | **GET** /pccs | List private Cross-Connects | | [**pccs_patch**](PrivateCrossConnectsApi.md#pccs_patch) | **PATCH** /pccs/{pccId} | Partially modify private Cross-Connects | | [**pccs_post**](PrivateCrossConnectsApi.md#pccs_post) | **POST** /pccs | Create a Private Cross-Connect | # **pccs_delete** > pccs_delete(pcc_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete private Cross-Connects Remove the specified private Cross-Connect (only if not connected to any data centers). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.PrivateCrossConnectsApi(api_client) pcc_id = 'pcc_id_example' # str | The unique ID of the private Cross-Connect. try: # Delete private Cross-Connects api_instance.pccs_delete(pcc_id) except ApiException as e: print('Exception when calling PrivateCrossConnectsApi.pccs_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pcc_id** | **str**| The unique ID of the private Cross-Connect. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **pccs_find_by_id** > PrivateCrossConnect pccs_find_by_id(pcc_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve private Cross-Connects Retrieve a private Cross-Connect by the resource ID. Cross-Connect ID is in the response body when the private Cross-Connect is created, and in the list of private Cross-Connects, returned by GET. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.PrivateCrossConnectsApi(api_client) pcc_id = 'pcc_id_example' # str | The unique ID of the private Cross-Connect. try: # Retrieve private Cross-Connects api_response = api_instance.pccs_find_by_id(pcc_id) print(api_response) except ApiException as e: print('Exception when calling PrivateCrossConnectsApi.pccs_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pcc_id** | **str**| The unique ID of the private Cross-Connect. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **pccs_get** > PrivateCrossConnects pccs_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List private Cross-Connects List all private Cross-Connects for your account. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.PrivateCrossConnectsApi(api_client) try: # List private Cross-Connects api_response = api_instance.pccs_get() print(api_response) except ApiException as e: print('Exception when calling PrivateCrossConnectsApi.pccs_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**PrivateCrossConnects**](../models/PrivateCrossConnects.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **pccs_patch** > PrivateCrossConnect pccs_patch(pcc_id, pcc, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify private Cross-Connects Update the properties of the specified private Cross-Connect. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.PrivateCrossConnectsApi(api_client) pcc_id = 'pcc_id_example' # str | The unique ID of the private Cross-Connect. pcc = ionoscloud.PrivateCrossConnectProperties() # PrivateCrossConnectProperties | The properties of the private Cross-Connect to be updated. try: # Partially modify private Cross-Connects api_response = api_instance.pccs_patch(pcc_id, pcc) print(api_response) except ApiException as e: print('Exception when calling PrivateCrossConnectsApi.pccs_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pcc_id** | **str**| The unique ID of the private Cross-Connect. | | | **pcc** | [**PrivateCrossConnectProperties**](../models/PrivateCrossConnectProperties.md)| The properties of the private Cross-Connect to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **pccs_post** > PrivateCrossConnect pccs_post(pcc, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Private Cross-Connect Creates a private Cross-Connect. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.PrivateCrossConnectsApi(api_client) pcc = ionoscloud.PrivateCrossConnect() # PrivateCrossConnect | The private Cross-Connect to create. try: # Create a Private Cross-Connect api_response = api_instance.pccs_post(pcc) print(api_response) except ApiException as e: print('Exception when calling PrivateCrossConnectsApi.pccs_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pcc** | [**PrivateCrossConnect**](../models/PrivateCrossConnect.md)| The private Cross-Connect to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/RequestsApi.md000066400000000000000000000247421454002221500201230ustar00rootroot00000000000000# RequestsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**requests_find_by_id**](RequestsApi.md#requests_find_by_id) | **GET** /requests/{requestId} | Retrieve requests | | [**requests_get**](RequestsApi.md#requests_get) | **GET** /requests | List requests | | [**requests_status_get**](RequestsApi.md#requests_status_get) | **GET** /requests/{requestId}/status | Retrieve request status | # **requests_find_by_id** > Request requests_find_by_id(request_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve requests Retrieve the properties of the specified request. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.RequestsApi(api_client) request_id = 'request_id_example' # str | The unique ID of the request. try: # Retrieve requests api_response = api_instance.requests_find_by_id(request_id) print(api_response) except ApiException as e: print('Exception when calling RequestsApi.requests_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **request_id** | **str**| The unique ID of the request. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Request**](../models/Request.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **requests_get** > Requests requests_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number, filter_status=filter_status, filter_created_after=filter_created_after, filter_created_before=filter_created_before, filter_created_date=filter_created_date, filter_created_by=filter_created_by, filter_etag=filter_etag, filter_request_status=filter_request_status, filter_method=filter_method, filter_headers=filter_headers, filter_body=filter_body, filter_url=filter_url, offset=offset, limit=limit) List requests List all API requests. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.RequestsApi(api_client) try: # List requests api_response = api_instance.requests_get() print(api_response) except ApiException as e: print('Exception when calling RequestsApi.requests_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **filter_status** | **str**| Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. | [optional] | | **filter_created_after** | **str**| 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. | [optional] | | **filter_created_before** | **str**| 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. | [optional] | | **filter_created_date** | **str**| 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. | [optional] | | **filter_created_by** | **str**| 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. | [optional] | | **filter_etag** | **str**| 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. | [optional] | | **filter_request_status** | **str**| 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. | [optional] | | **filter_method** | **str**| 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. | [optional] | | **filter_headers** | **str**| 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. | [optional] | | **filter_body** | **str**| 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. | [optional] | | **filter_url** | **str**| 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. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Requests**](../models/Requests.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **requests_status_get** > RequestStatus requests_status_get(request_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve request status Retrieve the status of the specified request. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.RequestsApi(api_client) request_id = 'request_id_example' # str | The unique ID of the request. try: # Retrieve request status api_response = api_instance.requests_status_get(request_id) print(api_response) except ApiException as e: print('Exception when calling RequestsApi.requests_status_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **request_id** | **str**| The unique ID of the request. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**RequestStatus**](../models/RequestStatus.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/ServersApi.md000066400000000000000000002013071454002221500177330ustar00rootroot00000000000000# ServersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_servers_cdroms_delete**](ServersApi.md#datacenters_servers_cdroms_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID | | [**datacenters_servers_cdroms_find_by_id**](ServersApi.md#datacenters_servers_cdroms_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID | | [**datacenters_servers_cdroms_get**](ServersApi.md#datacenters_servers_cdroms_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs | | [**datacenters_servers_cdroms_post**](ServersApi.md#datacenters_servers_cdroms_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM | | [**datacenters_servers_delete**](ServersApi.md#datacenters_servers_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId} | Delete servers | | [**datacenters_servers_find_by_id**](ServersApi.md#datacenters_servers_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID | | [**datacenters_servers_get**](ServersApi.md#datacenters_servers_get) | **GET** /datacenters/{datacenterId}/servers | List servers | | [**datacenters_servers_patch**](ServersApi.md#datacenters_servers_patch) | **PATCH** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers | | [**datacenters_servers_post**](ServersApi.md#datacenters_servers_post) | **POST** /datacenters/{datacenterId}/servers | Create a Server | | [**datacenters_servers_put**](ServersApi.md#datacenters_servers_put) | **PUT** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID | | [**datacenters_servers_reboot_post**](ServersApi.md#datacenters_servers_reboot_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers | | [**datacenters_servers_remote_console_get**](ServersApi.md#datacenters_servers_remote_console_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link | | [**datacenters_servers_resume_post**](ServersApi.md#datacenters_servers_resume_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID | | [**datacenters_servers_start_post**](ServersApi.md#datacenters_servers_start_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID | | [**datacenters_servers_stop_post**](ServersApi.md#datacenters_servers_stop_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID | | [**datacenters_servers_suspend_post**](ServersApi.md#datacenters_servers_suspend_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID | | [**datacenters_servers_token_get**](ServersApi.md#datacenters_servers_token_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/token | Get JASON Web Token | | [**datacenters_servers_upgrade_post**](ServersApi.md#datacenters_servers_upgrade_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID | | [**datacenters_servers_volumes_delete**](ServersApi.md#datacenters_servers_volumes_delete) | **DELETE** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID | | [**datacenters_servers_volumes_find_by_id**](ServersApi.md#datacenters_servers_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID | | [**datacenters_servers_volumes_get**](ServersApi.md#datacenters_servers_volumes_get) | **GET** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes | | [**datacenters_servers_volumes_post**](ServersApi.md#datacenters_servers_volumes_post) | **POST** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server | # **datacenters_servers_cdroms_delete** > datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Detach a CD-ROM by ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM. try: # Detach a CD-ROM by ID api_instance.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_cdroms_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **cdrom_id** | **str**| The unique ID of the CD-ROM. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_cdroms_find_by_id** > Image datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Attached CD-ROM by ID Retrieves the properties of the CD-ROM attached to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM. try: # Get Attached CD-ROM by ID api_response = api_instance.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_cdroms_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **cdrom_id** | **str**| The unique ID of the CD-ROM. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Image**](../models/Image.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_cdroms_get** > Cdroms datacenters_servers_cdroms_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) Get Attached CD-ROMs Lists all CD-ROMs attached to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Get Attached CD-ROMs api_response = api_instance.datacenters_servers_cdroms_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_cdroms_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Cdroms**](../models/Cdroms.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_cdroms_post** > Image datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Attach a CD-ROM 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. cdrom = ionoscloud.Image() # Image | The CD-ROM to be attached. try: # Attach a CD-ROM api_response = api_instance.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_cdroms_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **cdrom** | [**Image**](../models/Image.md)| The CD-ROM to be attached. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Image**](../models/Image.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_delete** > datacenters_servers_delete(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, delete_volumes=delete_volumes) Delete servers 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Delete servers api_instance.datacenters_servers_delete(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **delete_volumes** | **bool**| If true, all attached storage volumes will also be deleted. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_find_by_id** > Server datacenters_servers_find_by_id(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve servers by ID Retrieve information about the specified server within the data center, such as its configuration, provisioning status, and so on. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Retrieve servers by ID api_response = api_instance.datacenters_servers_find_by_id(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Server**](../models/Server.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_get** > Servers datacenters_servers_get(datacenter_id, pretty=pretty, depth=depth, upgrade_needed=upgrade_needed, x_contract_number=x_contract_number, offset=offset, limit=limit) List servers List all servers within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List servers api_response = api_instance.datacenters_servers_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **upgrade_needed** | **bool**| Filter servers that can or that cannot be upgraded. | [optional] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Servers**](../models/Servers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_patch** > Server datacenters_servers_patch(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify servers Update the properties of the specified server within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. server = ionoscloud.ServerProperties() # ServerProperties | The properties of the server to be updated. try: # Partially modify servers api_response = api_instance.datacenters_servers_patch(datacenter_id, server_id, server) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **server** | [**ServerProperties**](../models/ServerProperties.md)| The properties of the server to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Server**](../models/Server.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_post** > Server datacenters_servers_post(datacenter_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Server 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server = ionoscloud.Server() # Server | The server to create. try: # Create a Server api_response = api_instance.datacenters_servers_post(datacenter_id, server) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server** | [**Server**](../models/Server.md)| The server to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Server**](../models/Server.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_put** > Server datacenters_servers_put(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Server by ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. server = ionoscloud.Server() # Server | The modified server try: # Modify a Server by ID api_response = api_instance.datacenters_servers_put(datacenter_id, server_id, server) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **server** | [**Server**](../models/Server.md)| The modified server | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Server**](../models/Server.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_servers_reboot_post** > datacenters_servers_reboot_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Reboot servers 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Reboot servers api_instance.datacenters_servers_reboot_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_reboot_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_remote_console_get** > RemoteConsoleUrl datacenters_servers_remote_console_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Remote Console link Retrieve a link with a JSON Web Token for accessing the server's Remote Console. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Get Remote Console link api_response = api_instance.datacenters_servers_remote_console_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_remote_console_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**RemoteConsoleUrl**](../models/RemoteConsoleUrl.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_resume_post** > datacenters_servers_resume_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Resume a Cube Server by ID 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). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Resume a Cube Server by ID api_instance.datacenters_servers_resume_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_resume_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_start_post** > datacenters_servers_start_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Start an Enterprise Server by ID 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). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Start an Enterprise Server by ID api_instance.datacenters_servers_start_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_start_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_stop_post** > datacenters_servers_stop_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Stop an Enterprise Server by ID 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). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Stop an Enterprise Server by ID api_instance.datacenters_servers_stop_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_stop_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_suspend_post** > datacenters_servers_suspend_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Suspend a Cube Server by ID 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). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Suspend a Cube Server by ID api_instance.datacenters_servers_suspend_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_suspend_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_token_get** > Token datacenters_servers_token_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get JASON Web Token Retrieve a JSON Web Token from the server for use in login operations (such as accessing the server's console). ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Get JASON Web Token api_response = api_instance.datacenters_servers_token_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_token_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Token**](../models/Token.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_upgrade_post** > datacenters_servers_upgrade_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Upgrade a Server by ID Upgrades the server version. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Upgrade a Server by ID api_instance.datacenters_servers_upgrade_post(datacenter_id, server_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_upgrade_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_volumes_delete** > datacenters_servers_volumes_delete(datacenter_id, server_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Detach a Volume by ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Detach a Volume by ID api_instance.datacenters_servers_volumes_delete(datacenter_id, server_id, volume_id) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_volumes_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_volumes_find_by_id** > Volume datacenters_servers_volumes_find_by_id(datacenter_id, server_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get Attached Volume by ID Retrieves the properties of the volume attached to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Get Attached Volume by ID api_response = api_instance.datacenters_servers_volumes_find_by_id(datacenter_id, server_id, volume_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_volumes_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_volumes_get** > AttachedVolumes datacenters_servers_volumes_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) Get Attached Volumes Lists all volumes attached to the specified server. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. try: # Get Attached Volumes api_response = api_instance.datacenters_servers_volumes_get(datacenter_id, server_id) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_volumes_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**AttachedVolumes**](../models/AttachedVolumes.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_servers_volumes_post** > Volume datacenters_servers_volumes_post(datacenter_id, server_id, volume, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Attach a Volume to a Server 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.ServersApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. server_id = 'server_id_example' # str | The unique ID of the server. volume = ionoscloud.Volume() # Volume | The volume to be attached (or created and attached). try: # Attach a Volume to a Server api_response = api_instance.datacenters_servers_volumes_post(datacenter_id, server_id, volume) print(api_response) except ApiException as e: print('Exception when calling ServersApi.datacenters_servers_volumes_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **server_id** | **str**| The unique ID of the server. | | | **volume** | [**Volume**](../models/Volume.md)| The volume to be attached (or created and attached). | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/SnapshotsApi.md000066400000000000000000000305101454002221500202600ustar00rootroot00000000000000# SnapshotsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**snapshots_delete**](SnapshotsApi.md#snapshots_delete) | **DELETE** /snapshots/{snapshotId} | Delete snapshots | | [**snapshots_find_by_id**](SnapshotsApi.md#snapshots_find_by_id) | **GET** /snapshots/{snapshotId} | Retrieve snapshots by ID | | [**snapshots_get**](SnapshotsApi.md#snapshots_get) | **GET** /snapshots | List snapshots | | [**snapshots_patch**](SnapshotsApi.md#snapshots_patch) | **PATCH** /snapshots/{snapshotId} | Partially modify snapshots | | [**snapshots_put**](SnapshotsApi.md#snapshots_put) | **PUT** /snapshots/{snapshotId} | Modify a Snapshot by ID | # **snapshots_delete** > snapshots_delete(snapshot_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete snapshots Deletes the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.SnapshotsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. try: # Delete snapshots api_instance.snapshots_delete(snapshot_id) except ApiException as e: print('Exception when calling SnapshotsApi.snapshots_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_find_by_id** > Snapshot snapshots_find_by_id(snapshot_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve snapshots by ID Retrieve the properties of the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.SnapshotsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. try: # Retrieve snapshots by ID api_response = api_instance.snapshots_find_by_id(snapshot_id) print(api_response) except ApiException as e: print('Exception when calling SnapshotsApi.snapshots_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Snapshot**](../models/Snapshot.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_get** > Snapshots snapshots_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List snapshots List all available snapshots. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.SnapshotsApi(api_client) try: # List snapshots api_response = api_instance.snapshots_get() print(api_response) except ApiException as e: print('Exception when calling SnapshotsApi.snapshots_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Snapshots**](../models/Snapshots.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **snapshots_patch** > Snapshot snapshots_patch(snapshot_id, snapshot, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify snapshots Update the properties of the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.SnapshotsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. snapshot = ionoscloud.SnapshotProperties() # SnapshotProperties | The properties of the snapshot to be updated. try: # Partially modify snapshots api_response = api_instance.snapshots_patch(snapshot_id, snapshot) print(api_response) except ApiException as e: print('Exception when calling SnapshotsApi.snapshots_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **snapshot** | [**SnapshotProperties**](../models/SnapshotProperties.md)| The properties of the snapshot to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Snapshot**](../models/Snapshot.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **snapshots_put** > Snapshot snapshots_put(snapshot_id, snapshot, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Snapshot by ID Modifies the properties of the specified snapshot. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.SnapshotsApi(api_client) snapshot_id = 'snapshot_id_example' # str | The unique ID of the snapshot. snapshot = ionoscloud.Snapshot() # Snapshot | The modified snapshot try: # Modify a Snapshot by ID api_response = api_instance.snapshots_put(snapshot_id, snapshot) print(api_response) except ApiException as e: print('Exception when calling SnapshotsApi.snapshots_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **snapshot_id** | **str**| The unique ID of the snapshot. | | | **snapshot** | [**Snapshot**](../models/Snapshot.md)| The modified snapshot | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Snapshot**](../models/Snapshot.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/TargetGroupsApi.md000066400000000000000000000402411454002221500207260ustar00rootroot00000000000000# TargetGroupsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**target_groups_delete**](TargetGroupsApi.md#target_groups_delete) | **DELETE** /targetgroups/{targetGroupId} | Delete a Target Group by ID | | [**targetgroups_find_by_target_group_id**](TargetGroupsApi.md#targetgroups_find_by_target_group_id) | **GET** /targetgroups/{targetGroupId} | Get a Target Group by ID | | [**targetgroups_get**](TargetGroupsApi.md#targetgroups_get) | **GET** /targetgroups | Get Target Groups | | [**targetgroups_patch**](TargetGroupsApi.md#targetgroups_patch) | **PATCH** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID | | [**targetgroups_post**](TargetGroupsApi.md#targetgroups_post) | **POST** /targetgroups | Create a Target Group | | [**targetgroups_put**](TargetGroupsApi.md#targetgroups_put) | **PUT** /targetgroups/{targetGroupId} | Modify a Target Group by ID | # **target_groups_delete** > target_groups_delete(target_group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete a Target Group by ID Deletes the target group specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) target_group_id = 'target_group_id_example' # str | The unique ID of the target group. try: # Delete a Target Group by ID api_instance.target_groups_delete(target_group_id) except ApiException as e: print('Exception when calling TargetGroupsApi.target_groups_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **target_group_id** | **str**| The unique ID of the target group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **targetgroups_find_by_target_group_id** > TargetGroup targetgroups_find_by_target_group_id(target_group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Get a Target Group by ID Retrieves the properties of the target group specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) target_group_id = 'target_group_id_example' # str | The unique ID of the target group. try: # Get a Target Group by ID api_response = api_instance.targetgroups_find_by_target_group_id(target_group_id) print(api_response) except ApiException as e: print('Exception when calling TargetGroupsApi.targetgroups_find_by_target_group_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **target_group_id** | **str**| The unique ID of the target group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **targetgroups_get** > TargetGroups targetgroups_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) Get Target Groups 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) try: # Get Target Groups api_response = api_instance.targetgroups_get() print(api_response) except ApiException as e: print('Exception when calling TargetGroupsApi.targetgroups_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>. | [optional] [default to 100] | ### Return type [**TargetGroups**](../models/TargetGroups.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **targetgroups_patch** > TargetGroup targetgroups_patch(target_group_id, target_group_properties, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially Modify a Target Group by ID Updates the properties of the target group specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) target_group_id = 'target_group_id_example' # str | The unique ID of the target group. target_group_properties = ionoscloud.TargetGroupProperties() # TargetGroupProperties | The target group properties to be updated. try: # Partially Modify a Target Group by ID api_response = api_instance.targetgroups_patch(target_group_id, target_group_properties) print(api_response) except ApiException as e: print('Exception when calling TargetGroupsApi.targetgroups_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **target_group_id** | **str**| The unique ID of the target group. | | | **target_group_properties** | [**TargetGroupProperties**](../models/TargetGroupProperties.md)| The target group properties to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **targetgroups_post** > TargetGroup targetgroups_post(target_group, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Target Group Creates a target group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) target_group = ionoscloud.TargetGroup() # TargetGroup | The target group to create. try: # Create a Target Group api_response = api_instance.targetgroups_post(target_group) print(api_response) except ApiException as e: print('Exception when calling TargetGroupsApi.targetgroups_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **target_group** | [**TargetGroup**](../models/TargetGroup.md)| The target group to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **targetgroups_put** > TargetGroup targetgroups_put(target_group_id, target_group, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Target Group by ID Modifies the properties of the target group specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TargetGroupsApi(api_client) target_group_id = 'target_group_id_example' # str | The unique ID of the target group. target_group = ionoscloud.TargetGroupPut() # TargetGroupPut | The modified target group. try: # Modify a Target Group by ID api_response = api_instance.targetgroups_put(target_group_id, target_group) print(api_response) except ApiException as e: print('Exception when calling TargetGroupsApi.targetgroups_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **target_group_id** | **str**| The unique ID of the target group. | | | **target_group** | [**TargetGroupPut**](../models/TargetGroupPut.md)| The modified target group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/TemplatesApi.md000066400000000000000000000103711454002221500202370ustar00rootroot00000000000000# TemplatesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**templates_find_by_id**](TemplatesApi.md#templates_find_by_id) | **GET** /templates/{templateId} | Get Cubes Template by ID | | [**templates_get**](TemplatesApi.md#templates_get) | **GET** /templates | Get Cubes Templates | # **templates_find_by_id** > Template templates_find_by_id(template_id, depth=depth) Get Cubes Template by ID Retrieves the properties of the Cubes template specified by its ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TemplatesApi(api_client) template_id = 'template_id_example' # str | The unique template ID. try: # Get Cubes Template by ID api_response = api_instance.templates_find_by_id(template_id) print(api_response) except ApiException as e: print('Exception when calling TemplatesApi.templates_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **template_id** | **str**| The unique template ID. | | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**Template**](../models/Template.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **templates_get** > Templates templates_get(depth=depth) Get Cubes Templates 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.TemplatesApi(api_client) try: # Get Cubes Templates api_response = api_instance.templates_get() print(api_response) except ApiException as e: print('Exception when calling TemplatesApi.templates_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | ### Return type [**Templates**](../models/Templates.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/UserManagementApi.md000066400000000000000000001701531454002221500212210ustar00rootroot00000000000000# UserManagementApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**um_groups_delete**](UserManagementApi.md#um_groups_delete) | **DELETE** /um/groups/{groupId} | Delete groups | | [**um_groups_find_by_id**](UserManagementApi.md#um_groups_find_by_id) | **GET** /um/groups/{groupId} | Retrieve groups | | [**um_groups_get**](UserManagementApi.md#um_groups_get) | **GET** /um/groups | List all groups | | [**um_groups_post**](UserManagementApi.md#um_groups_post) | **POST** /um/groups | Create groups | | [**um_groups_put**](UserManagementApi.md#um_groups_put) | **PUT** /um/groups/{groupId} | Modify groups | | [**um_groups_resources_get**](UserManagementApi.md#um_groups_resources_get) | **GET** /um/groups/{groupId}/resources | Retrieve group resources | | [**um_groups_shares_delete**](UserManagementApi.md#um_groups_shares_delete) | **DELETE** /um/groups/{groupId}/shares/{resourceId} | Remove group shares | | [**um_groups_shares_find_by_resource_id**](UserManagementApi.md#um_groups_shares_find_by_resource_id) | **GET** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares | | [**um_groups_shares_get**](UserManagementApi.md#um_groups_shares_get) | **GET** /um/groups/{groupId}/shares | List group shares | | [**um_groups_shares_post**](UserManagementApi.md#um_groups_shares_post) | **POST** /um/groups/{groupId}/shares/{resourceId} | Add group shares | | [**um_groups_shares_put**](UserManagementApi.md#um_groups_shares_put) | **PUT** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges | | [**um_groups_users_delete**](UserManagementApi.md#um_groups_users_delete) | **DELETE** /um/groups/{groupId}/users/{userId} | Remove users from groups | | [**um_groups_users_get**](UserManagementApi.md#um_groups_users_get) | **GET** /um/groups/{groupId}/users | List group members | | [**um_groups_users_post**](UserManagementApi.md#um_groups_users_post) | **POST** /um/groups/{groupId}/users | Add a Group Member | | [**um_resources_find_by_type**](UserManagementApi.md#um_resources_find_by_type) | **GET** /um/resources/{resourceType} | List resources by type | | [**um_resources_find_by_type_and_id**](UserManagementApi.md#um_resources_find_by_type_and_id) | **GET** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type | | [**um_resources_get**](UserManagementApi.md#um_resources_get) | **GET** /um/resources | List all resources | | [**um_users_delete**](UserManagementApi.md#um_users_delete) | **DELETE** /um/users/{userId} | Delete users | | [**um_users_find_by_id**](UserManagementApi.md#um_users_find_by_id) | **GET** /um/users/{userId} | Retrieve users | | [**um_users_get**](UserManagementApi.md#um_users_get) | **GET** /um/users | List all users | | [**um_users_groups_get**](UserManagementApi.md#um_users_groups_get) | **GET** /um/users/{userId}/groups | Retrieve group resources by user ID | | [**um_users_owns_get**](UserManagementApi.md#um_users_owns_get) | **GET** /um/users/{userId}/owns | Retrieve user resources by user ID | | [**um_users_post**](UserManagementApi.md#um_users_post) | **POST** /um/users | Create users | | [**um_users_put**](UserManagementApi.md#um_users_put) | **PUT** /um/users/{userId} | Modify users | # **um_groups_delete** > um_groups_delete(group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete groups Remove the specified group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. try: # Delete groups api_instance.um_groups_delete(group_id) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_find_by_id** > Group um_groups_find_by_id(group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve groups 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. try: # Retrieve groups api_response = api_instance.um_groups_find_by_id(group_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Group**](../models/Group.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_get** > Groups um_groups_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List all groups List all the available user groups. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) try: # List all groups api_response = api_instance.um_groups_get() print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Groups**](../models/Groups.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_post** > Group um_groups_post(group, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create groups Create a group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group = ionoscloud.Group() # Group | The group to create. try: # Create groups api_response = api_instance.um_groups_post(group) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group** | [**Group**](../models/Group.md)| The group to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Group**](../models/Group.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_groups_put** > Group um_groups_put(group_id, group, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify groups Modify the properties of the specified group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. group = ionoscloud.Group() # Group | The modified group. try: # Modify groups api_response = api_instance.um_groups_put(group_id, group) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **group** | [**Group**](../models/Group.md)| The modified group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Group**](../models/Group.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_groups_resources_get** > ResourceGroups um_groups_resources_get(group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve group resources List the resources assigned to the group, by group ID. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. try: # Retrieve group resources api_response = api_instance.um_groups_resources_get(group_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_resources_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ResourceGroups**](../models/ResourceGroups.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_shares_delete** > um_groups_shares_delete(group_id, resource_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Remove group shares Remove the specified share from the group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. resource_id = 'resource_id_example' # str | The unique ID of the resource. try: # Remove group shares api_instance.um_groups_shares_delete(group_id, resource_id) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_shares_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **resource_id** | **str**| The unique ID of the resource. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_shares_find_by_resource_id** > GroupShare um_groups_shares_find_by_resource_id(group_id, resource_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve group shares Retrieve the properties of the specified group share. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. resource_id = 'resource_id_example' # str | The unique ID of the resource. try: # Retrieve group shares api_response = api_instance.um_groups_shares_find_by_resource_id(group_id, resource_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_shares_find_by_resource_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **resource_id** | **str**| The unique ID of the resource. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**GroupShare**](../models/GroupShare.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_shares_get** > GroupShares um_groups_shares_get(group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List group shares List all shares and share privileges for the specified group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. try: # List group shares api_response = api_instance.um_groups_shares_get(group_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_shares_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**GroupShares**](../models/GroupShares.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_shares_post** > GroupShare um_groups_shares_post(group_id, resource_id, resource, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Add group shares Add the specified share to the group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. resource_id = 'resource_id_example' # str | The unique ID of the resource. resource = ionoscloud.GroupShare() # GroupShare | The resource to add. try: # Add group shares api_response = api_instance.um_groups_shares_post(group_id, resource_id, resource) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_shares_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **resource_id** | **str**| The unique ID of the resource. | | | **resource** | [**GroupShare**](../models/GroupShare.md)| The resource to add. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**GroupShare**](../models/GroupShare.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_shares_put** > GroupShare um_groups_shares_put(group_id, resource_id, resource, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify group share privileges 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. resource_id = 'resource_id_example' # str | The unique ID of the resource. resource = ionoscloud.GroupShare() # GroupShare | The modified resource try: # Modify group share privileges api_response = api_instance.um_groups_shares_put(group_id, resource_id, resource) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_shares_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **resource_id** | **str**| The unique ID of the resource. | | | **resource** | [**GroupShare**](../models/GroupShare.md)| The modified resource | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**GroupShare**](../models/GroupShare.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_groups_users_delete** > um_groups_users_delete(group_id, user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Remove users from groups Remove the specified user from the group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. user_id = 'user_id_example' # str | The unique ID of the user. try: # Remove users from groups api_instance.um_groups_users_delete(group_id, user_id) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_users_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_users_get** > GroupMembers um_groups_users_get(group_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List group members List all members of the specified user group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. try: # List group members api_response = api_instance.um_groups_users_get(group_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_users_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**GroupMembers**](../models/GroupMembers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_groups_users_post** > User um_groups_users_post(group_id, user, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Add a Group Member Adds an existing user to the specified group. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) group_id = 'group_id_example' # str | The unique ID of the group. user = ionoscloud.User() # User | The user to add. try: # Add a Group Member api_response = api_instance.um_groups_users_post(group_id, user) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_groups_users_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **group_id** | **str**| The unique ID of the group. | | | **user** | [**User**](../models/User.md)| The user to add. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**User**](../models/User.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_resources_find_by_type** > Resources um_resources_find_by_type(resource_type, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List resources by type 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) resource_type = 'resource_type_example' # str | The resource type try: # List resources by type api_response = api_instance.um_resources_find_by_type(resource_type) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_resources_find_by_type: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **resource_type** | **str**| The resource type | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Resources**](../models/Resources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_resources_find_by_type_and_id** > Resource um_resources_find_by_type_and_id(resource_type, resource_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve resources by type 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) resource_type = 'resource_type_example' # str | The resource type resource_id = 'resource_id_example' # str | The resource ID try: # Retrieve resources by type api_response = api_instance.um_resources_find_by_type_and_id(resource_type, resource_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_resources_find_by_type_and_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **resource_type** | **str**| The resource type | | | **resource_id** | **str**| The resource ID | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Resource**](../models/Resource.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_resources_get** > Resources um_resources_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number) List all resources List all the available resources. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) try: # List all resources api_response = api_instance.um_resources_get() print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_resources_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Resources**](../models/Resources.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_delete** > um_users_delete(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete users Delete the specified user. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Delete users api_instance.um_users_delete(user_id) except ApiException as e: print('Exception when calling UserManagementApi.um_users_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_find_by_id** > User um_users_find_by_id(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve users 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Retrieve users api_response = api_instance.um_users_find_by_id(user_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**User**](../models/User.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_get** > Users um_users_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List all users List all the users in your account. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) try: # List all users api_response = api_instance.um_users_get() print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with <code>offset</code> for pagination). | [optional] [default to 100] | ### Return type [**Users**](../models/Users.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_groups_get** > ResourceGroups um_users_groups_get(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve group resources by user ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Retrieve group resources by user ID api_response = api_instance.um_users_groups_get(user_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_groups_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ResourceGroups**](../models/ResourceGroups.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_owns_get** > ResourcesUsers um_users_owns_get(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve user resources by user ID 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Retrieve user resources by user ID api_response = api_instance.um_users_owns_get(user_id) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_owns_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**ResourcesUsers**](../models/ResourcesUsers.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_post** > User um_users_post(user, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create users Create a user. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user = ionoscloud.UserPost() # UserPost | The user to create. try: # Create users api_response = api_instance.um_users_post(user) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user** | [**UserPost**](../models/UserPost.md)| The user to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**User**](../models/User.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_users_put** > User um_users_put(user_id, user, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify users Modify the properties of the specified user. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserManagementApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. user = ionoscloud.UserPut() # UserPut | The modified user try: # Modify users api_response = api_instance.um_users_put(user_id, user) print(api_response) except ApiException as e: print('Exception when calling UserManagementApi.um_users_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **user** | [**UserPut**](../models/UserPut.md)| The modified user | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**User**](../models/User.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json sdk-python-6.1.9/docs/api/UserS3KeysApi.md000066400000000000000000000363731454002221500202730ustar00rootroot00000000000000# UserS3KeysApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**um_users_s3keys_delete**](UserS3KeysApi.md#um_users_s3keys_delete) | **DELETE** /um/users/{userId}/s3keys/{keyId} | Delete S3 keys | | [**um_users_s3keys_find_by_key_id**](UserS3KeysApi.md#um_users_s3keys_find_by_key_id) | **GET** /um/users/{userId}/s3keys/{keyId} | Retrieve user S3 keys by key ID | | [**um_users_s3keys_get**](UserS3KeysApi.md#um_users_s3keys_get) | **GET** /um/users/{userId}/s3keys | List user S3 keys | | [**um_users_s3keys_post**](UserS3KeysApi.md#um_users_s3keys_post) | **POST** /um/users/{userId}/s3keys | Create user S3 keys | | [**um_users_s3keys_put**](UserS3KeysApi.md#um_users_s3keys_put) | **PUT** /um/users/{userId}/s3keys/{keyId} | Modify a S3 Key by Key ID | | [**um_users_s3ssourl_get**](UserS3KeysApi.md#um_users_s3ssourl_get) | **GET** /um/users/{userId}/s3ssourl | Retrieve S3 single sign-on URLs | # **um_users_s3keys_delete** > um_users_s3keys_delete(user_id, key_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete S3 keys Delete the specified user S3 key. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. key_id = 'key_id_example' # str | The unique ID of the S3 key. try: # Delete S3 keys api_instance.um_users_s3keys_delete(user_id, key_id) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3keys_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **key_id** | **str**| The unique ID of the S3 key. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_s3keys_find_by_key_id** > S3Key um_users_s3keys_find_by_key_id(user_id, key_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve user S3 keys by key ID Retrieve the specified user S3 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 S3 key is created, and in the list of all user S3 keys, returned by GET. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. key_id = 'key_id_example' # str | The unique ID of the S3 key. try: # Retrieve user S3 keys by key ID api_response = api_instance.um_users_s3keys_find_by_key_id(user_id, key_id) print(api_response) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3keys_find_by_key_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **key_id** | **str**| The unique ID of the S3 key. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**S3Key**](../models/S3Key.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_s3keys_get** > S3Keys um_users_s3keys_get(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) List user S3 keys List S3 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # List user S3 keys api_response = api_instance.um_users_s3keys_get(user_id) print(api_response) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3keys_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**S3Keys**](../models/S3Keys.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_s3keys_post** > S3Key um_users_s3keys_post(user_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create user S3 keys Create an S3 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Create user S3 keys api_response = api_instance.um_users_s3keys_post(user_id) print(api_response) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3keys_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**S3Key**](../models/S3Key.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **um_users_s3keys_put** > S3Key um_users_s3keys_put(user_id, key_id, s3_key, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a S3 Key by Key ID Enables or disables the specified user S3 key. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. key_id = 'key_id_example' # str | The unique ID of the S3 key. s3_key = ionoscloud.S3Key() # S3Key | The modified S3 key. try: # Modify a S3 Key by Key ID api_response = api_instance.um_users_s3keys_put(user_id, key_id, s3_key) print(api_response) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3keys_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **key_id** | **str**| The unique ID of the S3 key. | | | **s3_key** | [**S3Key**](../models/S3Key.md)| The modified S3 key. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**S3Key**](../models/S3Key.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **um_users_s3ssourl_get** > S3ObjectStorageSSO um_users_s3ssourl_get(user_id, pretty=pretty, x_contract_number=x_contract_number) Retrieve S3 single sign-on URLs Retrieve S3 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.UserS3KeysApi(api_client) user_id = 'user_id_example' # str | The unique ID of the user. try: # Retrieve S3 single sign-on URLs api_response = api_instance.um_users_s3ssourl_get(user_id) print(api_response) except ApiException as e: print('Exception when calling UserS3KeysApi.um_users_s3ssourl_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **str**| The unique ID of the user. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**S3ObjectStorageSSO**](../models/S3ObjectStorageSSO.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json sdk-python-6.1.9/docs/api/VolumesApi.md000066400000000000000000000556011454002221500177400ustar00rootroot00000000000000# VolumesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**datacenters_volumes_create_snapshot_post**](VolumesApi.md#datacenters_volumes_create_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots | | [**datacenters_volumes_delete**](VolumesApi.md#datacenters_volumes_delete) | **DELETE** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes | | [**datacenters_volumes_find_by_id**](VolumesApi.md#datacenters_volumes_find_by_id) | **GET** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes | | [**datacenters_volumes_get**](VolumesApi.md#datacenters_volumes_get) | **GET** /datacenters/{datacenterId}/volumes | List volumes | | [**datacenters_volumes_patch**](VolumesApi.md#datacenters_volumes_patch) | **PATCH** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes | | [**datacenters_volumes_post**](VolumesApi.md#datacenters_volumes_post) | **POST** /datacenters/{datacenterId}/volumes | Create a Volume | | [**datacenters_volumes_put**](VolumesApi.md#datacenters_volumes_put) | **PUT** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID | | [**datacenters_volumes_restore_snapshot_post**](VolumesApi.md#datacenters_volumes_restore_snapshot_post) | **POST** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots | # **datacenters_volumes_create_snapshot_post** > Snapshot datacenters_volumes_create_snapshot_post(datacenter_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, name=name, description=description, sec_auth_protection=sec_auth_protection, licence_type=licence_type) Create volume snapshots Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Create volume snapshots api_response = api_instance.datacenters_volumes_create_snapshot_post(datacenter_id, volume_id) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_create_snapshot_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **name** | **str**| Snapshot name | [optional] | | **description** | **str**| Snapshot description | [optional] | | **sec_auth_protection** | **bool**| Flag for enabling extra protection for this snapshot, such as two-step verification. | [optional] | | **licence_type** | **str**| The OS type for this snapshot. | [optional] | ### Return type [**Snapshot**](../models/Snapshot.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json # **datacenters_volumes_delete** > datacenters_volumes_delete(datacenter_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Delete volumes Delete the specified volume within the data center. Use with caution, the volume will be permanently removed! ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Delete volumes api_instance.datacenters_volumes_delete(datacenter_id, volume_id) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_delete: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_find_by_id** > Volume datacenters_volumes_find_by_id(datacenter_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Retrieve volumes Retrieve the properties of the specified volume within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Retrieve volumes api_response = api_instance.datacenters_volumes_find_by_id(datacenter_id, volume_id) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_find_by_id: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_get** > Volumes datacenters_volumes_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit) List volumes List all the volumes within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. try: # List volumes api_response = api_instance.datacenters_volumes_get(datacenter_id) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_get: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **offset** | **int**| The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [optional] [default to 0] | | **limit** | **int**| The maximum number of elements to return (use together with offset for pagination). | [optional] [default to 1000] | ### Return type [**Volumes**](../models/Volumes.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **datacenters_volumes_patch** > Volume datacenters_volumes_patch(datacenter_id, volume_id, volume, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Partially modify volumes Update the properties of the specified storage volume within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. volume = ionoscloud.VolumeProperties() # VolumeProperties | The properties of the volume to be updated. try: # Partially modify volumes api_response = api_instance.datacenters_volumes_patch(datacenter_id, volume_id, volume) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_patch: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **volume** | [**VolumeProperties**](../models/VolumeProperties.md)| The properties of the volume to be updated. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_volumes_post** > Volume datacenters_volumes_post(datacenter_id, volume, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Create a Volume Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume = ionoscloud.Volume() # Volume | The volume to create. try: # Create a Volume api_response = api_instance.datacenters_volumes_post(datacenter_id, volume) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume** | [**Volume**](../models/Volume.md)| The volume to create. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_volumes_put** > Volume datacenters_volumes_put(datacenter_id, volume_id, volume, pretty=pretty, depth=depth, x_contract_number=x_contract_number) Modify a Volume by ID Modifies the properties of the specified volume within the data center. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. volume = ionoscloud.Volume() # Volume | The modified volume try: # Modify a Volume by ID api_response = api_instance.datacenters_volumes_put(datacenter_id, volume_id, volume) print(api_response) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_put: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **volume** | [**Volume**](../models/Volume.md)| The modified volume | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | ### Return type [**Volume**](../models/Volume.md) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **datacenters_volumes_restore_snapshot_post** > datacenters_volumes_restore_snapshot_post(datacenter_id, volume_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, snapshot_id=snapshot_id) Restore volume snapshots 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. ### Example ```python from __future__ import print_function import time import ionoscloud from ionoscloud.rest import ApiException # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6 configuration = ionoscloud.Configuration( host = 'https://api.ionos.com/cloudapi/v6', ) # Example of configuring HTTP Basic Authorization configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' with ionoscloud.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ionoscloud.VolumesApi(api_client) datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center. volume_id = 'volume_id_example' # str | The unique ID of the volume. try: # Restore volume snapshots api_instance.datacenters_volumes_restore_snapshot_post(datacenter_id, volume_id) except ApiException as e: print('Exception when calling VolumesApi.datacenters_volumes_restore_snapshot_post: %s\n' % e) ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **datacenter_id** | **str**| The unique ID of the data center. | | | **volume_id** | **str**| The unique ID of the volume. | | | **pretty** | **bool**| Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] | | **depth** | **int**| Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional] [default to 0] | | **x_contract_number** | **int**| Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] | | **snapshot_id** | **str**| The unique ID of the snapshot. | [optional] | ### Return type void (empty response body) ### Authorization Basic Authentication, Token Authentication ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json sdk-python-6.1.9/docs/models/000077500000000000000000000000001454002221500160355ustar00rootroot00000000000000sdk-python-6.1.9/docs/models/ApplicationLoadBalancer.md000066400000000000000000000013461454002221500230560ustar00rootroot00000000000000# ApplicationLoadBalancer ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**ApplicationLoadBalancerEntities**](ApplicationLoadBalancerEntities.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**ApplicationLoadBalancerProperties**](ApplicationLoadBalancerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerEntities.md000066400000000000000000000004351454002221500245610ustar00rootroot00000000000000# ApplicationLoadBalancerEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **forwardingrules** | [**ApplicationLoadBalancerForwardingRules**](ApplicationLoadBalancerForwardingRules.md) | | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerForwardingRule.md000066400000000000000000000012421454002221500257240ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRule ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**ApplicationLoadBalancerForwardingRuleProperties**](ApplicationLoadBalancerForwardingRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerForwardingRuleProperties.md000066400000000000000000000022051454002221500300010ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRuleProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **client_timeout** | **int** | The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). | [optional] | | **http_rules** | [**list[ApplicationLoadBalancerHttpRule]**](ApplicationLoadBalancerHttpRule.md) | 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. | [optional] | | **listener_ip** | **str** | The listening (inbound) IP. | | | **listener_port** | **int** | The listening (inbound) port number; the valid range is 1 to 65535. | | | **name** | **str** | The name of the Application Load Balancer forwarding rule. | | | **protocol** | **str** | The balancing protocol. | | | **server_certificates** | **list[str]** | Array of items in the collection. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerForwardingRulePut.md000066400000000000000000000011031454002221500264110ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRulePut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**ApplicationLoadBalancerForwardingRuleProperties**](ApplicationLoadBalancerForwardingRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerForwardingRules.md000066400000000000000000000015301454002221500261070ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRules ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[ApplicationLoadBalancerForwardingRule]**](ApplicationLoadBalancerForwardingRule.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerHttpRule.md000066400000000000000000000033351454002221500245460ustar00rootroot00000000000000# ApplicationLoadBalancerHttpRule ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **conditions** | [**list[ApplicationLoadBalancerHttpRuleCondition]**](ApplicationLoadBalancerHttpRuleCondition.md) | 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. | [optional] | | **content_type** | **str** | Specifies the content type and is valid only for 'STATIC' actions. | [optional] | | **drop_query** | **bool** | 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. | [optional] | | **location** | **str** | The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. | [optional] | | **name** | **str** | The unique name of the Application Load Balancer HTTP rule. | | | **response_message** | **str** | The response message of the request; this parameter is mandatory for 'STATIC' actions. | [optional] | | **status_code** | **int** | 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'. | [optional] | | **target_group** | **str** | The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. | [optional] | | **type** | **str** | The HTTP rule type. | | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerHttpRuleCondition.md000066400000000000000000000023361454002221500264150ustar00rootroot00000000000000# ApplicationLoadBalancerHttpRuleCondition ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **condition** | **str** | 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'. | | | **key** | **str** | 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'. | [optional] | | **negate** | **bool** | Specifies whether the condition should be negated; the default value is 'FALSE'. | [optional] | | **type** | **str** | The HTTP rule condition type. | | | **value** | **str** | 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'. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerProperties.md000066400000000000000000000016121454002221500251270ustar00rootroot00000000000000# ApplicationLoadBalancerProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ips** | **list[str]** | 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. | [optional] | | **lb_private_ips** | **list[str]** | 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. | [optional] | | **listener_lan** | **int** | The ID of the listening (inbound) LAN. | | | **name** | **str** | The Application Load Balancer name. | | | **target_lan** | **int** | The ID of the balanced private target LAN (outbound). | | sdk-python-6.1.9/docs/models/ApplicationLoadBalancerPut.md000066400000000000000000000010311454002221500235360ustar00rootroot00000000000000# ApplicationLoadBalancerPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**ApplicationLoadBalancerProperties**](ApplicationLoadBalancerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ApplicationLoadBalancers.md000066400000000000000000000014561454002221500232430ustar00rootroot00000000000000# ApplicationLoadBalancers ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[ApplicationLoadBalancer]**](ApplicationLoadBalancer.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/AttachedVolumes.md000066400000000000000000000013701454002221500214500ustar00rootroot00000000000000# AttachedVolumes ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Volume]**](Volume.md) | Array of items in the collection. | [optional] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/BackupUnit.md000066400000000000000000000011141454002221500204210ustar00rootroot00000000000000# BackupUnit ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**BackupUnitProperties**](BackupUnitProperties.md) | | | | **type** | **str** | The type of object that has been created. | [optional] [readonly] | sdk-python-6.1.9/docs/models/BackupUnitProperties.md000066400000000000000000000007271454002221500225070ustar00rootroot00000000000000# BackupUnitProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **email** | **str** | The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. | [optional] | | **name** | **str** | The name of the resource (alphanumeric characters only). | | | **password** | **str** | The password associated with that resource. | [optional] | sdk-python-6.1.9/docs/models/BackupUnitSSO.md000066400000000000000000000003401454002221500210060ustar00rootroot00000000000000# BackupUnitSSO ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **sso_url** | **str** | The backup unit single sign on url | [optional] [readonly] | sdk-python-6.1.9/docs/models/BackupUnits.md000066400000000000000000000010171454002221500206060ustar00rootroot00000000000000# BackupUnits ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[BackupUnit]**](BackupUnit.md) | Array of items in the collection. | [optional] [readonly] | | **type** | **str** | The type of object that has been created. | [optional] [readonly] | sdk-python-6.1.9/docs/models/BalancedNics.md000066400000000000000000000013661454002221500206730ustar00rootroot00000000000000# BalancedNics ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Nic]**](Nic.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Cdroms.md000066400000000000000000000013511454002221500176060ustar00rootroot00000000000000# Cdroms ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Image]**](Image.md) | Array of items in the collection. | [optional] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ConnectableDatacenter.md000066400000000000000000000004121454002221500225640ustar00rootroot00000000000000# ConnectableDatacenter ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **id** | **str** | | [optional] | | **location** | **str** | | [optional] | | **name** | **str** | | [optional] | sdk-python-6.1.9/docs/models/Contract.md000066400000000000000000000004331454002221500201340ustar00rootroot00000000000000# Contract ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **properties** | [**ContractProperties**](ContractProperties.md) | | | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/ContractProperties.md000066400000000000000000000010631454002221500222110ustar00rootroot00000000000000# ContractProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **contract_number** | **int** | The contract number. | [optional] [readonly] | | **owner** | **str** | The contract owner's user name. | [optional] [readonly] | | **reg_domain** | **str** | The registration domain of the contract. | [optional] [readonly] | | **resource_limits** | [**ResourceLimits**](ResourceLimits.md) | | [optional] | | **status** | **str** | The contract status. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Contracts.md000066400000000000000000000010161454002221500203150ustar00rootroot00000000000000# Contracts ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Contract]**](Contract.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/CpuArchitectureProperties.md000066400000000000000000000006651454002221500235350ustar00rootroot00000000000000# CpuArchitectureProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cpu_family** | **str** | A valid CPU family name. | [optional] | | **max_cores** | **int** | The maximum number of cores available. | [optional] | | **max_ram** | **int** | The maximum RAM size in MB. | [optional] | | **vendor** | **str** | A valid CPU vendor name. | [optional] | sdk-python-6.1.9/docs/models/DataCenterEntities.md000066400000000000000000000010671454002221500221020ustar00rootroot00000000000000# DataCenterEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **lans** | [**Lans**](Lans.md) | | [optional] | | **loadbalancers** | [**Loadbalancers**](Loadbalancers.md) | | [optional] | | **natgateways** | [**NatGateways**](NatGateways.md) | | [optional] | | **networkloadbalancers** | [**NetworkLoadBalancers**](NetworkLoadBalancers.md) | | [optional] | | **servers** | [**Servers**](Servers.md) | | [optional] | | **volumes** | [**Volumes**](Volumes.md) | | [optional] | sdk-python-6.1.9/docs/models/Datacenter.md000066400000000000000000000012411454002221500204270ustar00rootroot00000000000000# Datacenter ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**DataCenterEntities**](DataCenterEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**DatacenterProperties**](DatacenterProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/DatacenterElementMetadata.md000066400000000000000000000047671454002221500234220ustar00rootroot00000000000000# DatacenterElementMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_by** | **str** | The user who created the resource. | [optional] [readonly] | | **created_by_user_id** | **str** | The unique ID of the user who created the resource. | [optional] [readonly] | | **created_date** | **datetime** | The last time the resource was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | | **last_modified_by** | **str** | The user who last modified the resource. | [optional] [readonly] | | **last_modified_by_user_id** | **str** | The unique ID of the user who last modified the resource. | [optional] [readonly] | | **last_modified_date** | **datetime** | The last time the resource was modified. | [optional] [readonly] | | **state** | **str** | 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. | [optional] [readonly] | sdk-python-6.1.9/docs/models/DatacenterProperties.md000066400000000000000000000025461454002221500225150ustar00rootroot00000000000000# DatacenterProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cpu_architecture** | [**list[CpuArchitectureProperties]**](CpuArchitectureProperties.md) | Array of features and CPU families available in a location | [optional] [readonly] | | **description** | **str** | A description for the datacenter, such as staging, production. | [optional] | | **features** | **list[str]** | List of features supported by the location where this data center is provisioned. | [optional] [readonly] | | **ipv6_cidr_block** | **str** | 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. | [optional] [readonly] | | **location** | **str** | 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). | | | **name** | **str** | The name of the resource. | [optional] | | **sec_auth_protection** | **bool** | Boolean value representing if the data center requires extra protection, such as two-step verification. | [optional] | | **version** | **int** | The version of the data center; incremented with every change. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Datacenters.md000066400000000000000000000014031454002221500206120ustar00rootroot00000000000000# Datacenters ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Datacenter]**](Datacenter.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Error.md000066400000000000000000000004521454002221500174510ustar00rootroot00000000000000# Error ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **http_status** | **int** | HTTP status code of the operation. | [optional] [readonly] | | **messages** | [**list[ErrorMessage]**](ErrorMessage.md) | | [optional] | sdk-python-6.1.9/docs/models/ErrorMessage.md000066400000000000000000000004571454002221500207630ustar00rootroot00000000000000# ErrorMessage ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **error_code** | **str** | Application internal error code. | [optional] [readonly] | | **message** | **str** | A human-readable message. | [optional] [readonly] | sdk-python-6.1.9/docs/models/FirewallRule.md000066400000000000000000000011231454002221500207510ustar00rootroot00000000000000# FirewallRule ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**FirewallruleProperties**](FirewallruleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/FirewallRules.md000066400000000000000000000014111454002221500211340ustar00rootroot00000000000000# FirewallRules ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[FirewallRule]**](FirewallRule.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/FirewallruleProperties.md000066400000000000000000000045041454002221500230740ustar00rootroot00000000000000# FirewallruleProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **icmp_code** | **int** | Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. | [optional] | | **icmp_type** | **int** | Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. | [optional] | | **ip_version** | **str** | 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. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **port_range_end** | **int** | Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. | [optional] | | **port_range_start** | **int** | Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. | [optional] | | **protocol** | **str** | The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). | | | **source_ip** | **str** | 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). | [optional] | | **source_mac** | **str** | 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. | [optional] | | **target_ip** | **str** | 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). | [optional] | | **type** | **str** | The type of the firewall rule. If not specified, the default INGRESS value is used. | [optional] | sdk-python-6.1.9/docs/models/FlowLog.md000066400000000000000000000011101454002221500177210ustar00rootroot00000000000000# FlowLog ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**FlowLogProperties**](FlowLogProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/FlowLogProperties.md000066400000000000000000000006401454002221500220050ustar00rootroot00000000000000# FlowLogProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **action** | **str** | Specifies the traffic action pattern. | | | **bucket** | **str** | The S3 bucket name of an existing IONOS Cloud S3 bucket. | | | **direction** | **str** | Specifies the traffic direction pattern. | | | **name** | **str** | The resource name. | | sdk-python-6.1.9/docs/models/FlowLogPut.md000066400000000000000000000007451454002221500204270ustar00rootroot00000000000000# FlowLogPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**FlowLogProperties**](FlowLogProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/FlowLogs.md000066400000000000000000000013761454002221500201220ustar00rootroot00000000000000# FlowLogs ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[FlowLog]**](FlowLog.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Group.md000066400000000000000000000010261454002221500174520ustar00rootroot00000000000000# Group ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**GroupEntities**](GroupEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**GroupProperties**](GroupProperties.md) | | | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/GroupEntities.md000066400000000000000000000004321454002221500211570ustar00rootroot00000000000000# GroupEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **resources** | [**ResourceGroups**](ResourceGroups.md) | | [optional] | | **users** | [**GroupMembers**](GroupMembers.md) | | [optional] | sdk-python-6.1.9/docs/models/GroupMembers.md000066400000000000000000000010051454002221500207620ustar00rootroot00000000000000# GroupMembers ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[User]**](User.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/GroupProperties.md000066400000000000000000000034301454002221500215300ustar00rootroot00000000000000# GroupProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **access_activity_log** | **bool** | Activity log access privilege. | [optional] | | **access_and_manage_certificates** | **bool** | Privilege for a group to access and manage certificates. | [optional] | | **access_and_manage_dns** | **bool** | Privilege for a group to access and manage dns records. | [optional] | | **access_and_manage_monitoring** | **bool** | 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). | [optional] | | **create_backup_unit** | **bool** | Create backup unit privilege. | [optional] | | **create_data_center** | **bool** | Create data center privilege. | [optional] | | **create_flow_log** | **bool** | Create Flow Logs privilege. | [optional] | | **create_internet_access** | **bool** | Create internet access privilege. | [optional] | | **create_k8s_cluster** | **bool** | Create Kubernetes cluster privilege. | [optional] | | **create_pcc** | **bool** | Create pcc privilege. | [optional] | | **create_snapshot** | **bool** | Create snapshot privilege. | [optional] | | **manage_dbaas** | **bool** | Privilege for a group to manage DBaaS related functionality. | [optional] | | **manage_dataplatform** | **bool** | Privilege for a group to access and manage the Data Platform. | [optional] | | **manage_registry** | **bool** | Privilege for group accessing container registry related functionality. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **reserve_ip** | **bool** | Reserve IP block privilege. | [optional] | | **s3_privilege** | **bool** | S3 privilege. | [optional] | sdk-python-6.1.9/docs/models/GroupShare.md000066400000000000000000000007321454002221500204400ustar00rootroot00000000000000# GroupShare ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**GroupShareProperties**](GroupShareProperties.md) | | | | **type** | [**Type**](Type.md) | resource as generic type | [optional] | sdk-python-6.1.9/docs/models/GroupShareProperties.md000066400000000000000000000004571454002221500225210ustar00rootroot00000000000000# GroupShareProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **edit_privilege** | **bool** | edit privilege on a resource | [optional] | | **share_privilege** | **bool** | share privilege on a resource | [optional] | sdk-python-6.1.9/docs/models/GroupShares.md000066400000000000000000000010321454002221500206150ustar00rootroot00000000000000# GroupShares ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[GroupShare]**](GroupShare.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | Share representing groups and resource relationship | [optional] | sdk-python-6.1.9/docs/models/GroupUsers.md000066400000000000000000000010471454002221500204770ustar00rootroot00000000000000# GroupUsers Collection of the groups the user is a member of. ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Group]**](Group.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/Groups.md000066400000000000000000000007611454002221500176420ustar00rootroot00000000000000# Groups ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Group]**](Group.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/IPFailover.md000066400000000000000000000003271454002221500203610ustar00rootroot00000000000000# IPFailover ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ip** | **str** | | [optional] | | **nic_uuid** | **str** | | [optional] | sdk-python-6.1.9/docs/models/Image.md000066400000000000000000000010761454002221500174050ustar00rootroot00000000000000# Image ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**ImageProperties**](ImageProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ImageProperties.md000066400000000000000000000035771454002221500214720ustar00rootroot00000000000000# ImageProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cloud_init** | **str** | Cloud init compatibility. | [optional] | | **cpu_hot_plug** | **bool** | Hot-plug capable CPU (no reboot required). | [optional] | | **cpu_hot_unplug** | **bool** | Hot-unplug capable CPU (no reboot required). | [optional] | | **description** | **str** | Human-readable description. | [optional] | | **disc_scsi_hot_plug** | **bool** | Hot-plug capable SCSI drive (no reboot required). | [optional] | | **disc_scsi_hot_unplug** | **bool** | Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. | [optional] | | **disc_virtio_hot_plug** | **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | | **disc_virtio_hot_unplug** | **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | | **image_aliases** | **list[str]** | List of image aliases mapped for this image | [optional] [readonly] | | **image_type** | **str** | The image type. | [optional] [readonly] | | **licence_type** | **str** | The OS type of this image. | | | **location** | **str** | The location of this image/snapshot. | [optional] [readonly] | | **name** | **str** | The resource name. | [optional] | | **nic_hot_plug** | **bool** | Hot-plug capable NIC (no reboot required). | [optional] | | **nic_hot_unplug** | **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | | **public** | **bool** | Indicates whether the image is part of a public repository. | [optional] [readonly] | | **ram_hot_plug** | **bool** | Hot-plug capable RAM (no reboot required). | [optional] | | **ram_hot_unplug** | **bool** | Hot-unplug capable RAM (no reboot required). | [optional] | | **size** | **float** | The image size in GB. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Images.md000066400000000000000000000010051454002221500175600ustar00rootroot00000000000000# Images ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Image]**](Image.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Info.md000066400000000000000000000005141454002221500172520ustar00rootroot00000000000000# Info ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The API entry point. | [optional] [readonly] | | **name** | **str** | The API name. | [optional] [readonly] | | **version** | **str** | The API version. | [optional] [readonly] | sdk-python-6.1.9/docs/models/IpBlock.md000066400000000000000000000011041454002221500176760ustar00rootroot00000000000000# IpBlock ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**IpBlockProperties**](IpBlockProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/IpBlockProperties.md000066400000000000000000000012231454002221500217550ustar00rootroot00000000000000# IpBlockProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ip_consumers** | [**list[IpConsumer]**](IpConsumer.md) | Read-Only attribute. Lists consumption detail for an individual IP | [optional] [readonly] | | **ips** | **list[str]** | Collection of IPs, associated with the IP Block. | [optional] [readonly] | | **location** | **str** | Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). | | | **name** | **str** | The name of the resource. | [optional] | | **size** | **int** | The size of the IP block. | | sdk-python-6.1.9/docs/models/IpBlocks.md000066400000000000000000000015461454002221500200730ustar00rootroot00000000000000# IpBlocks ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[IpBlock]**](IpBlock.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | [optional] | | **offset** | **float** | The offset, specified in the request (if not is specified, 0 is used by default). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/IpConsumer.md000066400000000000000000000010461454002221500204440ustar00rootroot00000000000000# IpConsumer ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **datacenter_id** | **str** | | [optional] | | **datacenter_name** | **str** | | [optional] | | **ip** | **str** | | [optional] | | **k8s_cluster_uuid** | **str** | | [optional] | | **k8s_node_pool_uuid** | **str** | | [optional] | | **mac** | **str** | | [optional] | | **nic_id** | **str** | | [optional] | | **server_id** | **str** | | [optional] | | **server_name** | **str** | | [optional] | sdk-python-6.1.9/docs/models/KubernetesAutoScaling.md000066400000000000000000000010561454002221500226220ustar00rootroot00000000000000# KubernetesAutoScaling ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **max_node_count** | **int** | 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. | | | **min_node_count** | **int** | The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. | | sdk-python-6.1.9/docs/models/KubernetesCluster.md000066400000000000000000000012501454002221500220260ustar00rootroot00000000000000# KubernetesCluster ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesClusterProperties**](KubernetesClusterProperties.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesClusterEntities.md000066400000000000000000000003531454002221500235360ustar00rootroot00000000000000# KubernetesClusterEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **nodepools** | [**KubernetesNodePools**](KubernetesNodePools.md) | | [optional] | sdk-python-6.1.9/docs/models/KubernetesClusterForPost.md000066400000000000000000000012751454002221500233520ustar00rootroot00000000000000# KubernetesClusterForPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesClusterPropertiesForPost**](KubernetesClusterPropertiesForPost.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesClusterForPut.md000066400000000000000000000012771454002221500231770ustar00rootroot00000000000000# KubernetesClusterForPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesClusterPropertiesForPut**](KubernetesClusterPropertiesForPut.md) | | | | **type** | **str** | The type of object. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesClusterProperties.md000066400000000000000000000047511454002221500241140ustar00rootroot00000000000000# KubernetesClusterProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **api_subnet_allow_list** | **list[str]** | 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. | [optional] | | **available_upgrade_versions** | **list[str]** | List of available versions for upgrading the cluster | [optional] | | **k8s_version** | **str** | 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. | [optional] | | **location** | **str** | 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. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | | | **nat_gateway_ip** | **str** | 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. | [optional] | | **node_subnet** | **str** | 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. | [optional] | | **public** | **bool** | The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. | [optional] [default to True] | | **s3_buckets** | [**list[S3Bucket]**](S3Bucket.md) | List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs | [optional] | | **viable_node_pool_versions** | **list[str]** | List of versions that may be used for node pools under this cluster | [optional] | sdk-python-6.1.9/docs/models/KubernetesClusterPropertiesForPost.md000066400000000000000000000042531454002221500254260ustar00rootroot00000000000000# KubernetesClusterPropertiesForPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **api_subnet_allow_list** | **list[str]** | 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. | [optional] | | **k8s_version** | **str** | 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. | [optional] | | **location** | **str** | This attribute is mandatory if the cluster is private. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | | | **nat_gateway_ip** | **str** | 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. | [optional] | | **node_subnet** | **str** | 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. | [optional] | | **public** | **bool** | The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. | [optional] [default to True] | | **s3_buckets** | [**list[S3Bucket]**](S3Bucket.md) | List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. | [optional] | sdk-python-6.1.9/docs/models/KubernetesClusterPropertiesForPut.md000066400000000000000000000024631454002221500252520ustar00rootroot00000000000000# KubernetesClusterPropertiesForPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **api_subnet_allow_list** | **list[str]** | 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. | [optional] | | **k8s_version** | **str** | 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. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | | | **s3_buckets** | [**list[S3Bucket]**](S3Bucket.md) | List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. | [optional] | sdk-python-6.1.9/docs/models/KubernetesClusters.md000066400000000000000000000011211454002221500222060ustar00rootroot00000000000000# KubernetesClusters ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the collection representation (absolute path). | [optional] [readonly] | | **id** | **str** | The unique representation of the K8s cluster as a resource collection. | [optional] [readonly] | | **items** | [**list[KubernetesCluster]**](KubernetesCluster.md) | Array of K8s clusters in the collection. | [optional] [readonly] | | **type** | **str** | The resource type within a collection. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesMaintenanceWindow.md000066400000000000000000000006171454002221500240250ustar00rootroot00000000000000# KubernetesMaintenanceWindow ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **day_of_the_week** | **str** | The weekday for a maintenance window. | | | **time** | **str** | 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. | | sdk-python-6.1.9/docs/models/KubernetesNode.md000066400000000000000000000010751454002221500212770ustar00rootroot00000000000000# KubernetesNode ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**KubernetesNodeMetadata**](KubernetesNodeMetadata.md) | | [optional] | | **properties** | [**KubernetesNodeProperties**](KubernetesNodeProperties.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodeMetadata.md000066400000000000000000000014761454002221500227450ustar00rootroot00000000000000# KubernetesNodeMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_date** | **datetime** | The date the resource was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | | **last_modified_date** | **datetime** | The date the resource was last modified. | [optional] [readonly] | | **last_software_updated_date** | **datetime** | The date when the software on the node was last updated. | [optional] [readonly] | | **state** | **str** | The resource state. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodePool.md000066400000000000000000000011171454002221500221260ustar00rootroot00000000000000# KubernetesNodePool ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesNodePoolProperties**](KubernetesNodePoolProperties.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodePoolForPost.md000066400000000000000000000011441454002221500234430ustar00rootroot00000000000000# KubernetesNodePoolForPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesNodePoolPropertiesForPost**](KubernetesNodePoolPropertiesForPost.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodePoolForPut.md000066400000000000000000000011411454002221500232630ustar00rootroot00000000000000# KubernetesNodePoolForPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**KubernetesNodePoolPropertiesForPut**](KubernetesNodePoolPropertiesForPut.md) | | | | **type** | **str** | The object type. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodePoolLan.md000066400000000000000000000011531454002221500225610ustar00rootroot00000000000000# KubernetesNodePoolLan ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **datacenter_id** | **str** | The datacenter ID, requires system privileges, for internal usage only | [optional] | | **dhcp** | **bool** | Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. | [optional] | | **id** | **int** | The LAN ID of an existing LAN at the related data center | | | **routes** | [**list[KubernetesNodePoolLanRoutes]**](KubernetesNodePoolLanRoutes.md) | The array of additional LANs attached to worker nodes. | [optional] | sdk-python-6.1.9/docs/models/KubernetesNodePoolLanRoutes.md000066400000000000000000000005061454002221500237640ustar00rootroot00000000000000# KubernetesNodePoolLanRoutes ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **gateway_ip** | **str** | IPv4 or IPv6 Gateway IP for the route. | [optional] | | **network** | **str** | IPv4 or IPv6 CIDR to be routed via the interface. | [optional] | sdk-python-6.1.9/docs/models/KubernetesNodePoolProperties.md000066400000000000000000000052641454002221500242120ustar00rootroot00000000000000# KubernetesNodePoolProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **annotations** | **dict(str, str)** | The annotations attached to the node pool. | [optional] | | **auto_scaling** | [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | | **availability_zone** | **str** | The availability zone in which the target VM should be provisioned. | | | **available_upgrade_versions** | **list[str]** | The list of available versions for upgrading the node pool. | [optional] | | **cores_count** | **int** | The total number of cores for the nodes. | | | **cpu_family** | **str** | The CPU type for the nodes. | | | **datacenter_id** | **str** | 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. | | | **k8s_version** | **str** | 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. | [optional] | | **labels** | **dict(str, str)** | The labels attached to the node pool. | [optional] | | **lans** | [**list[KubernetesNodePoolLan]**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | | | **node_count** | **int** | The number of worker nodes of the node pool. | | | **public_ips** | **list[str]** | 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. | [optional] | | **ram_size** | **int** | The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. | | | **storage_size** | **int** | 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. | | | **storage_type** | **str** | The storage type for the nodes. | | sdk-python-6.1.9/docs/models/KubernetesNodePoolPropertiesForPost.md000066400000000000000000000050741454002221500255260ustar00rootroot00000000000000# KubernetesNodePoolPropertiesForPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **annotations** | **dict(str, str)** | The annotations attached to the node pool. | [optional] | | **auto_scaling** | [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | | **availability_zone** | **str** | The availability zone in which the target VM should be provisioned. | | | **cores_count** | **int** | The total number of cores for the nodes. | | | **cpu_family** | **str** | The CPU type for the nodes. | | | **datacenter_id** | **str** | 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. | | | **k8s_version** | **str** | 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. | [optional] | | **labels** | **dict(str, str)** | The labels attached to the node pool. | [optional] | | **lans** | [**list[KubernetesNodePoolLan]**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | | | **node_count** | **int** | The number of worker nodes of the node pool. | | | **public_ips** | **list[str]** | 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. | [optional] | | **ram_size** | **int** | The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. | | | **storage_size** | **int** | 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. | | | **storage_type** | **str** | The storage type for the nodes. | | sdk-python-6.1.9/docs/models/KubernetesNodePoolPropertiesForPut.md000066400000000000000000000033451454002221500253500ustar00rootroot00000000000000# KubernetesNodePoolPropertiesForPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **annotations** | **dict(str, str)** | The annotations attached to the node pool. | [optional] | | **auto_scaling** | [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | | **k8s_version** | **str** | 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. | [optional] | | **labels** | **dict(str, str)** | The labels attached to the node pool. | [optional] | | **lans** | [**list[KubernetesNodePoolLan]**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | | **maintenance_window** | [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | | **name** | **str** | 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. | [optional] | | **node_count** | **int** | The number of worker nodes of the node pool. | | | **public_ips** | **list[str]** | 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. | [optional] | sdk-python-6.1.9/docs/models/KubernetesNodePools.md000066400000000000000000000011241454002221500223070ustar00rootroot00000000000000# KubernetesNodePools ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the collection representation (absolute path). | [optional] [readonly] | | **id** | **str** | A unique representation of the Kubernetes node pool as a resource collection. | [optional] [readonly] | | **items** | [**list[KubernetesNodePool]**](KubernetesNodePool.md) | Array of items in the collection. | [optional] [readonly] | | **type** | **str** | The resource type within a collection. | [optional] [readonly] | sdk-python-6.1.9/docs/models/KubernetesNodeProperties.md000066400000000000000000000012111454002221500233440ustar00rootroot00000000000000# KubernetesNodeProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **k8s_version** | **str** | 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. | | | **name** | **str** | The Kubernetes node name. | | | **private_ip** | **str** | The private IP associated with the node. | [optional] | | **public_ip** | **str** | The public IP associated with the node. | [optional] | sdk-python-6.1.9/docs/models/KubernetesNodes.md000066400000000000000000000011101454002221500214500ustar00rootroot00000000000000# KubernetesNodes ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the collection representation (absolute path). | [optional] [readonly] | | **id** | **str** | A unique representation of the Kubernetes node pool as a resource collection. | [optional] [readonly] | | **items** | [**list[KubernetesNode]**](KubernetesNode.md) | Array of items in the collection. | [optional] [readonly] | | **type** | **str** | The resource type within a collection. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Label.md000066400000000000000000000010531454002221500173750ustar00rootroot00000000000000# Label ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | Label is identified using standard URN. | [optional] [readonly] | | **metadata** | [**NoStateMetaData**](NoStateMetaData.md) | | [optional] | | **properties** | [**LabelProperties**](LabelProperties.md) | | | | **type** | **str** | The type of object that has been created. | [optional] [readonly] | sdk-python-6.1.9/docs/models/LabelProperties.md000066400000000000000000000010231454002221500214470ustar00rootroot00000000000000# LabelProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **key** | **str** | A label key | [optional] | | **resource_href** | **str** | URL to the Resource (absolute path) on which the label is applied. | [optional] | | **resource_id** | **str** | The ID of the resource. | [optional] | | **resource_type** | **str** | The type of the resource on which the label is applied. | [optional] | | **value** | **str** | A label value | [optional] | sdk-python-6.1.9/docs/models/LabelResource.md000066400000000000000000000011161454002221500211050ustar00rootroot00000000000000# LabelResource ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | Label on a resource is identified using label key. | [optional] [readonly] | | **metadata** | [**NoStateMetaData**](NoStateMetaData.md) | | [optional] | | **properties** | [**LabelResourceProperties**](LabelResourceProperties.md) | | | | **type** | **str** | The type of object that has been created. | [optional] [readonly] | sdk-python-6.1.9/docs/models/LabelResourceProperties.md000066400000000000000000000003721454002221500231650ustar00rootroot00000000000000# LabelResourceProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **key** | **str** | A label key | [optional] | | **value** | **str** | A label value | [optional] | sdk-python-6.1.9/docs/models/LabelResources.md000066400000000000000000000014501454002221500212710ustar00rootroot00000000000000# LabelResources ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the collection representation (absolute path). | [optional] [readonly] | | **id** | **str** | A unique representation of the label as a resource collection. | [optional] [readonly] | | **items** | [**list[LabelResource]**](LabelResource.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | **str** | The type of resource within a collection. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Labels.md000066400000000000000000000010351454002221500175600ustar00rootroot00000000000000# Labels ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the collection representation (absolute path). | [optional] [readonly] | | **id** | **str** | A unique representation of the label as a resource collection. | [optional] [readonly] | | **items** | [**list[Label]**](Label.md) | Array of items in the collection. | [optional] [readonly] | | **type** | **str** | The type of resource within a collection. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Lan.md000066400000000000000000000011761454002221500170760ustar00rootroot00000000000000# Lan ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**LanEntities**](LanEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**LanProperties**](LanProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/LanEntities.md000066400000000000000000000003001454002221500205670ustar00rootroot00000000000000# LanEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **nics** | [**LanNics**](LanNics.md) | | [optional] | sdk-python-6.1.9/docs/models/LanNics.md000066400000000000000000000013611454002221500177070ustar00rootroot00000000000000# LanNics ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Nic]**](Nic.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/LanPost.md000066400000000000000000000012121454002221500177330ustar00rootroot00000000000000# LanPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**LanEntities**](LanEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**LanPropertiesPost**](LanPropertiesPost.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/LanProperties.md000066400000000000000000000025761454002221500211600ustar00rootroot00000000000000# LanProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ip_failover** | [**list[IPFailover]**](IPFailover.md) | IP failover configurations for lan | [optional] | | **ipv6_cidr_block** | **str** | 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. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **pcc** | **str** | The unique identifier of the private Cross-Connect the LAN is connected to, if any. | [optional] | | **public** | **bool** | This LAN faces the public Internet. | [optional] | sdk-python-6.1.9/docs/models/LanPropertiesPost.md000066400000000000000000000024221454002221500220140ustar00rootroot00000000000000# LanPropertiesPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ip_failover** | [**list[IPFailover]**](IPFailover.md) | IP failover configurations for lan | [optional] | | **ipv6_cidr_block** | **str** | 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. If you choose the IPv6 CIDR block 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 NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **pcc** | **str** | The unique identifier of the private Cross-Connect the LAN is connected to, if any. | [optional] | | **public** | **bool** | This LAN faces the public Internet. | [optional] | sdk-python-6.1.9/docs/models/Lans.md000066400000000000000000000013561454002221500172610ustar00rootroot00000000000000# Lans ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Lan]**](Lan.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Loadbalancer.md000066400000000000000000000012531454002221500207270ustar00rootroot00000000000000# Loadbalancer ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**LoadbalancerEntities**](LoadbalancerEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**LoadbalancerProperties**](LoadbalancerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/LoadbalancerEntities.md000066400000000000000000000003331454002221500224320ustar00rootroot00000000000000# LoadbalancerEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **balancednics** | [**BalancedNics**](BalancedNics.md) | | [optional] | sdk-python-6.1.9/docs/models/LoadbalancerProperties.md000066400000000000000000000007301454002221500230030ustar00rootroot00000000000000# LoadbalancerProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **dhcp** | **bool** | Indicates if the loadbalancer will reserve an IP using DHCP. | [optional] | | **ip** | **str** | IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. | [optional] | | **name** | **str** | The name of the resource. | [optional] | sdk-python-6.1.9/docs/models/Loadbalancers.md000066400000000000000000000014111454002221500211060ustar00rootroot00000000000000# Loadbalancers ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Loadbalancer]**](Loadbalancer.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Location.md000066400000000000000000000011071454002221500201260ustar00rootroot00000000000000# Location ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**LocationProperties**](LocationProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/LocationProperties.md000066400000000000000000000011561454002221500222070ustar00rootroot00000000000000# LocationProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cpu_architecture** | [**list[CpuArchitectureProperties]**](CpuArchitectureProperties.md) | A list of available CPU types and related resources available in the location. | [optional] [readonly] | | **features** | **list[str]** | A list of available features in the location. | [optional] [readonly] | | **image_aliases** | **list[str]** | A list of image aliases available in the location. | [optional] [readonly] | | **name** | **str** | The location name. | [optional] | sdk-python-6.1.9/docs/models/Locations.md000066400000000000000000000010121454002221500203040ustar00rootroot00000000000000# Locations ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Location]**](Location.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGateway.md000066400000000000000000000012411454002221500204210ustar00rootroot00000000000000# NatGateway ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**NatGatewayEntities**](NatGatewayEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**NatGatewayProperties**](NatGatewayProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGatewayEntities.md000066400000000000000000000004301454002221500221250ustar00rootroot00000000000000# NatGatewayEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **flowlogs** | [**FlowLogs**](FlowLogs.md) | | [optional] | | **rules** | [**NatGatewayRules**](NatGatewayRules.md) | | [optional] | sdk-python-6.1.9/docs/models/NatGatewayLanProperties.md000066400000000000000000000006531454002221500231370ustar00rootroot00000000000000# NatGatewayLanProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **gateway_ips** | **list[str]** | 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 | [optional] | | **id** | **int** | Id for the LAN connected to the NAT Gateway | | sdk-python-6.1.9/docs/models/NatGatewayProperties.md000066400000000000000000000011311454002221500224740ustar00rootroot00000000000000# NatGatewayProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **lans** | [**list[NatGatewayLanProperties]**](NatGatewayLanProperties.md) | 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. | [optional] | | **name** | **str** | Name of the NAT Gateway. | | | **public_ips** | **list[str]** | Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. | | sdk-python-6.1.9/docs/models/NatGatewayPut.md000066400000000000000000000007561454002221500211240ustar00rootroot00000000000000# NatGatewayPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**NatGatewayProperties**](NatGatewayProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGatewayRule.md000066400000000000000000000011311454002221500212470ustar00rootroot00000000000000# NatGatewayRule ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**NatGatewayRuleProperties**](NatGatewayRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGatewayRuleProperties.md000066400000000000000000000024751454002221500233400ustar00rootroot00000000000000# NatGatewayRuleProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **name** | **str** | The name of the NAT Gateway rule. | | | **protocol** | [**NatGatewayRuleProtocol**](NatGatewayRuleProtocol.md) | Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. | [optional] | | **public_ip** | **str** | 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 | | | **source_subnet** | **str** | 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. | | | **target_port_range** | [**TargetPortRange**](TargetPortRange.md) | | [optional] | | **target_subnet** | **str** | 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. | [optional] | | **type** | [**NatGatewayRuleType**](NatGatewayRuleType.md) | Type of the NAT Gateway rule. | [optional] | sdk-python-6.1.9/docs/models/NatGatewayRuleProtocol.md000066400000000000000000000002211454002221500227700ustar00rootroot00000000000000# NatGatewayRuleProtocol ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | sdk-python-6.1.9/docs/models/NatGatewayRulePut.md000066400000000000000000000007721454002221500217520ustar00rootroot00000000000000# NatGatewayRulePut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**NatGatewayRuleProperties**](NatGatewayRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGatewayRuleType.md000066400000000000000000000002151454002221500221130ustar00rootroot00000000000000# NatGatewayRuleType ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | sdk-python-6.1.9/docs/models/NatGatewayRules.md000066400000000000000000000010341454002221500214340ustar00rootroot00000000000000# NatGatewayRules ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[NatGatewayRule]**](NatGatewayRule.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NatGateways.md000066400000000000000000000014031454002221500206040ustar00rootroot00000000000000# NatGateways ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[NatGateway]**](NatGateway.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancer.md000066400000000000000000000013161454002221500222410ustar00rootroot00000000000000# NetworkLoadBalancer ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**NetworkLoadBalancerEntities**](NetworkLoadBalancerEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**NetworkLoadBalancerProperties**](NetworkLoadBalancerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerEntities.md000066400000000000000000000005211454002221500237430ustar00rootroot00000000000000# NetworkLoadBalancerEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **flowlogs** | [**FlowLogs**](FlowLogs.md) | | [optional] | | **forwardingrules** | [**NetworkLoadBalancerForwardingRules**](NetworkLoadBalancerForwardingRules.md) | | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRule.md000066400000000000000000000012221454002221500251100ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRule ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**NetworkLoadBalancerForwardingRuleProperties**](NetworkLoadBalancerForwardingRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRuleHealthCheck.md000066400000000000000000000015221454002221500271770ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleHealthCheck ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **client_timeout** | **int** | The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). | [optional] | | **connect_timeout** | **int** | The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). | [optional] | | **retries** | **int** | 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. | [optional] | | **target_timeout** | **int** | The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRuleProperties.md000066400000000000000000000014421454002221500271710ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **algorithm** | **str** | Balancing algorithm | | | **health_check** | [**NetworkLoadBalancerForwardingRuleHealthCheck**](NetworkLoadBalancerForwardingRuleHealthCheck.md) | | [optional] | | **listener_ip** | **str** | Listening (inbound) IP. | | | **listener_port** | **int** | Listening (inbound) port number; valid range is 1 to 65535. | | | **name** | **str** | The name of the Network Load Balancer forwarding rule. | | | **protocol** | **str** | Balancing protocol | | | **targets** | [**list[NetworkLoadBalancerForwardingRuleTarget]**](NetworkLoadBalancerForwardingRuleTarget.md) | Array of items in the collection. | | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRulePut.md000066400000000000000000000010631454002221500256040ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRulePut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**NetworkLoadBalancerForwardingRuleProperties**](NetworkLoadBalancerForwardingRuleProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRuleTarget.md000066400000000000000000000020071454002221500262610ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleTarget ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **health_check** | [**NetworkLoadBalancerForwardingRuleTargetHealthCheck**](NetworkLoadBalancerForwardingRuleTargetHealthCheck.md) | | [optional] | | **ip** | **str** | The IP of the balanced target VM. | | | **port** | **int** | The port of the balanced target service; valid range is 1 to 65535. | | | **weight** | **int** | 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. | | | **proxy_protocol** | **str** | ProxyProtocol is used to set the proxy protocol version. | [optional] [default to 'none'] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck.md000066400000000000000000000013041454002221500303440ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleTargetHealthCheck ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **check** | **bool** | 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. | [optional] | | **check_interval** | **int** | The interval in milliseconds between consecutive health checks; default is 2000. | [optional] | | **maintenance** | **bool** | Maintenance mode prevents the target from receiving balanced traffic. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerForwardingRules.md000066400000000000000000000015101454002221500252730ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRules ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[NetworkLoadBalancerForwardingRule]**](NetworkLoadBalancerForwardingRule.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancerProperties.md000066400000000000000000000015401454002221500243150ustar00rootroot00000000000000# NetworkLoadBalancerProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **ips** | **list[str]** | 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. | [optional] | | **lb_private_ips** | **list[str]** | 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. | [optional] | | **listener_lan** | **int** | ID of the listening LAN (inbound). | | | **name** | **str** | The name of the Network Load Balancer. | | | **target_lan** | **int** | ID of the balanced private target LAN (outbound). | | sdk-python-6.1.9/docs/models/NetworkLoadBalancerPut.md000066400000000000000000000010111454002221500227220ustar00rootroot00000000000000# NetworkLoadBalancerPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**NetworkLoadBalancerProperties**](NetworkLoadBalancerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NetworkLoadBalancers.md000066400000000000000000000014361454002221500224270ustar00rootroot00000000000000# NetworkLoadBalancers ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[NetworkLoadBalancer]**](NetworkLoadBalancer.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Nic.md000066400000000000000000000011761454002221500170750ustar00rootroot00000000000000# Nic ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**NicEntities**](NicEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**NicProperties**](NicProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NicEntities.md000066400000000000000000000004251454002221500205760ustar00rootroot00000000000000# NicEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **firewallrules** | [**FirewallRules**](FirewallRules.md) | | [optional] | | **flowlogs** | [**FlowLogs**](FlowLogs.md) | | [optional] | sdk-python-6.1.9/docs/models/NicProperties.md000066400000000000000000000060321454002221500211460ustar00rootroot00000000000000# NicProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **device_number** | **int** | 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. | [optional] [readonly] | | **dhcp** | **bool** | Indicates if the NIC will reserve an IP using DHCP. | [optional] [default to True] | | **dhcpv6** | **bool** | 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. | [optional] | | **firewall_active** | **bool** | 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. | [optional] | | **firewall_type** | **str** | The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. | [optional] | | **ips** | **list[str]** | 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. | [optional] | | **ipv6_cidr_block** | **str** | 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. | [optional] | | **ipv6_ips** | **list[str]** | 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. | [optional] | | **lan** | **int** | The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. | | | **mac** | **str** | The MAC address of the NIC. | [optional] [readonly] | | **name** | **str** | The name of the resource. | [optional] | | **pci_slot** | **int** | The PCI slot number for the NIC. | [optional] [readonly] | sdk-python-6.1.9/docs/models/NicPut.md000066400000000000000000000007311454002221500175620ustar00rootroot00000000000000# NicPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**NicProperties**](NicProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Nics.md000066400000000000000000000013431454002221500172540ustar00rootroot00000000000000# Nics ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Nic]**](Nic.md) | Array of items in the collection. | [optional] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/NoStateMetaData.md000066400000000000000000000020471454002221500213400ustar00rootroot00000000000000# NoStateMetaData ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_by** | **str** | The user who has created the resource. | [optional] [readonly] | | **created_by_user_id** | **str** | The unique ID of the user who created the resource. | [optional] [readonly] | | **created_date** | **datetime** | The time when the resource was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | | **last_modified_by** | **str** | The user who last modified the resource. | [optional] [readonly] | | **last_modified_by_user_id** | **str** | The unique ID of the user who last modified the resource. | [optional] [readonly] | | **last_modified_date** | **datetime** | The last time the resource was modified. | [optional] [readonly] | sdk-python-6.1.9/docs/models/PaginationLinks.md000066400000000000000000000011071454002221500214500ustar00rootroot00000000000000# PaginationLinks ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **next** | **str** | URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. | [optional] [readonly] | | **prev** | **str** | URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. | [optional] [readonly] | | **_self** | **str** | URL (with offset and limit parameters) of the current page. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Peer.md000066400000000000000000000005351454002221500172550ustar00rootroot00000000000000# Peer ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **datacenter_id** | **str** | | [optional] | | **datacenter_name** | **str** | | [optional] | | **id** | **str** | | [optional] | | **location** | **str** | | [optional] | | **name** | **str** | | [optional] | sdk-python-6.1.9/docs/models/PrivateCrossConnect.md000066400000000000000000000011501454002221500223120ustar00rootroot00000000000000# PrivateCrossConnect ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**PrivateCrossConnectProperties**](PrivateCrossConnectProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/PrivateCrossConnectProperties.md000066400000000000000000000012071454002221500243720ustar00rootroot00000000000000# PrivateCrossConnectProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **connectable_datacenters** | [**list[ConnectableDatacenter]**](ConnectableDatacenter.md) | Read-Only attribute. Lists data centers that can be joined to this private Cross-Connect. | [optional] [readonly] | | **description** | **str** | Human-readable description. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **peers** | [**list[Peer]**](Peer.md) | Read-Only attribute. Lists LAN's joined to this private Cross-Connect. | [optional] [readonly] | sdk-python-6.1.9/docs/models/PrivateCrossConnects.md000066400000000000000000000010531454002221500224770ustar00rootroot00000000000000# PrivateCrossConnects ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[PrivateCrossConnect]**](PrivateCrossConnect.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/RemoteConsoleUrl.md000066400000000000000000000003711454002221500216210ustar00rootroot00000000000000# RemoteConsoleUrl ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **url** | **str** | The remote console url with the jwToken parameter for access | [optional] [readonly] | sdk-python-6.1.9/docs/models/Request.md000066400000000000000000000010601454002221500200040ustar00rootroot00000000000000# Request ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**RequestMetadata**](RequestMetadata.md) | | [optional] | | **properties** | [**RequestProperties**](RequestProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/RequestMetadata.md000066400000000000000000000012521454002221500214500ustar00rootroot00000000000000# RequestMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_by** | **str** | The user who created the resource. | [optional] [readonly] | | **created_date** | **datetime** | The last time the resource was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | | **request_status** | [**RequestStatus**](RequestStatus.md) | | [optional] | sdk-python-6.1.9/docs/models/RequestProperties.md000066400000000000000000000004731454002221500220700ustar00rootroot00000000000000# RequestProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **body** | **str** | | [optional] | | **headers** | **dict(str, str)** | | [optional] | | **method** | **str** | | [optional] | | **url** | **str** | | [optional] | sdk-python-6.1.9/docs/models/RequestStatus.md000066400000000000000000000007711454002221500212200ustar00rootroot00000000000000# RequestStatus ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**RequestStatusMetadata**](RequestStatusMetadata.md) | | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/RequestStatusMetadata.md000066400000000000000000000011021454002221500226460ustar00rootroot00000000000000# RequestStatusMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **etag** | **str** | 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. | [optional] [readonly] | | **message** | **str** | | [optional] | | **status** | **str** | | [optional] | | **targets** | [**list[RequestTarget]**](RequestTarget.md) | | [optional] | sdk-python-6.1.9/docs/models/RequestTarget.md000066400000000000000000000004021454002221500211520ustar00rootroot00000000000000# RequestTarget ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **status** | **str** | | [optional] | | **target** | [**ResourceReference**](ResourceReference.md) | | [optional] | sdk-python-6.1.9/docs/models/Requests.md000066400000000000000000000015051454002221500201730ustar00rootroot00000000000000# Requests ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Request]**](Request.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | | | **offset** | **float** | The offset, specified in the request (if not is specified, 0 is used by default). | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Resource.md000066400000000000000000000012651454002221500201520ustar00rootroot00000000000000# Resource datacenter resource representation ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**ResourceEntities**](ResourceEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**ResourceProperties**](ResourceProperties.md) | | [optional] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/ResourceEntities.md000066400000000000000000000003251454002221500216530ustar00rootroot00000000000000# ResourceEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **groups** | [**ResourceGroups**](ResourceGroups.md) | | [optional] | sdk-python-6.1.9/docs/models/ResourceGroups.md000066400000000000000000000010411454002221500213420ustar00rootroot00000000000000# ResourceGroups Resources assigned to this group. ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Resource]**](Resource.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/ResourceLimits.md000066400000000000000000000046711454002221500213400ustar00rootroot00000000000000# ResourceLimits ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cores_per_contract** | **int** | The maximum number of CPU cores per contract. | | | **cores_per_server** | **int** | The maximum number of CPU cores per server. | | | **cores_provisioned** | **int** | The number of CPU cores provisioned. | | | **das_volume_provisioned** | **int** | The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. | | | **hdd_limit_per_contract** | **int** | The maximum amount of disk space (in MB) that can be provided under this contract. | | | **hdd_limit_per_volume** | **int** | The maximum size (in MB) of an idividual hard disk volume. | | | **hdd_volume_provisioned** | **int** | The amount of hard disk space (in MB) that is currently provisioned. | | | **k8s_cluster_limit_total** | **int** | The maximum number of Kubernetes clusters that can be created under this contract. | | | **k8s_clusters_provisioned** | **int** | The amount of Kubernetes clusters that is currently provisioned. | | | **nat_gateway_limit_total** | **int** | The NAT Gateway total limit. | | | **nat_gateway_provisioned** | **int** | The NAT Gateways provisioned. | | | **nlb_limit_total** | **int** | The NLB total limit. | | | **nlb_provisioned** | **int** | The NLBs provisioned. | | | **ram_per_contract** | **int** | The maximum amount of RAM (in MB) that can be provisioned under this contract. | | | **ram_per_server** | **int** | The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. | | | **ram_provisioned** | **int** | The amount of RAM (in MB) provisioned under this contract. | | | **reservable_ips** | **int** | The maximum number of static public IP addresses that can be reserved by this customer across contracts. | | | **reserved_ips_in_use** | **int** | The number of static public IP addresses in use. | | | **reserved_ips_on_contract** | **int** | The maximum number of static public IP addresses that can be reserved for this contract. | | | **ssd_limit_per_contract** | **int** | The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. | | | **ssd_limit_per_volume** | **int** | The maximum size (in MB) of an individual solid state disk volume. | | | **ssd_volume_provisioned** | **int** | The amount of solid state disk space (in MB) that is currently provisioned. | | sdk-python-6.1.9/docs/models/ResourceProperties.md000066400000000000000000000011101454002221500222140ustar00rootroot00000000000000# ResourceProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **name** | **str** | The name of the resource. | [optional] | | **sec_auth_protection** | **bool** | 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. | [optional] | sdk-python-6.1.9/docs/models/ResourceReference.md000066400000000000000000000006151454002221500217670ustar00rootroot00000000000000# ResourceReference ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Resources.md000066400000000000000000000010401454002221500203240ustar00rootroot00000000000000# Resources Collection to represent the resource. ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Resource]**](Resource.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/ResourcesUsers.md000066400000000000000000000010321454002221500213470ustar00rootroot00000000000000# ResourcesUsers Resources owned by a user. ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Resource]**](Resource.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/S3Bucket.md000066400000000000000000000002721454002221500200030ustar00rootroot00000000000000# S3Bucket ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **name** | **str** | The name of the S3 bucket. | | sdk-python-6.1.9/docs/models/S3Key.md000066400000000000000000000010261454002221500173140ustar00rootroot00000000000000# S3Key ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**S3KeyMetadata**](S3KeyMetadata.md) | | [optional] | | **properties** | [**S3KeyProperties**](S3KeyProperties.md) | | | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/S3KeyMetadata.md000066400000000000000000000007731454002221500207650ustar00rootroot00000000000000# S3KeyMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_date** | **datetime** | The time when the S3 key was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | sdk-python-6.1.9/docs/models/S3KeyProperties.md000066400000000000000000000004501454002221500213710ustar00rootroot00000000000000# S3KeyProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **active** | **bool** | Denotes weather the S3 key is active. | [optional] | | **secret_key** | **str** | Secret of the S3 key. | [optional] [readonly] | sdk-python-6.1.9/docs/models/S3Keys.md000066400000000000000000000007611454002221500175040ustar00rootroot00000000000000# S3Keys ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[S3Key]**](S3Key.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of the resource. | [optional] | sdk-python-6.1.9/docs/models/S3ObjectStorageSSO.md000066400000000000000000000003531454002221500217060ustar00rootroot00000000000000# S3ObjectStorageSSO ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **sso_url** | **str** | The S3 object storage single sign on url | [optional] [readonly] | sdk-python-6.1.9/docs/models/Server.md000066400000000000000000000012151454002221500176240ustar00rootroot00000000000000# Server ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**ServerEntities**](ServerEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**ServerProperties**](ServerProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/ServerEntities.md000066400000000000000000000005041454002221500213310ustar00rootroot00000000000000# ServerEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cdroms** | [**Cdroms**](Cdroms.md) | | [optional] | | **nics** | [**Nics**](Nics.md) | | [optional] | | **volumes** | [**AttachedVolumes**](AttachedVolumes.md) | | [optional] | sdk-python-6.1.9/docs/models/ServerProperties.md000066400000000000000000000030771454002221500217110ustar00rootroot00000000000000# ServerProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **availability_zone** | **str** | The availability zone in which the server should be provisioned. | [optional] | | **boot_cdrom** | [**ResourceReference**](ResourceReference.md) | | [optional] | | **boot_volume** | [**ResourceReference**](ResourceReference.md) | | [optional] | | **cores** | **int** | The total number of cores for the enterprise server. | [optional] | | **cpu_family** | **str** | 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 servers. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **ram** | **int** | 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. | [optional] | | **template_uuid** | **str** | The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. | [optional] | | **type** | **str** | Server type: CUBE or ENTERPRISE. | [optional] | | **vm_state** | **str** | Status of the virtual machine. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Servers.md000066400000000000000000000013671454002221500200170ustar00rootroot00000000000000# Servers ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Server]**](Server.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Snapshot.md000066400000000000000000000011071454002221500201550ustar00rootroot00000000000000# Snapshot ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**SnapshotProperties**](SnapshotProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/SnapshotProperties.md000066400000000000000000000033361454002221500222400ustar00rootroot00000000000000# SnapshotProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cpu_hot_plug** | **bool** | Hot-plug capable CPU (no reboot required). | [optional] | | **cpu_hot_unplug** | **bool** | Hot-unplug capable CPU (no reboot required). | [optional] | | **description** | **str** | Human-readable description. | [optional] | | **disc_scsi_hot_plug** | **bool** | Hot-plug capable SCSI drive (no reboot required). | [optional] | | **disc_scsi_hot_unplug** | **bool** | Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. | [optional] | | **disc_virtio_hot_plug** | **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | | **disc_virtio_hot_unplug** | **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | | **licence_type** | **str** | OS type of this snapshot | [optional] | | **location** | **str** | Location of that image/snapshot. | [optional] [readonly] | | **name** | **str** | The name of the resource. | [optional] | | **nic_hot_plug** | **bool** | Hot-plug capable NIC (no reboot required). | [optional] | | **nic_hot_unplug** | **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | | **ram_hot_plug** | **bool** | Hot-plug capable RAM (no reboot required). | [optional] | | **ram_hot_unplug** | **bool** | Hot-unplug capable RAM (no reboot required). | [optional] | | **sec_auth_protection** | **bool** | Boolean value representing if the snapshot requires extra protection, such as two-step verification. | [optional] | | **size** | **float** | The size of the image in GB. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Snapshots.md000066400000000000000000000010121454002221500203330ustar00rootroot00000000000000# Snapshots ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Snapshot]**](Snapshot.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/TargetGroup.md000066400000000000000000000011241454002221500206200ustar00rootroot00000000000000# TargetGroup ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**TargetGroupProperties**](TargetGroupProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/TargetGroupHealthCheck.md000066400000000000000000000013621454002221500227100ustar00rootroot00000000000000# TargetGroupHealthCheck ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **check_interval** | **int** | The interval in milliseconds between consecutive health checks; the default value is '2000'. | [optional] | | **check_timeout** | **int** | 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. | [optional] | | **retries** | **int** | 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'. | [optional] | sdk-python-6.1.9/docs/models/TargetGroupHttpHealthCheck.md000066400000000000000000000017511454002221500235520ustar00rootroot00000000000000# TargetGroupHttpHealthCheck ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **match_type** | **str** | Specify the target's response type to match ALB's request. | | | **method** | **str** | The method used for the health check request. | [optional] | | **negate** | **bool** | Specifies whether to negate an individual entry; the default value is 'FALSE'. | [optional] | | **path** | **str** | The destination URL for HTTP the health check; the default is '/'. | [optional] | | **regex** | **bool** | 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. | [optional] | | **response** | **str** | The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. | | sdk-python-6.1.9/docs/models/TargetGroupProperties.md000066400000000000000000000021761454002221500227050ustar00rootroot00000000000000# TargetGroupProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **algorithm** | **str** | 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. | | | **health_check** | [**TargetGroupHealthCheck**](TargetGroupHealthCheck.md) | | [optional] | | **http_health_check** | [**TargetGroupHttpHealthCheck**](TargetGroupHttpHealthCheck.md) | | [optional] | | **name** | **str** | The target group name. | | | **protocol** | **str** | The forwarding protocol. Only the value 'HTTP' is allowed. | | | **targets** | [**list[TargetGroupTarget]**](TargetGroupTarget.md) | Array of items in the collection. | [optional] | sdk-python-6.1.9/docs/models/TargetGroupPut.md000066400000000000000000000007651454002221500213230ustar00rootroot00000000000000# TargetGroupPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **properties** | [**TargetGroupProperties**](TargetGroupProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/TargetGroupTarget.md000066400000000000000000000025771454002221500220040ustar00rootroot00000000000000# TargetGroupTarget ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **health_check_enabled** | **bool** | 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'. | [optional] | | **ip** | **str** | The IP address of the balanced target. | | | **maintenance_enabled** | **bool** | When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. | [optional] | | **port** | **int** | The port of the balanced target service; the valid range is 1 to 65535. | | | **weight** | **int** | 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. | | | **proxy_protocol** | **str** | ProxyProtocol is used to set the proxy protocol version. | [optional] [default to 'none'] | sdk-python-6.1.9/docs/models/TargetGroups.md000066400000000000000000000015661454002221500210150ustar00rootroot00000000000000# TargetGroups ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[TargetGroup]**](TargetGroup.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | [optional] | | **offset** | **float** | The offset, specified in the request (if not is specified, 0 is used by default). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/TargetPortRange.md000066400000000000000000000005221454002221500214260ustar00rootroot00000000000000# TargetPortRange ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **end** | **int** | Target port range end associated with the NAT Gateway rule. | [optional] | | **start** | **int** | Target port range start associated with the NAT Gateway rule. | [optional] | sdk-python-6.1.9/docs/models/Template.md000066400000000000000000000011131454002221500201260ustar00rootroot00000000000000# Template ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**TemplateProperties**](TemplateProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/TemplateProperties.md000066400000000000000000000005371454002221500222140ustar00rootroot00000000000000# TemplateProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **cores** | **float** | The CPU cores count. | | | **name** | **str** | The resource name. | | | **ram** | **float** | The RAM size in MB. | | | **storage_size** | **float** | The storage size in GB. | | sdk-python-6.1.9/docs/models/Templates.md000066400000000000000000000010161454002221500203130ustar00rootroot00000000000000# Templates ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Template]**](Template.md) | Array of items in the collection. | [optional] [readonly] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/Token.md000066400000000000000000000003171454002221500174400ustar00rootroot00000000000000# Token ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **token** | **str** | The jwToken for the server. | [optional] [readonly] | sdk-python-6.1.9/docs/models/Type.md000066400000000000000000000001771454002221500173050ustar00rootroot00000000000000# Type ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | sdk-python-6.1.9/docs/models/User.md000066400000000000000000000011531454002221500172750ustar00rootroot00000000000000# User ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **entities** | [**UsersEntities**](UsersEntities.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**UserMetadata**](UserMetadata.md) | | [optional] | | **properties** | [**UserProperties**](UserProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/UserMetadata.md000066400000000000000000000011301454002221500207310ustar00rootroot00000000000000# UserMetadata ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **created_date** | **datetime** | The time the user was created. | [optional] [readonly] | | **etag** | **str** | 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. | [optional] [readonly] | | **last_login** | **datetime** | The time of the last login by the user. | [optional] [readonly] | sdk-python-6.1.9/docs/models/UserPost.md000066400000000000000000000003161454002221500201430ustar00rootroot00000000000000# UserPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **properties** | [**UserPropertiesPost**](UserPropertiesPost.md) | | | sdk-python-6.1.9/docs/models/UserProperties.md000066400000000000000000000015161454002221500213550ustar00rootroot00000000000000# UserProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **active** | **bool** | Indicates if the user is active. | [optional] | | **administrator** | **bool** | Indicates if the user has admin rights. | [optional] | | **email** | **str** | The email address of the user. | [optional] | | **firstname** | **str** | The first name of the user. | [optional] | | **force_sec_auth** | **bool** | Indicates if secure authentication should be forced on the user. | [optional] | | **lastname** | **str** | The last name of the user. | [optional] | | **s3_canonical_user_id** | **str** | Canonical (S3) ID of the user for a given identity. | [optional] | | **sec_auth_active** | **bool** | Indicates if secure authentication is active for the user. | [optional] | sdk-python-6.1.9/docs/models/UserPropertiesPost.md000066400000000000000000000014411454002221500222200ustar00rootroot00000000000000# UserPropertiesPost ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **active** | **bool** | Indicates if the user is active. | [optional] | | **administrator** | **bool** | Indicates if the user has admin rights. | [optional] | | **email** | **str** | The email address of the user. | [optional] | | **firstname** | **str** | The first name of the user. | [optional] | | **force_sec_auth** | **bool** | Indicates if secure authentication should be forced on the user. | [optional] | | **lastname** | **str** | The last name of the user. | [optional] | | **password** | **str** | User password. | [optional] | | **sec_auth_active** | **bool** | Indicates if secure authentication is active for the user. | [optional] | sdk-python-6.1.9/docs/models/UserPropertiesPut.md000066400000000000000000000014461454002221500220500ustar00rootroot00000000000000# UserPropertiesPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **active** | **bool** | Indicates if the user is active. | [optional] | | **administrator** | **bool** | Indicates if the user has admin rights. | [optional] | | **email** | **str** | The email address of the user. | [optional] | | **firstname** | **str** | The first name of the user. | [optional] | | **force_sec_auth** | **bool** | Indicates if secure authentication should be forced on the user. | [optional] | | **lastname** | **str** | The last name of the user. | [optional] | | **password** | **str** | password of the user | [optional] | | **sec_auth_active** | **bool** | Indicates if secure authentication is active for the user. | [optional] | sdk-python-6.1.9/docs/models/UserPut.md000066400000000000000000000004261454002221500177700ustar00rootroot00000000000000# UserPut ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **id** | **str** | The resource's unique identifier. | [optional] | | **properties** | [**UserPropertiesPut**](UserPropertiesPut.md) | | | sdk-python-6.1.9/docs/models/Users.md000066400000000000000000000013611454002221500174610ustar00rootroot00000000000000# Users ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[User]**](User.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/UsersEntities.md000066400000000000000000000004221454002221500211630ustar00rootroot00000000000000# UsersEntities ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **groups** | [**GroupUsers**](GroupUsers.md) | | [optional] | | **owns** | [**ResourcesUsers**](ResourcesUsers.md) | | [optional] | sdk-python-6.1.9/docs/models/Volume.md000066400000000000000000000011051454002221500176230ustar00rootroot00000000000000# Volume ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **href** | **str** | The URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **metadata** | [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | | **properties** | [**VolumeProperties**](VolumeProperties.md) | | | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/models/VolumeProperties.md000066400000000000000000000074251454002221500217130ustar00rootroot00000000000000# VolumeProperties ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **availability_zone** | **str** | 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. | [optional] | | **backupunit_id** | **str** | 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. | [optional] | | **boot_order** | **str** | 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. | [optional] [default to 'AUTO'] | | **boot_server** | **str** | The UUID of the attached server. | [optional] [readonly] | | **bus** | **str** | The bus type for this volume; default is VIRTIO. | [optional] | | **cpu_hot_plug** | **bool** | Hot-plug capable CPU (no reboot required). | [optional] | | **device_number** | **int** | The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. | [optional] [readonly] | | **disc_virtio_hot_plug** | **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | | **disc_virtio_hot_unplug** | **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | | **image** | **str** | Image or snapshot ID to be used as template for this volume. | [optional] | | **image_alias** | **str** | | [optional] | | **image_password** | **str** | 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. | [optional] | | **licence_type** | **str** | OS type for this volume. | [optional] | | **name** | **str** | The name of the resource. | [optional] | | **nic_hot_plug** | **bool** | Hot-plug capable NIC (no reboot required). | [optional] | | **nic_hot_unplug** | **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | | **pci_slot** | **int** | The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. | [optional] [readonly] | | **ram_hot_plug** | **bool** | Hot-plug capable RAM (no reboot required). | [optional] | | **size** | **float** | The size of the volume in GB. | | | **ssh_keys** | **list[str]** | 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. | [optional] | | **type** | **str** | Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. | [optional] | | **user_data** | **str** | 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. | [optional] | sdk-python-6.1.9/docs/models/Volumes.md000066400000000000000000000013671454002221500200200ustar00rootroot00000000000000# Volumes ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | | **links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] | | **href** | **str** | URL to the object representation (absolute path). | [optional] [readonly] | | **id** | **str** | The resource's unique identifier. | [optional] [readonly] | | **items** | [**list[Volume]**](Volume.md) | Array of items in the collection. | [optional] [readonly] | | **limit** | **float** | The limit (if specified in the request). | [optional] | | **offset** | **float** | The offset (if specified in the request). | [optional] | | **type** | [**Type**](Type.md) | The type of object that has been created. | [optional] | sdk-python-6.1.9/docs/summary.md000066400000000000000000000245531454002221500166020ustar00rootroot00000000000000# Table of contents * [Introduction](README.md) * [Changelog](CHANGELOG.md) ## API * [ApplicationLoadBalancersApi](api/ApplicationLoadBalancersApi.md) * [BackupUnitsApi](api/BackupUnitsApi.md) * [ContractResourcesApi](api/ContractResourcesApi.md) * [DataCentersApi](api/DataCentersApi.md) * [FirewallRulesApi](api/FirewallRulesApi.md) * [FlowLogsApi](api/FlowLogsApi.md) * [IPBlocksApi](api/IPBlocksApi.md) * [ImagesApi](api/ImagesApi.md) * [KubernetesApi](api/KubernetesApi.md) * [LANsApi](api/LANsApi.md) * [LabelsApi](api/LabelsApi.md) * [LoadBalancersApi](api/LoadBalancersApi.md) * [LocationsApi](api/LocationsApi.md) * [NATGatewaysApi](api/NATGatewaysApi.md) * [NetworkLoadBalancersApi](api/NetworkLoadBalancersApi.md) * [NetworkInterfacesApi](api/NetworkInterfacesApi.md) * [PrivateCrossConnectsApi](api/PrivateCrossConnectsApi.md) * [RequestsApi](api/RequestsApi.md) * [ServersApi](api/ServersApi.md) * [SnapshotsApi](api/SnapshotsApi.md) * [TargetGroupsApi](api/TargetGroupsApi.md) * [TemplatesApi](api/TemplatesApi.md) * [UserS3KeysApi](api/UserS3KeysApi.md) * [UserManagementApi](api/UserManagementApi.md) * [VolumesApi](api/VolumesApi.md) * [Api](api/Api.md) ## Models * [ApplicationLoadBalancer](models/ApplicationLoadBalancer.md) * [ApplicationLoadBalancerEntities](models/ApplicationLoadBalancerEntities.md) * [ApplicationLoadBalancerForwardingRule](models/ApplicationLoadBalancerForwardingRule.md) * [ApplicationLoadBalancerForwardingRuleProperties](models/ApplicationLoadBalancerForwardingRuleProperties.md) * [ApplicationLoadBalancerForwardingRulePut](models/ApplicationLoadBalancerForwardingRulePut.md) * [ApplicationLoadBalancerForwardingRules](models/ApplicationLoadBalancerForwardingRules.md) * [ApplicationLoadBalancerHttpRule](models/ApplicationLoadBalancerHttpRule.md) * [ApplicationLoadBalancerHttpRuleCondition](models/ApplicationLoadBalancerHttpRuleCondition.md) * [ApplicationLoadBalancerProperties](models/ApplicationLoadBalancerProperties.md) * [ApplicationLoadBalancerPut](models/ApplicationLoadBalancerPut.md) * [ApplicationLoadBalancers](models/ApplicationLoadBalancers.md) * [AttachedVolumes](models/AttachedVolumes.md) * [BackupUnit](models/BackupUnit.md) * [BackupUnitProperties](models/BackupUnitProperties.md) * [BackupUnitSSO](models/BackupUnitSSO.md) * [BackupUnits](models/BackupUnits.md) * [BalancedNics](models/BalancedNics.md) * [Cdroms](models/Cdroms.md) * [ConnectableDatacenter](models/ConnectableDatacenter.md) * [Contract](models/Contract.md) * [ContractProperties](models/ContractProperties.md) * [Contracts](models/Contracts.md) * [CpuArchitectureProperties](models/CpuArchitectureProperties.md) * [DataCenterEntities](models/DataCenterEntities.md) * [Datacenter](models/Datacenter.md) * [DatacenterElementMetadata](models/DatacenterElementMetadata.md) * [DatacenterProperties](models/DatacenterProperties.md) * [Datacenters](models/Datacenters.md) * [Error](models/Error.md) * [ErrorMessage](models/ErrorMessage.md) * [FirewallRule](models/FirewallRule.md) * [FirewallRules](models/FirewallRules.md) * [FirewallruleProperties](models/FirewallruleProperties.md) * [FlowLog](models/FlowLog.md) * [FlowLogProperties](models/FlowLogProperties.md) * [FlowLogPut](models/FlowLogPut.md) * [FlowLogs](models/FlowLogs.md) * [Group](models/Group.md) * [GroupEntities](models/GroupEntities.md) * [GroupMembers](models/GroupMembers.md) * [GroupProperties](models/GroupProperties.md) * [GroupShare](models/GroupShare.md) * [GroupShareProperties](models/GroupShareProperties.md) * [GroupShares](models/GroupShares.md) * [GroupUsers](models/GroupUsers.md) * [Groups](models/Groups.md) * [IPFailover](models/IPFailover.md) * [Image](models/Image.md) * [ImageProperties](models/ImageProperties.md) * [Images](models/Images.md) * [Info](models/Info.md) * [IpBlock](models/IpBlock.md) * [IpBlockProperties](models/IpBlockProperties.md) * [IpBlocks](models/IpBlocks.md) * [IpConsumer](models/IpConsumer.md) * [KubernetesAutoScaling](models/KubernetesAutoScaling.md) * [KubernetesCluster](models/KubernetesCluster.md) * [KubernetesClusterEntities](models/KubernetesClusterEntities.md) * [KubernetesClusterForPost](models/KubernetesClusterForPost.md) * [KubernetesClusterForPut](models/KubernetesClusterForPut.md) * [KubernetesClusterProperties](models/KubernetesClusterProperties.md) * [KubernetesClusterPropertiesForPost](models/KubernetesClusterPropertiesForPost.md) * [KubernetesClusterPropertiesForPut](models/KubernetesClusterPropertiesForPut.md) * [KubernetesClusters](models/KubernetesClusters.md) * [KubernetesMaintenanceWindow](models/KubernetesMaintenanceWindow.md) * [KubernetesNode](models/KubernetesNode.md) * [KubernetesNodeMetadata](models/KubernetesNodeMetadata.md) * [KubernetesNodePool](models/KubernetesNodePool.md) * [KubernetesNodePoolForPost](models/KubernetesNodePoolForPost.md) * [KubernetesNodePoolForPut](models/KubernetesNodePoolForPut.md) * [KubernetesNodePoolLan](models/KubernetesNodePoolLan.md) * [KubernetesNodePoolLanRoutes](models/KubernetesNodePoolLanRoutes.md) * [KubernetesNodePoolProperties](models/KubernetesNodePoolProperties.md) * [KubernetesNodePoolPropertiesForPost](models/KubernetesNodePoolPropertiesForPost.md) * [KubernetesNodePoolPropertiesForPut](models/KubernetesNodePoolPropertiesForPut.md) * [KubernetesNodePools](models/KubernetesNodePools.md) * [KubernetesNodeProperties](models/KubernetesNodeProperties.md) * [KubernetesNodes](models/KubernetesNodes.md) * [Label](models/Label.md) * [LabelProperties](models/LabelProperties.md) * [LabelResource](models/LabelResource.md) * [LabelResourceProperties](models/LabelResourceProperties.md) * [LabelResources](models/LabelResources.md) * [Labels](models/Labels.md) * [Lan](models/Lan.md) * [LanEntities](models/LanEntities.md) * [LanNics](models/LanNics.md) * [LanPost](models/LanPost.md) * [LanProperties](models/LanProperties.md) * [LanPropertiesPost](models/LanPropertiesPost.md) * [Lans](models/Lans.md) * [Loadbalancer](models/Loadbalancer.md) * [LoadbalancerEntities](models/LoadbalancerEntities.md) * [LoadbalancerProperties](models/LoadbalancerProperties.md) * [Loadbalancers](models/Loadbalancers.md) * [Location](models/Location.md) * [LocationProperties](models/LocationProperties.md) * [Locations](models/Locations.md) * [NatGateway](models/NatGateway.md) * [NatGatewayEntities](models/NatGatewayEntities.md) * [NatGatewayLanProperties](models/NatGatewayLanProperties.md) * [NatGatewayProperties](models/NatGatewayProperties.md) * [NatGatewayPut](models/NatGatewayPut.md) * [NatGatewayRule](models/NatGatewayRule.md) * [NatGatewayRuleProperties](models/NatGatewayRuleProperties.md) * [NatGatewayRuleProtocol](models/NatGatewayRuleProtocol.md) * [NatGatewayRulePut](models/NatGatewayRulePut.md) * [NatGatewayRuleType](models/NatGatewayRuleType.md) * [NatGatewayRules](models/NatGatewayRules.md) * [NatGateways](models/NatGateways.md) * [NetworkLoadBalancer](models/NetworkLoadBalancer.md) * [NetworkLoadBalancerEntities](models/NetworkLoadBalancerEntities.md) * [NetworkLoadBalancerForwardingRule](models/NetworkLoadBalancerForwardingRule.md) * [NetworkLoadBalancerForwardingRuleHealthCheck](models/NetworkLoadBalancerForwardingRuleHealthCheck.md) * [NetworkLoadBalancerForwardingRuleProperties](models/NetworkLoadBalancerForwardingRuleProperties.md) * [NetworkLoadBalancerForwardingRulePut](models/NetworkLoadBalancerForwardingRulePut.md) * [NetworkLoadBalancerForwardingRuleTarget](models/NetworkLoadBalancerForwardingRuleTarget.md) * [NetworkLoadBalancerForwardingRuleTargetHealthCheck](models/NetworkLoadBalancerForwardingRuleTargetHealthCheck.md) * [NetworkLoadBalancerForwardingRules](models/NetworkLoadBalancerForwardingRules.md) * [NetworkLoadBalancerProperties](models/NetworkLoadBalancerProperties.md) * [NetworkLoadBalancerPut](models/NetworkLoadBalancerPut.md) * [NetworkLoadBalancers](models/NetworkLoadBalancers.md) * [Nic](models/Nic.md) * [NicEntities](models/NicEntities.md) * [NicProperties](models/NicProperties.md) * [NicPut](models/NicPut.md) * [Nics](models/Nics.md) * [NoStateMetaData](models/NoStateMetaData.md) * [PaginationLinks](models/PaginationLinks.md) * [Peer](models/Peer.md) * [PrivateCrossConnect](models/PrivateCrossConnect.md) * [PrivateCrossConnectProperties](models/PrivateCrossConnectProperties.md) * [PrivateCrossConnects](models/PrivateCrossConnects.md) * [RemoteConsoleUrl](models/RemoteConsoleUrl.md) * [Request](models/Request.md) * [RequestMetadata](models/RequestMetadata.md) * [RequestProperties](models/RequestProperties.md) * [RequestStatus](models/RequestStatus.md) * [RequestStatusMetadata](models/RequestStatusMetadata.md) * [RequestTarget](models/RequestTarget.md) * [Requests](models/Requests.md) * [Resource](models/Resource.md) * [ResourceEntities](models/ResourceEntities.md) * [ResourceGroups](models/ResourceGroups.md) * [ResourceLimits](models/ResourceLimits.md) * [ResourceProperties](models/ResourceProperties.md) * [ResourceReference](models/ResourceReference.md) * [Resources](models/Resources.md) * [ResourcesUsers](models/ResourcesUsers.md) * [S3Bucket](models/S3Bucket.md) * [S3Key](models/S3Key.md) * [S3KeyMetadata](models/S3KeyMetadata.md) * [S3KeyProperties](models/S3KeyProperties.md) * [S3Keys](models/S3Keys.md) * [S3ObjectStorageSSO](models/S3ObjectStorageSSO.md) * [Server](models/Server.md) * [ServerEntities](models/ServerEntities.md) * [ServerProperties](models/ServerProperties.md) * [Servers](models/Servers.md) * [Snapshot](models/Snapshot.md) * [SnapshotProperties](models/SnapshotProperties.md) * [Snapshots](models/Snapshots.md) * [TargetGroup](models/TargetGroup.md) * [TargetGroupHealthCheck](models/TargetGroupHealthCheck.md) * [TargetGroupHttpHealthCheck](models/TargetGroupHttpHealthCheck.md) * [TargetGroupProperties](models/TargetGroupProperties.md) * [TargetGroupPut](models/TargetGroupPut.md) * [TargetGroupTarget](models/TargetGroupTarget.md) * [TargetGroups](models/TargetGroups.md) * [TargetPortRange](models/TargetPortRange.md) * [Template](models/Template.md) * [TemplateProperties](models/TemplateProperties.md) * [Templates](models/Templates.md) * [Token](models/Token.md) * [Type](models/Type.md) * [User](models/User.md) * [UserMetadata](models/UserMetadata.md) * [UserPost](models/UserPost.md) * [UserProperties](models/UserProperties.md) * [UserPropertiesPost](models/UserPropertiesPost.md) * [UserPropertiesPut](models/UserPropertiesPut.md) * [UserPut](models/UserPut.md) * [Users](models/Users.md) * [UsersEntities](models/UsersEntities.md) * [Volume](models/Volume.md) * [VolumeProperties](models/VolumeProperties.md) * [Volumes](models/Volumes.md) sdk-python-6.1.9/git_push.sh000066400000000000000000000031331454002221500160000ustar00rootroot00000000000000#!/bin/sh git_user_id=$1 git_repo_id=$2 release_note=$3 git_host=$4 if [ "$git_host" = "" ]; then git_host="github.com" echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi if [ "$git_user_id" = "" ]; then git_user_id="ionos-cloud" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then git_repo_id="sdk-python" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi if [ "$release_note" = "" ]; then release_note="Minor update" echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository git init # Adds the files in the local repository and stages them for commit. git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' sdk-python-6.1.9/gitbook.yaml000066400000000000000000000001001454002221500161330ustar00rootroot00000000000000root: docs structure: readme: README.md summary: summary.md sdk-python-6.1.9/ionoscloud/000077500000000000000000000000001454002221500160005ustar00rootroot00000000000000sdk-python-6.1.9/ionoscloud/__init__.py000066400000000000000000000355071454002221500201230ustar00rootroot00000000000000# 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.9" # 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.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.data_center_entities import DataCenterEntities from ionoscloud.models.datacenter import Datacenter from ionoscloud.models.datacenter_element_metadata import DatacenterElementMetadata from ionoscloud.models.datacenter_properties import DatacenterProperties 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_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_post import LanPost from ionoscloud.models.lan_properties import LanProperties from ionoscloud.models.lan_properties_post import LanPropertiesPost from ionoscloud.models.lans import Lans 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.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.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_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 sdk-python-6.1.9/ionoscloud/api/000077500000000000000000000000001454002221500165515ustar00rootroot00000000000000sdk-python-6.1.9/ionoscloud/api/__api.py000066400000000000000000000204041454002221500201720ustar00rootroot00000000000000from __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')) sdk-python-6.1.9/ionoscloud/api/__init__.py000066400000000000000000000031131454002221500206600ustar00rootroot00000000000000from __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.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 sdk-python-6.1.9/ionoscloud/api/application_load_balancers_api.py000066400000000000000000006425301454002221500253020ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/backup_units_api.py000066400000000000000000001750061454002221500224540ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/contract_resources_api.py000066400000000000000000000210451454002221500236650ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/data_centers_api.py000066400000000000000000001641611454002221500224210ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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: DatacenterProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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: DatacenterProperties :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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 = ['Basic Authentication', 'Token Authentication'] # 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: Datacenter :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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: Datacenter :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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 = ['Basic Authentication', 'Token Authentication'] # 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: Datacenter :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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: Datacenter :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/firewall_rules_api.py000066400000000000000000002227541454002221500230070ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/flow_logs_api.py000066400000000000000000002116621454002221500217570ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/images_api.py000066400000000000000000001315641454002221500212330ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 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.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 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.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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/ip_blocks_api.py000066400000000000000000001575651454002221500217440ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/kubernetes_api.py000066400000000000000000004721061454002221500221350ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/labels_api.py000066400000000000000000010271071454002221500212260ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/lans_api.py000066400000000000000000002733161454002221500207250ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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: LanPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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: LanPost """ 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: LanPost :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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(LanPost, 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 = ['Basic Authentication', 'Token Authentication'] # noqa: E501 response_type = 'LanPost' 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/load_balancers_api.py000066400000000000000000003240521454002221500227130ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/locations_api.py000066400000000000000000000703471454002221500217620ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/nat_gateways_api.py000066400000000000000000006042631454002221500224550ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/network_interfaces_api.py000066400000000000000000002047241454002221500236610ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/network_load_balancers_api.py000066400000000000000000006336301454002221500244710ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/private_cross_connects_api.py000066400000000000000000001313301454002221500245340ustar00rootroot00000000000000from __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 private Cross-Connect (only if not connected to any data centers). # 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 private 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 private Cross-Connect (only if not connected to any data centers). # 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 private 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 = ['Basic Authentication', 'Token Authentication'] # 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 private Cross-Connects # noqa: E501 Retrieve a private Cross-Connect by the resource ID. Cross-Connect ID is in the response body when the private Cross-Connect is created, and in the list of private Cross-Connects, 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.pccs_find_by_id(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the private 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 private Cross-Connects # noqa: E501 Retrieve a private Cross-Connect by the resource ID. Cross-Connect ID is in the response body when the private Cross-Connect is created, and in the list of private Cross-Connects, 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.pccs_find_by_id_with_http_info(pcc_id, async_req=True) >>> result = thread.get() :param pcc_id: The unique ID of the private 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 = ['Basic Authentication', 'Token Authentication'] # 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 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.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 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.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 = ['Basic Authentication', 'Token Authentication'] # 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 private Cross-Connects # noqa: E501 Update the properties of the specified private Cross-Connect. # 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 private Cross-Connect. (required) :type pcc_id: str :param pcc: The properties of the private 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 private Cross-Connects # noqa: E501 Update the properties of the specified private Cross-Connect. # 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 private Cross-Connect. (required) :type pcc_id: str :param pcc: The properties of the private 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 = ['Basic Authentication', 'Token Authentication'] # 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 Private Cross-Connect # noqa: E501 Creates a private Cross-Connect. # 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 private 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 Private Cross-Connect # noqa: E501 Creates a private Cross-Connect. # 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 private 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/requests_api.py000066400000000000000000001101271454002221500216310ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/servers_api.py000066400000000000000000007265711454002221500214670ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 upgrade_needed: Filter servers that can or that cannot be upgraded. :type upgrade_needed: 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 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 upgrade_needed: Filter servers that can or that cannot be upgraded. :type upgrade_needed: 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 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', 'upgrade_needed', '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 'upgrade_needed' in local_var_params and local_var_params['upgrade_needed'] is not None: # noqa: E501 query_params.append(('upgradeNeeded', local_var_params['upgrade_needed'])) # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 JASON 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 JASON 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/snapshots_api.py000066400000000000000000001325461454002221500220110ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/target_groups_api.py000066400000000000000000001634431454002221500226540ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/templates_api.py000066400000000000000000000367461454002221500217720ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/user_management_api.py000066400000000000000000006721451454002221500231450ustar00rootroot00000000000000from __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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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: User :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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: User :param pretty: Controls whether the response is pretty-printed (with indentations and new lines). :type pretty: bool :param depth: Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on :type depth: int :param x_contract_number: Users with multiple contracts must provide the contract number, for which all API requests 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/user_s3_keys_api.py000066400000000000000000001571311454002221500224020ustar00rootroot00000000000000from __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 S3 keys # noqa: E501 Delete the specified user S3 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 S3 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 S3 keys # noqa: E501 Delete the specified user S3 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 S3 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 = ['Basic Authentication', 'Token Authentication'] # 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 S3 keys by key ID # noqa: E501 Retrieve the specified user S3 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 S3 key is created, and in the list of all user S3 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 S3 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 S3 keys by key ID # noqa: E501 Retrieve the specified user S3 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 S3 key is created, and in the list of all user S3 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 S3 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 = ['Basic Authentication', 'Token Authentication'] # 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 S3 keys # noqa: E501 List S3 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 S3 keys # noqa: E501 List S3 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 = ['Basic Authentication', 'Token Authentication'] # 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 S3 keys # noqa: E501 Create an S3 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 S3 keys # noqa: E501 Create an S3 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 = ['Basic Authentication', 'Token Authentication'] # 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 S3 Key by Key ID # noqa: E501 Enables or disables the specified user S3 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 S3 key. (required) :type key_id: str :param s3_key: The modified S3 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 S3 Key by Key ID # noqa: E501 Enables or disables the specified user S3 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 S3 key. (required) :type key_id: str :param s3_key: The modified S3 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 = ['Basic Authentication', 'Token Authentication'] # 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 S3 single sign-on URLs # noqa: E501 Retrieve S3 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 S3 single sign-on URLs # noqa: E501 Retrieve S3 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 = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api/volumes_api.py000066400000000000000000002507331454002221500214600ustar00rootroot00000000000000from __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 name: Snapshot name :type name: str :param description: Snapshot description :type description: str :param sec_auth_protection: Flag for enabling extra protection for this snapshot, such as two-step verification. :type sec_auth_protection: bool :param licence_type: The OS type for this snapshot. :type licence_type: 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: 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 name: Snapshot name :type name: str :param description: Snapshot description :type description: str :param sec_auth_protection: Flag for enabling extra protection for this snapshot, such as two-step verification. :type sec_auth_protection: bool :param licence_type: The OS type for this snapshot. :type licence_type: 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: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'datacenter_id', 'volume_id', 'pretty', 'depth', 'x_contract_number', 'name', 'description', 'sec_auth_protection', 'licence_type' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', 'response_type', 'query_params' ] ) for local_var_params_key, local_var_params_val in six.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 = {} if 'name' in local_var_params: form_params.append(('name', local_var_params['name'])) # noqa: E501 if 'description' in local_var_params: form_params.append(('description', local_var_params['description'])) # noqa: E501 if 'sec_auth_protection' in local_var_params: form_params.append(('secAuthProtection', local_var_params['sec_auth_protection'])) # noqa: E501 if 'licence_type' in local_var_params: form_params.append(('licenceType', local_var_params['licence_type'])) # noqa: E501 body_params = None # 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/x-www-form-urlencoded']) # noqa: E501 # Authentication setting auth_settings = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 = ['Basic Authentication', 'Token Authentication'] # 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 snapshot_id: The unique ID of the snapshot. :type snapshot_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_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 snapshot_id: The unique ID of the snapshot. :type snapshot_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', 'volume_id', 'pretty', 'depth', 'x_contract_number', 'snapshot_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_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 = {} if 'snapshot_id' in local_var_params: form_params.append(('snapshotId', local_var_params['snapshot_id'])) # noqa: E501 body_params = None # 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/x-www-form-urlencoded']) # noqa: E501 # Authentication setting auth_settings = ['Basic Authentication', 'Token Authentication'] # 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')) sdk-python-6.1.9/ionoscloud/api_client.py000066400000000000000000001041721454002221500204660ustar00rootroot00000000000000# 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.9' 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 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=5, scaleup=10): """ 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`` """ 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 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=5, scaleup=10, 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`` """ 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 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 sdk-python-6.1.9/ionoscloud/configuration.py000066400000000000000000000430171454002221500212260ustar00rootroot00000000000000# 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['Basic Authentication'] = { 'type': 'basic', 'in': 'header', 'key': 'Authorization', 'value': self.get_basic_auth_token() } if self.token: auth['Token Authentication'] = { '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.9".\ 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 sdk-python-6.1.9/ionoscloud/exceptions.py000066400000000000000000000124721454002221500205410ustar00rootroot00000000000000# 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 sdk-python-6.1.9/ionoscloud/models/000077500000000000000000000000001454002221500172635ustar00rootroot00000000000000sdk-python-6.1.9/ionoscloud/models/__init__.py000066400000000000000000000316071454002221500214030ustar00rootroot00000000000000# 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.data_center_entities import DataCenterEntities from ionoscloud.models.datacenter import Datacenter from ionoscloud.models.datacenter_element_metadata import DatacenterElementMetadata from ionoscloud.models.datacenter_properties import DatacenterProperties 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_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_post import LanPost from ionoscloud.models.lan_properties import LanProperties from ionoscloud.models.lan_properties_post import LanPropertiesPost from ionoscloud.models.lans import Lans 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.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.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_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 sdk-python-6.1.9/ionoscloud/models/application_load_balancer.py000066400000000000000000000172511454002221500247740ustar00rootroot00000000000000# 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 = { 'entities': 'ApplicationLoadBalancerEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ApplicationLoadBalancerProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_entities.py000066400000000000000000000077361454002221500267070ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_forwarding_rule.py000066400000000000000000000164071454002221500302470ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ApplicationLoadBalancerForwardingRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_forwarding_rule_properties.py000066400000000000000000000271711454002221500325230ustar00rootroot00000000000000# 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 = { 'client_timeout': 'int', 'http_rules': 'list[ApplicationLoadBalancerHttpRule]', 'listener_ip': 'str', 'listener_port': 'int', 'name': 'str', 'protocol': 'str', 'server_certificates': 'list[str]', } attribute_map = { 'client_timeout': 'clientTimeout', 'http_rules': 'httpRules', 'listener_ip': 'listenerIp', 'listener_port': 'listenerPort', 'name': 'name', 'protocol': 'protocol', 'server_certificates': 'serverCertificates', } def __init__(self, client_timeout=None, http_rules=None, listener_ip=None, listener_port=None, name=None, protocol=None, server_certificates=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._client_timeout = None self._http_rules = None self._listener_ip = None self._listener_port = None self._name = None self._protocol = None self._server_certificates = None self.discriminator = None if client_timeout is not None: self.client_timeout = client_timeout if http_rules is not None: self.http_rules = http_rules self.listener_ip = listener_ip self.listener_port = listener_port self.name = name self.protocol = protocol if server_certificates is not None: self.server_certificates = server_certificates @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 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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_forwarding_rule_put.py000066400000000000000000000150011454002221500311240ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'ApplicationLoadBalancerForwardingRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_forwarding_rules.py000066400000000000000000000213071454002221500304250ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[ApplicationLoadBalancerForwardingRule]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_http_rule.py000066400000000000000000000320301454002221500270520ustar00rootroot00000000000000# 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 = { 'conditions': 'list[ApplicationLoadBalancerHttpRuleCondition]', 'content_type': 'str', 'drop_query': 'bool', 'location': 'str', 'name': 'str', 'response_message': 'str', 'status_code': 'int', 'target_group': 'str', 'type': 'str', } attribute_map = { 'conditions': 'conditions', 'content_type': 'contentType', 'drop_query': 'dropQuery', 'location': 'location', 'name': 'name', 'response_message': 'responseMessage', 'status_code': 'statusCode', 'target_group': 'targetGroup', 'type': 'type', } def __init__(self, conditions=None, content_type=None, drop_query=None, location=None, name=None, response_message=None, status_code=None, target_group=None, type=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._conditions = None self._content_type = None self._drop_query = None self._location = None self._name = None self._response_message = None self._status_code = None self._target_group = None self._type = None self.discriminator = None if conditions is not None: self.conditions = conditions if content_type is not None: self.content_type = content_type if drop_query is not None: self.drop_query = drop_query if location is not None: self.location = location self.name = name if response_message is not None: self.response_message = response_message if status_code is not None: self.status_code = status_code if target_group is not None: self.target_group = target_group self.type = 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 @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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_http_rule_condition.py000066400000000000000000000223751454002221500311330ustar00rootroot00000000000000# 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 = { 'condition': 'str', 'key': 'str', 'negate': 'bool', 'type': 'str', 'value': 'str', } attribute_map = { 'condition': 'condition', 'key': 'key', 'negate': 'negate', 'type': 'type', 'value': 'value', } def __init__(self, condition=None, key=None, negate=None, type=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._condition = None self._key = None self._negate = None self._type = None self._value = None self.discriminator = None self.condition = condition if key is not None: self.key = key if negate is not None: self.negate = negate self.type = type if value is not None: self.value = value @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_properties.py000066400000000000000000000210131454002221500272370ustar00rootroot00000000000000# 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 = { 'ips': 'list[str]', 'lb_private_ips': 'list[str]', 'listener_lan': 'int', 'name': 'str', 'target_lan': 'int', } attribute_map = { 'ips': 'ips', 'lb_private_ips': 'lbPrivateIps', 'listener_lan': 'listenerLan', 'name': 'name', 'target_lan': 'targetLan', } def __init__(self, ips=None, lb_private_ips=None, listener_lan=None, name=None, target_lan=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._ips = None self._lb_private_ips = None self._listener_lan = None self._name = None self._target_lan = None self.discriminator = None if ips is not None: self.ips = ips if lb_private_ips is not None: self.lb_private_ips = lb_private_ips self.listener_lan = listener_lan self.name = name self.target_lan = target_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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancer_put.py000066400000000000000000000142771454002221500256710ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'ApplicationLoadBalancerProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/application_load_balancers.py000066400000000000000000000203351454002221500251540ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[ApplicationLoadBalancer]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/attached_volumes.py000066400000000000000000000176121454002221500231730ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Volume]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/backup_unit.py000066400000000000000000000155641454002221500221540ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'BackupUnitProperties', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/backup_unit_properties.py000066400000000000000000000130771454002221500244250ustar00rootroot00000000000000# 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 = { 'email': 'str', 'name': 'str', 'password': 'str', } attribute_map = { 'email': 'email', 'name': 'name', 'password': 'password', } def __init__(self, email=None, name=None, password=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._email = None self._name = None self._password = None self.discriminator = None if email is not None: self.email = email self.name = name if password is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/backup_unit_sso.py000066400000000000000000000072561454002221500230370ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/backup_units.py000066400000000000000000000140151454002221500223250ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[BackupUnit]', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/balanced_nics.py000066400000000000000000000174311454002221500224100ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Nic]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/cdroms.py000066400000000000000000000171371454002221500211350ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Image]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/connectable_datacenter.py000066400000000000000000000115001454002221500243010ustar00rootroot00000000000000# 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', 'location': 'str', 'name': 'str', } attribute_map = { 'id': 'id', 'location': 'location', 'name': 'name', } def __init__(self, id=None, location=None, name=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._location = None self._name = None self.discriminator = None if id is not None: self.id = id if location is not None: self.location = location if name is not None: self.name = name @property def id(self): """Gets the id of this ConnectableDatacenter. # 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. :param id: The id of this ConnectableDatacenter. # noqa: E501 :type id: str """ self._id = id @property def location(self): """Gets the location of this ConnectableDatacenter. # 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. :param location: The location of this ConnectableDatacenter. # noqa: E501 :type location: str """ self._location = location @property def name(self): """Gets the name of this ConnectableDatacenter. # 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. :param name: The name of this ConnectableDatacenter. # noqa: E501 :type name: str """ 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, 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() sdk-python-6.1.9/ionoscloud/models/contract.py000066400000000000000000000106741454002221500214620ustar00rootroot00000000000000# 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 = { 'properties': 'ContractProperties', 'type': 'Type', } attribute_map = { 'properties': 'properties', 'type': 'type', } def __init__(self, properties=None, type=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._properties = None self._type = None self.discriminator = None self.properties = properties if type is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/contract_properties.py000066400000000000000000000157451454002221500237420ustar00rootroot00000000000000# 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', 'reg_domain': 'str', 'resource_limits': 'ResourceLimits', 'status': 'str', } attribute_map = { 'contract_number': 'contractNumber', 'owner': 'owner', 'reg_domain': 'regDomain', 'resource_limits': 'resourceLimits', 'status': 'status', } def __init__(self, contract_number=None, owner=None, reg_domain=None, resource_limits=None, status=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._reg_domain = None self._resource_limits = None self._status = None self.discriminator = None if contract_number is not None: self.contract_number = contract_number if owner is not None: self.owner = owner if reg_domain is not None: self.reg_domain = reg_domain if resource_limits is not None: self.resource_limits = resource_limits if status is not None: self.status = status @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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/contracts.py000066400000000000000000000132311454002221500216350ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Contract]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/cpu_architecture_properties.py000066400000000000000000000142711454002221500254470ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/data_center_entities.py000066400000000000000000000166501454002221500240220ustar00rootroot00000000000000# 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 = { 'lans': 'Lans', 'loadbalancers': 'Loadbalancers', 'natgateways': 'NatGateways', 'networkloadbalancers': 'NetworkLoadBalancers', 'servers': 'Servers', 'volumes': 'Volumes', } attribute_map = { 'lans': 'lans', 'loadbalancers': 'loadbalancers', 'natgateways': 'natgateways', 'networkloadbalancers': 'networkloadbalancers', 'servers': 'servers', 'volumes': 'volumes', } def __init__(self, lans=None, loadbalancers=None, natgateways=None, networkloadbalancers=None, servers=None, volumes=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._lans = None self._loadbalancers = None self._natgateways = None self._networkloadbalancers = None self._servers = None self._volumes = None self.discriminator = None if lans is not None: self.lans = lans if loadbalancers is not None: self.loadbalancers = loadbalancers if natgateways is not None: self.natgateways = natgateways if networkloadbalancers is not None: self.networkloadbalancers = networkloadbalancers if servers is not None: self.servers = servers if volumes is not None: self.volumes = volumes @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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/datacenter.py000066400000000000000000000163471454002221500217620ustar00rootroot00000000000000# 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 = { 'entities': 'DataCenterEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'DatacenterProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/datacenter_element_metadata.py000066400000000000000000000341741454002221500253310ustar00rootroot00000000000000# 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 = { 'created_by': 'str', 'created_by_user_id': 'str', 'created_date': 'datetime', 'etag': 'str', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', 'last_modified_date': 'datetime', 'state': 'str', } attribute_map = { 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'created_date': 'createdDate', 'etag': 'etag', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', 'last_modified_date': 'lastModifiedDate', 'state': 'state', } def __init__(self, created_by=None, created_by_user_id=None, created_date=None, etag=None, last_modified_by=None, last_modified_by_user_id=None, last_modified_date=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._created_by = None self._created_by_user_id = None self._created_date = None self._etag = None self._last_modified_by = None self._last_modified_by_user_id = None self._last_modified_date = None self._state = None self.discriminator = None 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 created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag 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_modified_date is not None: self.last_modified_date = last_modified_date if state is not None: self.state = state @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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/datacenter_properties.py000066400000000000000000000257221454002221500242330ustar00rootroot00000000000000# 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 = { 'cpu_architecture': 'list[CpuArchitectureProperties]', 'description': 'str', 'features': 'list[str]', 'ipv6_cidr_block': 'str', 'location': 'str', 'name': 'str', 'sec_auth_protection': 'bool', 'version': 'int', } attribute_map = { 'cpu_architecture': 'cpuArchitecture', 'description': 'description', 'features': 'features', 'ipv6_cidr_block': 'ipv6CidrBlock', 'location': 'location', 'name': 'name', 'sec_auth_protection': 'secAuthProtection', 'version': 'version', } def __init__(self, cpu_architecture=None, description=None, features=None, ipv6_cidr_block=None, location=None, name=None, sec_auth_protection=None, version=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._cpu_architecture = None self._description = None self._features = None self._ipv6_cidr_block = None self._location = None self._name = None self._sec_auth_protection = None self._version = None self.discriminator = None if cpu_architecture is not None: self.cpu_architecture = cpu_architecture if description is not None: self.description = description if features is not None: self.features = features self.ipv6_cidr_block = ipv6_cidr_block self.location = location if name is not None: self.name = name if sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if version is not None: self.version = version @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 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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/datacenters.py000066400000000000000000000174161454002221500221430ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Datacenter]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/error.py000066400000000000000000000105571454002221500207760ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/error_message.py000066400000000000000000000107101454002221500224710ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/firewall_rule.py000066400000000000000000000151341454002221500224750ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'FirewallruleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/firewall_rules.py000066400000000000000000000175241454002221500226650ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[FirewallRule]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/firewallrule_properties.py000066400000000000000000000435541454002221500246210ustar00rootroot00000000000000# 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 = { 'icmp_code': 'int', 'icmp_type': 'int', 'ip_version': 'str', 'name': 'str', 'port_range_end': 'int', 'port_range_start': 'int', 'protocol': 'str', 'source_ip': 'str', 'source_mac': 'str', 'target_ip': 'str', 'type': 'str', } attribute_map = { 'icmp_code': 'icmpCode', 'icmp_type': 'icmpType', 'ip_version': 'ipVersion', 'name': 'name', 'port_range_end': 'portRangeEnd', 'port_range_start': 'portRangeStart', 'protocol': 'protocol', 'source_ip': 'sourceIp', 'source_mac': 'sourceMac', 'target_ip': 'targetIp', 'type': 'type', } def __init__(self, icmp_code=None, icmp_type=None, ip_version=None, name=None, port_range_end=None, port_range_start=None, protocol=None, source_ip=None, source_mac=None, target_ip=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._icmp_code = None self._icmp_type = None self._ip_version = None self._name = None self._port_range_end = None self._port_range_start = None self._protocol = None self._source_ip = None self._source_mac = None self._target_ip = None self._type = None self.discriminator = None self.icmp_code = icmp_code self.icmp_type = icmp_type self.ip_version = ip_version if name is not None: self.name = name if port_range_end is not None: self.port_range_end = port_range_end if port_range_start is not None: self.port_range_start = port_range_start self.protocol = protocol self.source_ip = source_ip self.source_mac = source_mac self.target_ip = target_ip if type is not None: self.type = type @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 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 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 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 65534) 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 65534) 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 > 65534): # noqa: E501 raise ValueError("Invalid value for `port_range_end`, must be a value less than or equal to `65534`") # 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 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 65534) 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 65534) 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 > 65534): # noqa: E501 raise ValueError("Invalid value for `port_range_start`, must be a value less than or equal to `65534`") # 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 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 """ 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 = ["TCP", "UDP", "ICMP", "ICMPv6", "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_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 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 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 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() sdk-python-6.1.9/ionoscloud/models/flow_log.py000066400000000000000000000147351454002221500214570ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'FlowLogProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/flow_log_properties.py000066400000000000000000000164461454002221500237340ustar00rootroot00000000000000# 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 = { 'action': 'str', 'bucket': 'str', 'direction': 'str', 'name': 'str', } attribute_map = { 'action': 'action', 'bucket': 'bucket', 'direction': 'direction', 'name': 'name', } def __init__(self, action=None, bucket=None, direction=None, name=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._action = None self._bucket = None self._direction = None self._name = None self.discriminator = None self.action = action self.bucket = bucket self.direction = direction 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 bucket(self): """Gets the bucket of this FlowLogProperties. # noqa: E501 The S3 bucket name of an existing IONOS Cloud S3 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 S3 bucket name of an existing IONOS Cloud S3 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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/flow_log_put.py000066400000000000000000000135071454002221500223430ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'FlowLogProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/flow_logs.py000066400000000000000000000172551454002221500216420ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[FlowLog]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/group.py000066400000000000000000000145331454002221500207770ustar00rootroot00000000000000# 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 = { 'entities': 'GroupEntities', 'href': 'str', 'id': 'str', 'properties': 'GroupProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, properties=None, type=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._entities = None self._href = None self._id = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/group_entities.py000066400000000000000000000104041454002221500226740ustar00rootroot00000000000000# 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 = { 'resources': 'ResourceGroups', 'users': 'GroupMembers', } attribute_map = { 'resources': 'resources', 'users': 'users', } def __init__(self, resources=None, users=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._resources = None self._users = None self.discriminator = None if resources is not None: self.resources = resources if users is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/group_members.py000066400000000000000000000133011454002221500225010ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[User]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/group_properties.py000066400000000000000000000471121454002221500232520ustar00rootroot00000000000000# 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 = { 'access_activity_log': 'bool', 'access_and_manage_certificates': 'bool', 'access_and_manage_dns': 'bool', 'access_and_manage_monitoring': 'bool', 'create_backup_unit': 'bool', 'create_data_center': 'bool', 'create_flow_log': 'bool', 'create_internet_access': 'bool', 'create_k8s_cluster': 'bool', 'create_pcc': 'bool', 'create_snapshot': 'bool', 'manage_dbaas': 'bool', 'manage_dataplatform': 'bool', 'manage_registry': 'bool', 'name': 'str', 'reserve_ip': 'bool', 's3_privilege': 'bool', } attribute_map = { 'access_activity_log': 'accessActivityLog', 'access_and_manage_certificates': 'accessAndManageCertificates', 'access_and_manage_dns': 'accessAndManageDns', 'access_and_manage_monitoring': 'accessAndManageMonitoring', 'create_backup_unit': 'createBackupUnit', 'create_data_center': 'createDataCenter', 'create_flow_log': 'createFlowLog', 'create_internet_access': 'createInternetAccess', 'create_k8s_cluster': 'createK8sCluster', 'create_pcc': 'createPcc', 'create_snapshot': 'createSnapshot', 'manage_dbaas': 'manageDBaaS', 'manage_dataplatform': 'manageDataplatform', 'manage_registry': 'manageRegistry', 'name': 'name', 'reserve_ip': 'reserveIp', 's3_privilege': 's3Privilege', } def __init__(self, access_activity_log=None, access_and_manage_certificates=None, access_and_manage_dns=None, access_and_manage_monitoring=None, create_backup_unit=None, create_data_center=None, create_flow_log=None, create_internet_access=None, create_k8s_cluster=None, create_pcc=None, create_snapshot=None, manage_dbaas=None, manage_dataplatform=None, manage_registry=None, name=None, reserve_ip=None, s3_privilege=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._access_activity_log = None self._access_and_manage_certificates = None self._access_and_manage_dns = None self._access_and_manage_monitoring = None self._create_backup_unit = None self._create_data_center = None self._create_flow_log = None self._create_internet_access = None self._create_k8s_cluster = None self._create_pcc = None self._create_snapshot = None self._manage_dbaas = None self._manage_dataplatform = None self._manage_registry = None self._name = None self._reserve_ip = None self._s3_privilege = None self.discriminator = None if access_activity_log is not None: self.access_activity_log = access_activity_log if access_and_manage_certificates is not None: self.access_and_manage_certificates = access_and_manage_certificates if access_and_manage_dns is not None: self.access_and_manage_dns = access_and_manage_dns if access_and_manage_monitoring is not None: self.access_and_manage_monitoring = access_and_manage_monitoring if create_backup_unit is not None: self.create_backup_unit = create_backup_unit if create_data_center is not None: self.create_data_center = create_data_center if create_flow_log is not None: self.create_flow_log = create_flow_log 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_pcc is not None: self.create_pcc = create_pcc if create_snapshot is not None: self.create_snapshot = create_snapshot if manage_dbaas is not None: self.manage_dbaas = manage_dbaas if manage_dataplatform is not None: self.manage_dataplatform = manage_dataplatform if manage_registry is not None: self.manage_registry = manage_registry if name is not None: self.name = name if reserve_ip is not None: self.reserve_ip = reserve_ip if s3_privilege is not None: self.s3_privilege = s3_privilege @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 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 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 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 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_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_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 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_pcc(self): """Gets the create_pcc of this GroupProperties. # noqa: E501 Create pcc privilege. # 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. Create pcc privilege. # noqa: E501 :param create_pcc: The create_pcc of this GroupProperties. # noqa: E501 :type create_pcc: bool """ self._create_pcc = create_pcc @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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/group_share.py000066400000000000000000000134561454002221500221640ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'GroupShareProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/group_share_properties.py000066400000000000000000000114511454002221500244310ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/group_shares.py000066400000000000000000000133231454002221500223400ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[GroupShare]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/group_users.py000066400000000000000000000131741454002221500222200ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Group]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/groups.py000066400000000000000000000130541454002221500211570ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Group]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/image.py000066400000000000000000000146371454002221500207320ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ImageProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/image_properties.py000066400000000000000000000517671454002221500232130ustar00rootroot00000000000000# 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 = { 'cloud_init': 'str', 'cpu_hot_plug': 'bool', 'cpu_hot_unplug': 'bool', 'description': 'str', 'disc_scsi_hot_plug': 'bool', 'disc_scsi_hot_unplug': 'bool', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'image_aliases': 'list[str]', 'image_type': 'str', 'licence_type': 'str', 'location': 'str', 'name': 'str', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'public': 'bool', 'ram_hot_plug': 'bool', 'ram_hot_unplug': 'bool', 'size': 'float', } attribute_map = { 'cloud_init': 'cloudInit', 'cpu_hot_plug': 'cpuHotPlug', 'cpu_hot_unplug': 'cpuHotUnplug', 'description': 'description', 'disc_scsi_hot_plug': 'discScsiHotPlug', 'disc_scsi_hot_unplug': 'discScsiHotUnplug', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'image_aliases': 'imageAliases', 'image_type': 'imageType', 'licence_type': 'licenceType', 'location': 'location', 'name': 'name', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'public': 'public', 'ram_hot_plug': 'ramHotPlug', 'ram_hot_unplug': 'ramHotUnplug', 'size': 'size', } def __init__(self, cloud_init=None, cpu_hot_plug=None, cpu_hot_unplug=None, description=None, disc_scsi_hot_plug=None, disc_scsi_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, image_aliases=None, image_type=None, licence_type=None, location=None, name=None, nic_hot_plug=None, nic_hot_unplug=None, public=None, ram_hot_plug=None, ram_hot_unplug=None, size=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._cloud_init = None self._cpu_hot_plug = None self._cpu_hot_unplug = None self._description = None self._disc_scsi_hot_plug = None self._disc_scsi_hot_unplug = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._image_aliases = None self._image_type = None self._licence_type = None self._location = None self._name = None self._nic_hot_plug = None self._nic_hot_unplug = None self._public = None self._ram_hot_plug = None self._ram_hot_unplug = None self._size = None self.discriminator = None if cloud_init is not None: self.cloud_init = cloud_init 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 description is not None: self.description = description 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 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 image_aliases is not None: self.image_aliases = image_aliases if image_type is not None: self.image_type = image_type self.licence_type = licence_type if location is not None: self.location = location if name is not None: self.name = name 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 public is not None: self.public = public 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 size is not None: self.size = size @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 @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 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 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 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 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 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 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", "WINDOWS2022", "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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/images.py000066400000000000000000000131241454002221500211030ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Image]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/info.py000066400000000000000000000114611454002221500205730ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/ip_block.py000066400000000000000000000147251454002221500214300ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'IpBlockProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/ip_block_properties.py000066400000000000000000000163531454002221500237030ustar00rootroot00000000000000# 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 = { 'ip_consumers': 'list[IpConsumer]', 'ips': 'list[str]', 'location': 'str', 'name': 'str', 'size': 'int', } attribute_map = { 'ip_consumers': 'ipConsumers', 'ips': 'ips', 'location': 'location', 'name': 'name', 'size': 'size', } def __init__(self, ip_consumers=None, ips=None, location=None, name=None, size=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._ip_consumers = None self._ips = None self._location = None self._name = None self._size = None self.discriminator = None if ip_consumers is not None: self.ip_consumers = ip_consumers if ips is not None: self.ips = ips self.location = location if name is not None: self.name = name self.size = size @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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/ip_blocks.py000066400000000000000000000175651454002221500216200ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[IpBlock]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/ip_consumer.py000066400000000000000000000222111454002221500221560ustar00rootroot00000000000000# 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 = { 'datacenter_id': 'str', 'datacenter_name': 'str', 'ip': 'str', 'k8s_cluster_uuid': 'str', 'k8s_node_pool_uuid': 'str', 'mac': 'str', 'nic_id': 'str', 'server_id': 'str', 'server_name': 'str', } attribute_map = { 'datacenter_id': 'datacenterId', 'datacenter_name': 'datacenterName', 'ip': 'ip', 'k8s_cluster_uuid': 'k8sClusterUuid', 'k8s_node_pool_uuid': 'k8sNodePoolUuid', 'mac': 'mac', 'nic_id': 'nicId', 'server_id': 'serverId', 'server_name': 'serverName', } def __init__(self, datacenter_id=None, datacenter_name=None, ip=None, k8s_cluster_uuid=None, k8s_node_pool_uuid=None, mac=None, nic_id=None, server_id=None, server_name=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._datacenter_id = None self._datacenter_name = None self._ip = None self._k8s_cluster_uuid = None self._k8s_node_pool_uuid = None self._mac = None self._nic_id = None self._server_id = None self._server_name = None self.discriminator = None if datacenter_id is not None: self.datacenter_id = datacenter_id if datacenter_name is not None: self.datacenter_name = datacenter_name if ip is not None: self.ip = ip if k8s_cluster_uuid is not None: self.k8s_cluster_uuid = k8s_cluster_uuid if k8s_node_pool_uuid is not None: self.k8s_node_pool_uuid = k8s_node_pool_uuid 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 @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 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 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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/ip_failover.py000066400000000000000000000101171454002221500221340ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_auto_scaling.py000066400000000000000000000131161454002221500245360ustar00rootroot00000000000000# 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 = { 'max_node_count': 'int', 'min_node_count': 'int', } attribute_map = { 'max_node_count': 'maxNodeCount', 'min_node_count': 'minNodeCount', } def __init__(self, max_node_count=None, min_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._max_node_count = None self._min_node_count = None self.discriminator = None self.max_node_count = max_node_count 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster.py000066400000000000000000000173561454002221500235610ustar00rootroot00000000000000# 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 = { 'entities': 'KubernetesClusterEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterProperties', 'type': 'str', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_entities.py000066400000000000000000000073671454002221500254660ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_for_post.py000066400000000000000000000177071454002221500254740ustar00rootroot00000000000000# 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 = { 'entities': 'KubernetesClusterEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterPropertiesForPost', 'type': 'str', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_for_put.py000066400000000000000000000176521454002221500253160ustar00rootroot00000000000000# 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 = { 'entities': 'KubernetesClusterEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesClusterPropertiesForPut', 'type': 'str', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_properties.py000066400000000000000000000404061454002221500260250ustar00rootroot00000000000000# 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 = { 'api_subnet_allow_list': 'list[str]', 'available_upgrade_versions': 'list[str]', 'k8s_version': 'str', 'location': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 'nat_gateway_ip': 'str', 'node_subnet': 'str', 'public': 'bool', 's3_buckets': 'list[S3Bucket]', 'viable_node_pool_versions': 'list[str]', } attribute_map = { 'api_subnet_allow_list': 'apiSubnetAllowList', 'available_upgrade_versions': 'availableUpgradeVersions', 'k8s_version': 'k8sVersion', 'location': 'location', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 'nat_gateway_ip': 'natGatewayIp', 'node_subnet': 'nodeSubnet', 'public': 'public', 's3_buckets': 's3Buckets', 'viable_node_pool_versions': 'viableNodePoolVersions', } def __init__(self, api_subnet_allow_list=None, available_upgrade_versions=None, k8s_version=None, location=None, maintenance_window=None, name=None, nat_gateway_ip=None, node_subnet=None, public=True, s3_buckets=None, viable_node_pool_versions=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._api_subnet_allow_list = None self._available_upgrade_versions = None self._k8s_version = None self._location = None self._maintenance_window = None self._name = None self._nat_gateway_ip = None self._node_subnet = None self._public = None self._s3_buckets = None self._viable_node_pool_versions = None self.discriminator = None if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if available_upgrade_versions is not None: self.available_upgrade_versions = available_upgrade_versions if k8s_version is not None: self.k8s_version = k8s_version if location is not None: self.location = location if maintenance_window is not None: self.maintenance_window = maintenance_window self.name = name 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 public is not None: self.public = public if s3_buckets is not None: self.s3_buckets = s3_buckets if viable_node_pool_versions is not None: self.viable_node_pool_versions = viable_node_pool_versions @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 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 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 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 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 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 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 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 s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterProperties. # noqa: E501 List of S3 bucket configured for K8s usage. For now it contains only an S3 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 S3 bucket configured for K8s usage. For now it contains only an S3 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_properties_for_post.py000066400000000000000000000336301454002221500277410ustar00rootroot00000000000000# 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 = { 'api_subnet_allow_list': 'list[str]', 'k8s_version': 'str', 'location': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 'nat_gateway_ip': 'str', 'node_subnet': 'str', 'public': 'bool', 's3_buckets': 'list[S3Bucket]', } attribute_map = { 'api_subnet_allow_list': 'apiSubnetAllowList', 'k8s_version': 'k8sVersion', 'location': 'location', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 'nat_gateway_ip': 'natGatewayIp', 'node_subnet': 'nodeSubnet', 'public': 'public', 's3_buckets': 's3Buckets', } def __init__(self, api_subnet_allow_list=None, k8s_version=None, location=None, maintenance_window=None, name=None, nat_gateway_ip=None, node_subnet=None, public=True, 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._api_subnet_allow_list = None self._k8s_version = None self._location = None self._maintenance_window = None self._name = None self._nat_gateway_ip = None self._node_subnet = None self._public = None self._s3_buckets = None self.discriminator = None if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if k8s_version is not None: self.k8s_version = k8s_version if location is not None: self.location = location if maintenance_window is not None: self.maintenance_window = maintenance_window self.name = name 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 public is not None: self.public = public if s3_buckets is not None: self.s3_buckets = s3_buckets @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 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 location(self): """Gets the location of this KubernetesClusterPropertiesForPost. # noqa: E501 This attribute is mandatory if the cluster is private. 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. 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 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 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 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 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 s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterPropertiesForPost. # noqa: E501 List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 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 S3 buckets configured for K8s usage. At the moment, it contains only one S3 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_cluster_properties_for_put.py000066400000000000000000000224211454002221500275600ustar00rootroot00000000000000# 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 = { 'api_subnet_allow_list': 'list[str]', 'k8s_version': 'str', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 's3_buckets': 'list[S3Bucket]', } attribute_map = { 'api_subnet_allow_list': 'apiSubnetAllowList', 'k8s_version': 'k8sVersion', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 's3_buckets': 's3Buckets', } def __init__(self, api_subnet_allow_list=None, k8s_version=None, maintenance_window=None, name=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._api_subnet_allow_list = None self._k8s_version = None self._maintenance_window = None self._name = None self._s3_buckets = None self.discriminator = None if api_subnet_allow_list is not None: self.api_subnet_allow_list = api_subnet_allow_list if k8s_version is not None: self.k8s_version = k8s_version if maintenance_window is not None: self.maintenance_window = maintenance_window self.name = name if s3_buckets is not None: self.s3_buckets = s3_buckets @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 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 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 s3_buckets(self): """Gets the s3_buckets of this KubernetesClusterPropertiesForPut. # noqa: E501 List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 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 S3 buckets configured for K8s usage. At the moment, it contains only one S3 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_clusters.py000066400000000000000000000144201454002221500237310ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[KubernetesCluster]', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_maintenance_window.py000066400000000000000000000131671454002221500257450ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node.py000066400000000000000000000156471454002221500230260ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'KubernetesNodeMetadata', 'properties': 'KubernetesNodeProperties', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_metadata.py000066400000000000000000000204331454002221500246530ustar00rootroot00000000000000# 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 = { 'created_date': 'datetime', 'etag': 'str', 'last_modified_date': 'datetime', 'last_software_updated_date': 'datetime', 'state': 'str', } attribute_map = { 'created_date': 'createdDate', 'etag': 'etag', 'last_modified_date': 'lastModifiedDate', 'last_software_updated_date': 'lastSoftwareUpdatedDate', 'state': 'state', } def __init__(self, created_date=None, etag=None, last_modified_date=None, last_software_updated_date=None, state=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._created_date = None self._etag = None self._last_modified_date = None self._last_software_updated_date = None self._state = None self.discriminator = None if created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag if last_modified_date is not None: self.last_modified_date = last_modified_date if last_software_updated_date is not None: self.last_software_updated_date = last_software_updated_date if state is not None: self.state = state @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 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool.py000066400000000000000000000160401454002221500240430ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolProperties', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_for_post.py000066400000000000000000000163351454002221500257650ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolPropertiesForPost', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_for_put.py000066400000000000000000000163021454002221500256020ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'KubernetesNodePoolPropertiesForPut', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_lan.py000066400000000000000000000147431454002221500247050ustar00rootroot00000000000000# 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 = { 'datacenter_id': 'str', 'dhcp': 'bool', 'id': 'int', 'routes': 'list[KubernetesNodePoolLanRoutes]', } attribute_map = { 'datacenter_id': 'datacenterId', 'dhcp': 'dhcp', 'id': 'id', 'routes': 'routes', } def __init__(self, datacenter_id=None, dhcp=None, id=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._datacenter_id = None self._dhcp = None self._id = None self._routes = None self.discriminator = None if datacenter_id is not None: self.datacenter_id = datacenter_id if dhcp is not None: self.dhcp = dhcp self.id = id if routes is not None: self.routes = routes @property def datacenter_id(self): """Gets the datacenter_id of this KubernetesNodePoolLan. # noqa: E501 The datacenter ID, requires system privileges, for internal usage only # noqa: E501 :return: The datacenter_id of this KubernetesNodePoolLan. # noqa: E501 :rtype: str """ return self._datacenter_id @datacenter_id.setter def datacenter_id(self, datacenter_id): """Sets the datacenter_id of this KubernetesNodePoolLan. The datacenter ID, requires system privileges, for internal usage only # noqa: E501 :param datacenter_id: The datacenter_id of this KubernetesNodePoolLan. # noqa: E501 :type datacenter_id: str """ self._datacenter_id = datacenter_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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_lan_routes.py000066400000000000000000000112701454002221500262760ustar00rootroot00000000000000# 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 = { 'gateway_ip': 'str', 'network': 'str', } attribute_map = { 'gateway_ip': 'gatewayIp', 'network': 'network', } def __init__(self, gateway_ip=None, network=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._gateway_ip = None self._network = None self.discriminator = None if gateway_ip is not None: self.gateway_ip = gateway_ip if network is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_properties.py000066400000000000000000000553651454002221500263340ustar00rootroot00000000000000# 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 = { 'annotations': 'dict(str, str)', 'auto_scaling': 'KubernetesAutoScaling', 'availability_zone': 'str', 'available_upgrade_versions': 'list[str]', 'cores_count': 'int', 'cpu_family': 'str', 'datacenter_id': 'str', 'k8s_version': 'str', 'labels': 'dict(str, str)', 'lans': 'list[KubernetesNodePoolLan]', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 'node_count': 'int', 'public_ips': 'list[str]', 'ram_size': 'int', 'storage_size': 'int', 'storage_type': 'str', } attribute_map = { 'annotations': 'annotations', 'auto_scaling': 'autoScaling', 'availability_zone': 'availabilityZone', 'available_upgrade_versions': 'availableUpgradeVersions', 'cores_count': 'coresCount', 'cpu_family': 'cpuFamily', 'datacenter_id': 'datacenterId', 'k8s_version': 'k8sVersion', 'labels': 'labels', 'lans': 'lans', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 'node_count': 'nodeCount', 'public_ips': 'publicIps', 'ram_size': 'ramSize', 'storage_size': 'storageSize', 'storage_type': 'storageType', } def __init__(self, annotations=None, auto_scaling=None, availability_zone=None, available_upgrade_versions=None, cores_count=None, cpu_family=None, datacenter_id=None, k8s_version=None, labels=None, lans=None, maintenance_window=None, name=None, node_count=None, public_ips=None, ram_size=None, storage_size=None, storage_type=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._annotations = None self._auto_scaling = None self._availability_zone = None self._available_upgrade_versions = None self._cores_count = None self._cpu_family = None self._datacenter_id = None self._k8s_version = None self._labels = None self._lans = None self._maintenance_window = None self._name = None self._node_count = None self._public_ips = None self._ram_size = None self._storage_size = None self._storage_type = None self.discriminator = None if annotations is not None: self.annotations = annotations if auto_scaling is not None: self.auto_scaling = auto_scaling self.availability_zone = availability_zone if available_upgrade_versions is not None: self.available_upgrade_versions = available_upgrade_versions self.cores_count = cores_count self.cpu_family = cpu_family self.datacenter_id = datacenter_id if k8s_version is not None: self.k8s_version = k8s_version if labels is not None: self.labels = labels if lans is not None: self.lans = lans if maintenance_window is not None: self.maintenance_window = maintenance_window self.name = name self.node_count = node_count if public_ips is not None: self.public_ips = public_ips self.ram_size = ram_size self.storage_size = storage_size self.storage_type = storage_type @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 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 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 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 @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 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 """ if self.local_vars_configuration.client_side_validation and cpu_family is None: # noqa: E501 raise ValueError("Invalid value for `cpu_family`, must not be `None`") # noqa: E501 self._cpu_family = cpu_family @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 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 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 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 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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_properties_for_post.py000066400000000000000000000537071454002221500302450ustar00rootroot00000000000000# 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 = { 'annotations': 'dict(str, str)', 'auto_scaling': 'KubernetesAutoScaling', 'availability_zone': 'str', 'cores_count': 'int', 'cpu_family': 'str', 'datacenter_id': 'str', 'k8s_version': 'str', 'labels': 'dict(str, str)', 'lans': 'list[KubernetesNodePoolLan]', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 'node_count': 'int', 'public_ips': 'list[str]', 'ram_size': 'int', 'storage_size': 'int', 'storage_type': 'str', } attribute_map = { 'annotations': 'annotations', 'auto_scaling': 'autoScaling', 'availability_zone': 'availabilityZone', 'cores_count': 'coresCount', 'cpu_family': 'cpuFamily', 'datacenter_id': 'datacenterId', 'k8s_version': 'k8sVersion', 'labels': 'labels', 'lans': 'lans', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 'node_count': 'nodeCount', 'public_ips': 'publicIps', 'ram_size': 'ramSize', 'storage_size': 'storageSize', 'storage_type': 'storageType', } def __init__(self, annotations=None, auto_scaling=None, availability_zone=None, cores_count=None, cpu_family=None, datacenter_id=None, k8s_version=None, labels=None, lans=None, maintenance_window=None, name=None, node_count=None, public_ips=None, ram_size=None, storage_size=None, storage_type=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._annotations = None self._auto_scaling = None self._availability_zone = None self._cores_count = None self._cpu_family = None self._datacenter_id = None self._k8s_version = None self._labels = None self._lans = None self._maintenance_window = None self._name = None self._node_count = None self._public_ips = None self._ram_size = None self._storage_size = None self._storage_type = None self.discriminator = None if annotations is not None: self.annotations = annotations if auto_scaling is not None: self.auto_scaling = auto_scaling self.availability_zone = availability_zone self.cores_count = cores_count self.cpu_family = cpu_family self.datacenter_id = datacenter_id if k8s_version is not None: self.k8s_version = k8s_version if labels is not None: self.labels = labels if lans is not None: self.lans = lans if maintenance_window is not None: self.maintenance_window = maintenance_window self.name = name self.node_count = node_count if public_ips is not None: self.public_ips = public_ips self.ram_size = ram_size self.storage_size = storage_size self.storage_type = storage_type @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 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 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 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 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 """ if self.local_vars_configuration.client_side_validation and cpu_family is None: # noqa: E501 raise ValueError("Invalid value for `cpu_family`, must not be `None`") # noqa: E501 self._cpu_family = cpu_family @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 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 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 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 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 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 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 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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pool_properties_for_put.py000066400000000000000000000312611454002221500300570ustar00rootroot00000000000000# 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 = { 'annotations': 'dict(str, str)', 'auto_scaling': 'KubernetesAutoScaling', 'k8s_version': 'str', 'labels': 'dict(str, str)', 'lans': 'list[KubernetesNodePoolLan]', 'maintenance_window': 'KubernetesMaintenanceWindow', 'name': 'str', 'node_count': 'int', 'public_ips': 'list[str]', } attribute_map = { 'annotations': 'annotations', 'auto_scaling': 'autoScaling', 'k8s_version': 'k8sVersion', 'labels': 'labels', 'lans': 'lans', 'maintenance_window': 'maintenanceWindow', 'name': 'name', 'node_count': 'nodeCount', 'public_ips': 'publicIps', } def __init__(self, annotations=None, auto_scaling=None, k8s_version=None, labels=None, lans=None, maintenance_window=None, name=None, node_count=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._annotations = None self._auto_scaling = None self._k8s_version = None self._labels = None self._lans = None self._maintenance_window = None self._name = None self._node_count = None self._public_ips = None self.discriminator = None if annotations is not None: self.annotations = annotations if auto_scaling is not None: self.auto_scaling = auto_scaling if k8s_version is not None: self.k8s_version = k8s_version if labels is not None: self.labels = labels if lans is not None: self.lans = lans if maintenance_window is not None: self.maintenance_window = maintenance_window if name is not None: self.name = name self.node_count = node_count if public_ips is not None: self.public_ips = public_ips @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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_pools.py000066400000000000000000000144471454002221500242370ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[KubernetesNodePool]', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_node_properties.py000066400000000000000000000157341454002221500252770ustar00rootroot00000000000000# 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 = { 'k8s_version': 'str', 'name': 'str', 'private_ip': 'str', 'public_ip': 'str', } attribute_map = { 'k8s_version': 'k8sVersion', 'name': 'name', 'private_ip': 'privateIP', 'public_ip': 'publicIP', } def __init__(self, k8s_version=None, name=None, private_ip=None, public_ip=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._k8s_version = None self._name = None self._private_ip = None self._public_ip = None self.discriminator = None self.k8s_version = k8s_version self.name = name if private_ip is not None: self.private_ip = private_ip if public_ip is not None: self.public_ip = public_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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/kubernetes_nodes.py000066400000000000000000000143131454002221500231760ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[KubernetesNode]', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/label.py000066400000000000000000000153261454002221500207230ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'NoStateMetaData', 'properties': 'LabelProperties', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/label_properties.py000066400000000000000000000156361454002221500232030ustar00rootroot00000000000000# 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', 'resource_href': 'str', 'resource_id': 'str', 'resource_type': 'str', 'value': 'str', } attribute_map = { 'key': 'key', 'resource_href': 'resourceHref', 'resource_id': 'resourceId', 'resource_type': 'resourceType', 'value': 'value', } def __init__(self, key=None, resource_href=None, resource_id=None, resource_type=None, value=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._resource_href = None self._resource_id = None self._resource_type = None self._value = None self.discriminator = None if key is not None: self.key = key if resource_href is not None: self.resource_href = resource_href if resource_id is not None: self.resource_id = resource_id if resource_type is not None: self.resource_type = resource_type if value is not None: self.value = value @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 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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/label_resource.py000066400000000000000000000157041454002221500226320ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'NoStateMetaData', 'properties': 'LabelResourceProperties', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/label_resource_properties.py000066400000000000000000000105161454002221500251020ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/label_resources.py000066400000000000000000000204071454002221500230110ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[LabelResource]', 'limit': 'float', 'offset': 'float', 'type': 'str', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/labels.py000066400000000000000000000137341454002221500211070ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Label]', 'type': 'str', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/lan.py000066400000000000000000000157711454002221500204220ustar00rootroot00000000000000# 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 = { 'entities': 'LanEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LanProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/lan_entities.py000066400000000000000000000067721454002221500223270ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/lan_nics.py000066400000000000000000000171711454002221500214320ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Nic]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/lan_post.py000066400000000000000000000161651454002221500214650ustar00rootroot00000000000000# 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 LanPost(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 = { 'entities': 'LanEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LanPropertiesPost', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=None, local_vars_configuration=None): # noqa: E501 """LanPost - 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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @property def entities(self): """Gets the entities of this LanPost. # noqa: E501 :return: The entities of this LanPost. # noqa: E501 :rtype: LanEntities """ return self._entities @entities.setter def entities(self, entities): """Sets the entities of this LanPost. :param entities: The entities of this LanPost. # noqa: E501 :type entities: LanEntities """ self._entities = entities @property def href(self): """Gets the href of this LanPost. # noqa: E501 URL to the object representation (absolute path). # noqa: E501 :return: The href of this LanPost. # noqa: E501 :rtype: str """ return self._href @href.setter def href(self, href): """Sets the href of this LanPost. URL to the object representation (absolute path). # noqa: E501 :param href: The href of this LanPost. # noqa: E501 :type href: str """ self._href = href @property def id(self): """Gets the id of this LanPost. # noqa: E501 The resource's unique identifier. # noqa: E501 :return: The id of this LanPost. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this LanPost. The resource's unique identifier. # noqa: E501 :param id: The id of this LanPost. # noqa: E501 :type id: str """ self._id = id @property def metadata(self): """Gets the metadata of this LanPost. # noqa: E501 :return: The metadata of this LanPost. # noqa: E501 :rtype: DatacenterElementMetadata """ return self._metadata @metadata.setter def metadata(self, metadata): """Sets the metadata of this LanPost. :param metadata: The metadata of this LanPost. # noqa: E501 :type metadata: DatacenterElementMetadata """ self._metadata = metadata @property def properties(self): """Gets the properties of this LanPost. # noqa: E501 :return: The properties of this LanPost. # noqa: E501 :rtype: LanPropertiesPost """ return self._properties @properties.setter def properties(self, properties): """Sets the properties of this LanPost. :param properties: The properties of this LanPost. # noqa: E501 :type properties: LanPropertiesPost """ 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 type(self): """Gets the type of this LanPost. # noqa: E501 The type of object that has been created. # noqa: E501 :return: The type of this LanPost. # noqa: E501 :rtype: Type """ return self._type @type.setter def type(self, type): """Sets the type of this LanPost. The type of object that has been created. # noqa: E501 :param type: The type of this LanPost. # noqa: E501 :type type: Type """ 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, LanPost): 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, LanPost): return True return self.to_dict() != other.to_dict() sdk-python-6.1.9/ionoscloud/models/lan_properties.py000066400000000000000000000205561454002221500226730ustar00rootroot00000000000000# 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 = { 'ip_failover': 'list[IPFailover]', 'ipv6_cidr_block': 'str', 'name': 'str', 'pcc': 'str', 'public': 'bool', } attribute_map = { 'ip_failover': 'ipFailover', 'ipv6_cidr_block': 'ipv6CidrBlock', 'name': 'name', 'pcc': 'pcc', 'public': 'public', } def __init__(self, ip_failover=None, ipv6_cidr_block=None, name=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._ip_failover = None self._ipv6_cidr_block = None self._name = None self._pcc = None self._public = None self.discriminator = None if ip_failover is not None: self.ip_failover = ip_failover self.ipv6_cidr_block = ipv6_cidr_block if name is not None: self.name = name if pcc is not None: self.pcc = pcc if public is not None: self.public = public @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 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 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 pcc(self): """Gets the pcc of this LanProperties. # noqa: E501 The unique identifier of the private Cross-Connect the LAN is connected to, if any. # 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 private Cross-Connect the LAN is connected to, if any. # 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 This LAN faces the public Internet. # 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. This LAN faces the public Internet. # 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() sdk-python-6.1.9/ionoscloud/models/lan_properties_post.py000066400000000000000000000203561454002221500237360ustar00rootroot00000000000000# 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 LanPropertiesPost(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_failover': 'list[IPFailover]', 'ipv6_cidr_block': 'str', 'name': 'str', 'pcc': 'str', 'public': 'bool', } attribute_map = { 'ip_failover': 'ipFailover', 'ipv6_cidr_block': 'ipv6CidrBlock', 'name': 'name', 'pcc': 'pcc', 'public': 'public', } def __init__(self, ip_failover=None, ipv6_cidr_block=None, name=None, pcc=None, public=None, local_vars_configuration=None): # noqa: E501 """LanPropertiesPost - 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_failover = None self._ipv6_cidr_block = None self._name = None self._pcc = None self._public = None self.discriminator = None if ip_failover is not None: self.ip_failover = ip_failover self.ipv6_cidr_block = ipv6_cidr_block if name is not None: self.name = name if pcc is not None: self.pcc = pcc if public is not None: self.public = public @property def ip_failover(self): """Gets the ip_failover of this LanPropertiesPost. # noqa: E501 IP failover configurations for lan # noqa: E501 :return: The ip_failover of this LanPropertiesPost. # noqa: E501 :rtype: list[IPFailover] """ return self._ip_failover @ip_failover.setter def ip_failover(self, ip_failover): """Sets the ip_failover of this LanPropertiesPost. IP failover configurations for lan # noqa: E501 :param ip_failover: The ip_failover of this LanPropertiesPost. # noqa: E501 :type ip_failover: list[IPFailover] """ self._ip_failover = ip_failover @property def ipv6_cidr_block(self): """Gets the ipv6_cidr_block of this LanPropertiesPost. # 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. If you choose the IPv6 CIDR block 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 NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. # noqa: E501 :return: The ipv6_cidr_block of this LanPropertiesPost. # 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 LanPropertiesPost. 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. If you choose the IPv6 CIDR block 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 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 LanPropertiesPost. # noqa: E501 :type ipv6_cidr_block: str """ self._ipv6_cidr_block = ipv6_cidr_block @property def name(self): """Gets the name of this LanPropertiesPost. # noqa: E501 The name of the resource. # noqa: E501 :return: The name of this LanPropertiesPost. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this LanPropertiesPost. The name of the resource. # noqa: E501 :param name: The name of this LanPropertiesPost. # noqa: E501 :type name: str """ self._name = name @property def pcc(self): """Gets the pcc of this LanPropertiesPost. # noqa: E501 The unique identifier of the private Cross-Connect the LAN is connected to, if any. # noqa: E501 :return: The pcc of this LanPropertiesPost. # noqa: E501 :rtype: str """ return self._pcc @pcc.setter def pcc(self, pcc): """Sets the pcc of this LanPropertiesPost. The unique identifier of the private Cross-Connect the LAN is connected to, if any. # noqa: E501 :param pcc: The pcc of this LanPropertiesPost. # noqa: E501 :type pcc: str """ self._pcc = pcc @property def public(self): """Gets the public of this LanPropertiesPost. # noqa: E501 This LAN faces the public Internet. # noqa: E501 :return: The public of this LanPropertiesPost. # noqa: E501 :rtype: bool """ return self._public @public.setter def public(self, public): """Sets the public of this LanPropertiesPost. This LAN faces the public Internet. # noqa: E501 :param public: The public of this LanPropertiesPost. # 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, LanPropertiesPost): 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, LanPropertiesPost): return True return self.to_dict() != other.to_dict() sdk-python-6.1.9/ionoscloud/models/lans.py000066400000000000000000000170311454002221500205740ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Lan]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/loadbalancer.py000066400000000000000000000164531454002221500222550ustar00rootroot00000000000000# 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 = { 'entities': 'LoadbalancerEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LoadbalancerProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/loadbalancer_entities.py000066400000000000000000000073711454002221500241600ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/loadbalancer_properties.py000066400000000000000000000124121454002221500245200ustar00rootroot00000000000000# 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 = { 'dhcp': 'bool', 'ip': 'str', 'name': 'str', } attribute_map = { 'dhcp': 'dhcp', 'ip': 'ip', 'name': 'name', } def __init__(self, dhcp=None, ip=None, name=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._dhcp = None self._ip = None self._name = None self.discriminator = None if dhcp is not None: self.dhcp = dhcp self.ip = ip if name is not None: self.name = name @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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/loadbalancers.py000066400000000000000000000175241454002221500224400ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Loadbalancer]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/location.py000066400000000000000000000147601454002221500214550ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'LocationProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/location_properties.py000066400000000000000000000147771454002221500237410ustar00rootroot00000000000000# 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 = { 'cpu_architecture': 'list[CpuArchitectureProperties]', 'features': 'list[str]', 'image_aliases': 'list[str]', 'name': 'str', } attribute_map = { 'cpu_architecture': 'cpuArchitecture', 'features': 'features', 'image_aliases': 'imageAliases', 'name': 'name', } def __init__(self, cpu_architecture=None, features=None, image_aliases=None, name=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._cpu_architecture = None self._features = None self._image_aliases = None self._name = None self.discriminator = None if cpu_architecture is not None: self.cpu_architecture = cpu_architecture if features is not None: self.features = features if image_aliases is not None: self.image_aliases = image_aliases if name is not None: self.name = name @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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/locations.py000066400000000000000000000132211454002221500216270ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Location]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway.py000066400000000000000000000163471454002221500221530ustar00rootroot00000000000000# 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 = { 'entities': 'NatGatewayEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NatGatewayProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_entities.py000066400000000000000000000104421454002221500240450ustar00rootroot00000000000000# 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 = { 'flowlogs': 'FlowLogs', 'rules': 'NatGatewayRules', } attribute_map = { 'flowlogs': 'flowlogs', 'rules': 'rules', } def __init__(self, flowlogs=None, rules=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._flowlogs = None self._rules = None self.discriminator = None if flowlogs is not None: self.flowlogs = flowlogs if rules is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_lan_properties.py000066400000000000000000000117021454002221500252470ustar00rootroot00000000000000# 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 = { 'gateway_ips': 'list[str]', 'id': 'int', } attribute_map = { 'gateway_ips': 'gatewayIps', 'id': 'id', } def __init__(self, gateway_ips=None, id=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._gateway_ips = None self._id = None self.discriminator = None if gateway_ips is not None: self.gateway_ips = gateway_ips 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_properties.py000066400000000000000000000137571454002221500244310ustar00rootroot00000000000000# 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 = { 'lans': 'list[NatGatewayLanProperties]', 'name': 'str', 'public_ips': 'list[str]', } attribute_map = { 'lans': 'lans', 'name': 'name', 'public_ips': 'publicIps', } def __init__(self, lans=None, name=None, public_ips=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._lans = None self._name = None self._public_ips = None self.discriminator = None if lans is not None: self.lans = lans self.name = name 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_put.py000066400000000000000000000136141454002221500230350ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'NatGatewayProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rule.py000066400000000000000000000152221454002221500231710ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NatGatewayRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rule_properties.py000066400000000000000000000247651454002221500254610ustar00rootroot00000000000000# 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', 'protocol': 'NatGatewayRuleProtocol', 'public_ip': 'str', 'source_subnet': 'str', 'target_port_range': 'TargetPortRange', 'target_subnet': 'str', 'type': 'NatGatewayRuleType', } attribute_map = { 'name': 'name', 'protocol': 'protocol', 'public_ip': 'publicIp', 'source_subnet': 'sourceSubnet', 'target_port_range': 'targetPortRange', 'target_subnet': 'targetSubnet', 'type': 'type', } def __init__(self, name=None, protocol=None, public_ip=None, source_subnet=None, target_port_range=None, target_subnet=None, type=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._protocol = None self._public_ip = None self._source_subnet = None self._target_port_range = None self._target_subnet = None self._type = None self.discriminator = None self.name = name if protocol is not None: self.protocol = protocol self.public_ip = public_ip self.source_subnet = source_subnet if target_port_range is not None: self.target_port_range = target_port_range if target_subnet is not None: self.target_subnet = target_subnet if type is not None: self.type = type @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 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 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 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 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 @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 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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rule_protocol.py000066400000000000000000000061731454002221500251170ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rule_put.py000066400000000000000000000137501454002221500240650ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'NatGatewayRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rule_type.py000066400000000000000000000060541454002221500242350ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/nat_gateway_rules.py000066400000000000000000000134331454002221500233560ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[NatGatewayRule]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nat_gateways.py000066400000000000000000000174161454002221500223340ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[NatGateway]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer.py000066400000000000000000000170311454002221500241560ustar00rootroot00000000000000# 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 = { 'entities': 'NetworkLoadBalancerEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NetworkLoadBalancerProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_entities.py000066400000000000000000000112311454002221500260560ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule.py000066400000000000000000000162231454002221500274310ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NetworkLoadBalancerForwardingRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule_health_check.py000066400000000000000000000172371454002221500321210ustar00rootroot00000000000000# 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', 'retries': 'int', 'target_timeout': 'int', } attribute_map = { 'client_timeout': 'clientTimeout', 'connect_timeout': 'connectTimeout', 'retries': 'retries', 'target_timeout': 'targetTimeout', } def __init__(self, client_timeout=None, connect_timeout=None, retries=None, target_timeout=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._retries = None self._target_timeout = 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 retries is not None: self.retries = retries if target_timeout is not None: self.target_timeout = target_timeout @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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule_properties.py000066400000000000000000000263021454002221500317040ustar00rootroot00000000000000# 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 = { 'algorithm': 'str', 'health_check': 'NetworkLoadBalancerForwardingRuleHealthCheck', 'listener_ip': 'str', 'listener_port': 'int', 'name': 'str', 'protocol': 'str', 'targets': 'list[NetworkLoadBalancerForwardingRuleTarget]', } attribute_map = { 'algorithm': 'algorithm', 'health_check': 'healthCheck', 'listener_ip': 'listenerIp', 'listener_port': 'listenerPort', 'name': 'name', 'protocol': 'protocol', 'targets': 'targets', } def __init__(self, algorithm=None, health_check=None, listener_ip=None, listener_port=None, name=None, protocol=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._algorithm = None self._health_check = None self._listener_ip = None self._listener_port = None self._name = None self._protocol = None self._targets = None self.discriminator = None self.algorithm = algorithm if health_check is not None: self.health_check = health_check self.listener_ip = listener_ip self.listener_port = listener_port self.name = name self.protocol = protocol self.targets = targets @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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule_put.py000066400000000000000000000146351454002221500303260ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'NetworkLoadBalancerForwardingRuleProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule_target.py000066400000000000000000000220131454002221500307710ustar00rootroot00000000000000# 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 = { 'health_check': 'NetworkLoadBalancerForwardingRuleTargetHealthCheck', 'ip': 'str', 'port': 'int', 'weight': 'int', 'proxy_protocol': 'str', } attribute_map = { 'health_check': 'healthCheck', 'ip': 'ip', 'port': 'port', 'weight': 'weight', 'proxy_protocol': 'proxyProtocol', } def __init__(self, health_check=None, ip=None, port=None, weight=None, proxy_protocol='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._health_check = None self._ip = None self._port = None self._weight = None self._proxy_protocol = None self.discriminator = None if health_check is not None: self.health_check = health_check self.ip = ip self.port = port self.weight = weight if proxy_protocol is not None: 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 @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 ProxyProtocol is used to set the 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. ProxyProtocol is used to set the 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rule_target_health_check.py000066400000000000000000000150051454002221500334560ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_forwarding_rules.py000066400000000000000000000210631454002221500276120ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[NetworkLoadBalancerForwardingRule]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_properties.py000066400000000000000000000205571454002221500264410ustar00rootroot00000000000000# 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 = { 'ips': 'list[str]', 'lb_private_ips': 'list[str]', 'listener_lan': 'int', 'name': 'str', 'target_lan': 'int', } attribute_map = { 'ips': 'ips', 'lb_private_ips': 'lbPrivateIps', 'listener_lan': 'listenerLan', 'name': 'name', 'target_lan': 'targetLan', } def __init__(self, ips=None, lb_private_ips=None, listener_lan=None, name=None, target_lan=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._ips = None self._lb_private_ips = None self._listener_lan = None self._name = None self._target_lan = None self.discriminator = None if ips is not None: self.ips = ips if lb_private_ips is not None: self.lb_private_ips = lb_private_ips self.listener_lan = listener_lan self.name = name self.target_lan = target_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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancer_put.py000066400000000000000000000141331454002221500250460ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'NetworkLoadBalancerProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/network_load_balancers.py000066400000000000000000000201111454002221500243320ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[NetworkLoadBalancer]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/nic.py000066400000000000000000000157711454002221500204210ustar00rootroot00000000000000# 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 = { 'entities': 'NicEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'NicProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/nic_entities.py000066400000000000000000000105601454002221500223140ustar00rootroot00000000000000# 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 = { 'firewallrules': 'FirewallRules', 'flowlogs': 'FlowLogs', } attribute_map = { 'firewallrules': 'firewallrules', 'flowlogs': 'flowlogs', } def __init__(self, firewallrules=None, flowlogs=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._firewallrules = None self._flowlogs = None self.discriminator = None if firewallrules is not None: self.firewallrules = firewallrules if flowlogs is not None: 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 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 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() sdk-python-6.1.9/ionoscloud/models/nic_properties.py000066400000000000000000000404461454002221500226720ustar00rootroot00000000000000# 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 = { 'device_number': 'int', 'dhcp': 'bool', 'dhcpv6': 'bool', 'firewall_active': 'bool', 'firewall_type': 'str', 'ips': 'list[str]', 'ipv6_cidr_block': 'str', 'ipv6_ips': 'list[str]', 'lan': 'int', 'mac': 'str', 'name': 'str', 'pci_slot': 'int', } attribute_map = { 'device_number': 'deviceNumber', 'dhcp': 'dhcp', 'dhcpv6': 'dhcpv6', 'firewall_active': 'firewallActive', 'firewall_type': 'firewallType', 'ips': 'ips', 'ipv6_cidr_block': 'ipv6CidrBlock', 'ipv6_ips': 'ipv6Ips', 'lan': 'lan', 'mac': 'mac', 'name': 'name', 'pci_slot': 'pciSlot', } def __init__(self, device_number=None, dhcp=True, dhcpv6=None, firewall_active=None, firewall_type=None, ips=None, ipv6_cidr_block=None, ipv6_ips=None, lan=None, mac=None, name=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._device_number = None self._dhcp = None self._dhcpv6 = None self._firewall_active = None self._firewall_type = None self._ips = None self._ipv6_cidr_block = None self._ipv6_ips = None self._lan = None self._mac = None self._name = None self._pci_slot = None self.discriminator = None if device_number is not None: self.device_number = device_number if dhcp is not None: self.dhcp = dhcp self.dhcpv6 = dhcpv6 if firewall_active is not None: self.firewall_active = firewall_active if firewall_type is not None: self.firewall_type = firewall_type self.ips = ips self.ipv6_cidr_block = ipv6_cidr_block self.ipv6_ips = ipv6_ips self.lan = lan if mac is not None: self.mac = mac if name is not None: self.name = name if pci_slot is not None: self.pci_slot = pci_slot @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 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 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 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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/nic_put.py000066400000000000000000000133531454002221500213030ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'NicProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/nics.py000066400000000000000000000170311454002221500205730ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Nic]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/no_state_meta_data.py000066400000000000000000000234131454002221500234530ustar00rootroot00000000000000# 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 = { 'created_by': 'str', 'created_by_user_id': 'str', 'created_date': 'datetime', 'etag': 'str', 'last_modified_by': 'str', 'last_modified_by_user_id': 'str', 'last_modified_date': 'datetime', } attribute_map = { 'created_by': 'createdBy', 'created_by_user_id': 'createdByUserId', 'created_date': 'createdDate', 'etag': 'etag', 'last_modified_by': 'lastModifiedBy', 'last_modified_by_user_id': 'lastModifiedByUserId', 'last_modified_date': 'lastModifiedDate', } def __init__(self, created_by=None, created_by_user_id=None, created_date=None, etag=None, last_modified_by=None, last_modified_by_user_id=None, last_modified_date=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._created_by = None self._created_by_user_id = None self._created_date = None self._etag = None self._last_modified_by = None self._last_modified_by_user_id = None self._last_modified_date = None self.discriminator = None 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 created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag 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_modified_date is not None: self.last_modified_date = last_modified_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 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/pagination_links.py000066400000000000000000000126321454002221500231720ustar00rootroot00000000000000# 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 = { 'next': 'str', 'prev': 'str', '_self': 'str', } attribute_map = { 'next': 'next', 'prev': 'prev', '_self': 'self', } def __init__(self, next=None, prev=None, _self=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._next = None self._prev = None self.__self = None self.discriminator = None if next is not None: self.next = next if prev is not None: self.prev = prev if _self is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/peer.py000066400000000000000000000140421454002221500205710ustar00rootroot00000000000000# 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 = { 'datacenter_id': 'str', 'datacenter_name': 'str', 'id': 'str', 'location': 'str', 'name': 'str', } attribute_map = { 'datacenter_id': 'datacenterId', 'datacenter_name': 'datacenterName', 'id': 'id', 'location': 'location', 'name': 'name', } def __init__(self, datacenter_id=None, datacenter_name=None, id=None, location=None, name=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._datacenter_id = None self._datacenter_name = None self._id = None self._location = None self._name = None self.discriminator = None if datacenter_id is not None: self.datacenter_id = datacenter_id if datacenter_name is not None: self.datacenter_name = datacenter_name if id is not None: self.id = id if location is not None: self.location = location if name is not None: self.name = name @property def datacenter_id(self): """Gets the datacenter_id of this Peer. # 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. :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 :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. :param datacenter_name: The datacenter_name of this Peer. # noqa: E501 :type datacenter_name: str """ self._datacenter_name = datacenter_name @property def id(self): """Gets the id of this Peer. # 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. :param id: The id of this Peer. # noqa: E501 :type id: str """ self._id = id @property def location(self): """Gets the location of this Peer. # 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. :param location: The location of this Peer. # noqa: E501 :type location: str """ self._location = location @property def name(self): """Gets the name of this Peer. # 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. :param name: The name of this Peer. # noqa: E501 :type name: str """ 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, 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() sdk-python-6.1.9/ionoscloud/models/private_cross_connect.py000066400000000000000000000154311454002221500242350ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'PrivateCrossConnectProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/private_cross_connect_properties.py000066400000000000000000000154251454002221500265140ustar00rootroot00000000000000# 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 = { 'connectable_datacenters': 'list[ConnectableDatacenter]', 'description': 'str', 'name': 'str', 'peers': 'list[Peer]', } attribute_map = { 'connectable_datacenters': 'connectableDatacenters', 'description': 'description', 'name': 'name', 'peers': 'peers', } def __init__(self, connectable_datacenters=None, description=None, name=None, peers=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._connectable_datacenters = None self._description = None self._name = None self._peers = None self.discriminator = None if connectable_datacenters is not None: self.connectable_datacenters = connectable_datacenters if description is not None: self.description = description if name is not None: self.name = name if peers is not None: 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 joined to this private Cross-Connect. # 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 joined to this private Cross-Connect. # noqa: E501 :param connectable_datacenters: The connectable_datacenters of this PrivateCrossConnectProperties. # noqa: E501 :type connectable_datacenters: list[ConnectableDatacenter] """ self._connectable_datacenters = connectable_datacenters @property def description(self): """Gets the description of this PrivateCrossConnectProperties. # noqa: E501 Human-readable description. # 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. # noqa: E501 :param description: The description of this PrivateCrossConnectProperties. # noqa: E501 :type description: str """ self._description = description @property def name(self): """Gets the name of this PrivateCrossConnectProperties. # noqa: E501 The name of the resource. # 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 resource. # noqa: E501 :param name: The name of this PrivateCrossConnectProperties. # noqa: E501 :type name: str """ self._name = name @property def peers(self): """Gets the peers of this PrivateCrossConnectProperties. # noqa: E501 Read-Only attribute. Lists LAN's joined to this private 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 joined to this private Cross-Connect. # noqa: E501 :param peers: The peers of this PrivateCrossConnectProperties. # noqa: E501 :type peers: list[Peer] """ self._peers = peers 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() sdk-python-6.1.9/ionoscloud/models/private_cross_connects.py000066400000000000000000000136161454002221500244230ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[PrivateCrossConnect]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/remote_console_url.py000066400000000000000000000072471454002221500235460ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/request.py000066400000000000000000000146671454002221500213430ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'RequestMetadata', 'properties': 'RequestProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/request_metadata.py000066400000000000000000000147261454002221500231770ustar00rootroot00000000000000# 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_by': 'str', 'created_date': 'datetime', 'etag': 'str', 'request_status': 'RequestStatus', } attribute_map = { 'created_by': 'createdBy', 'created_date': 'createdDate', 'etag': 'etag', 'request_status': 'requestStatus', } def __init__(self, created_by=None, created_date=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_by = None self._created_date = None self._etag = None self._request_status = None self.discriminator = None if created_by is not None: self.created_by = created_by if created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag if request_status is not None: self.request_status = request_status @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 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 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() sdk-python-6.1.9/ionoscloud/models/request_properties.py000066400000000000000000000126471454002221500236130ustar00rootroot00000000000000# 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 = { 'body': 'str', 'headers': 'dict(str, str)', 'method': 'str', 'url': 'str', } attribute_map = { 'body': 'body', 'headers': 'headers', 'method': 'method', 'url': 'url', } def __init__(self, body=None, headers=None, method=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._body = None self._headers = None self._method = None self._url = None self.discriminator = None if body is not None: self.body = body if headers is not None: self.headers = headers if method is not None: self.method = method if url is not None: self.url = url @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/request_status.py000066400000000000000000000133051454002221500227320ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'RequestStatusMetadata', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, type=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._href = None self._id = None self._metadata = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/request_status_metadata.py000066400000000000000000000146061454002221500245770ustar00rootroot00000000000000# 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 = { 'etag': 'str', 'message': 'str', 'status': 'str', 'targets': 'list[RequestTarget]', } attribute_map = { 'etag': 'etag', 'message': 'message', 'status': 'status', 'targets': 'targets', } def __init__(self, etag=None, message=None, status=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._etag = None self._message = None self._status = None self._targets = None self.discriminator = None if etag is not None: self.etag = etag if message is not None: self.message = message if status is not None: self.status = status if targets is not None: self.targets = targets @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/request_target.py000066400000000000000000000110701454002221500226720ustar00rootroot00000000000000# 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 = { 'status': 'str', 'target': 'ResourceReference', } attribute_map = { 'status': 'status', 'target': 'target', } def __init__(self, status=None, target=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._status = None self._target = None self.discriminator = None if status is not None: self.status = status if target is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/requests.py000066400000000000000000000205071454002221500215140ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Request]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items self.limit = limit self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/resource.py000066400000000000000000000157431454002221500214760ustar00rootroot00000000000000# 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 = { 'entities': 'ResourceEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ResourceProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata if properties is not None: self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/resource_entities.py000066400000000000000000000071411454002221500233730ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/resource_groups.py000066400000000000000000000133251454002221500230670ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Resource]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/resource_limits.py000066400000000000000000000735421454002221500230600ustar00rootroot00000000000000# 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_contract': 'int', 'cores_per_server': 'int', 'cores_provisioned': 'int', 'das_volume_provisioned': 'int', 'hdd_limit_per_contract': 'int', 'hdd_limit_per_volume': 'int', 'hdd_volume_provisioned': 'int', 'k8s_cluster_limit_total': 'int', 'k8s_clusters_provisioned': 'int', 'nat_gateway_limit_total': 'int', 'nat_gateway_provisioned': 'int', 'nlb_limit_total': 'int', 'nlb_provisioned': 'int', 'ram_per_contract': 'int', 'ram_per_server': 'int', 'ram_provisioned': 'int', 'reservable_ips': 'int', 'reserved_ips_in_use': 'int', 'reserved_ips_on_contract': 'int', 'ssd_limit_per_contract': 'int', 'ssd_limit_per_volume': 'int', 'ssd_volume_provisioned': 'int', } attribute_map = { 'cores_per_contract': 'coresPerContract', 'cores_per_server': 'coresPerServer', 'cores_provisioned': 'coresProvisioned', 'das_volume_provisioned': 'dasVolumeProvisioned', 'hdd_limit_per_contract': 'hddLimitPerContract', 'hdd_limit_per_volume': 'hddLimitPerVolume', 'hdd_volume_provisioned': 'hddVolumeProvisioned', 'k8s_cluster_limit_total': 'k8sClusterLimitTotal', 'k8s_clusters_provisioned': 'k8sClustersProvisioned', 'nat_gateway_limit_total': 'natGatewayLimitTotal', 'nat_gateway_provisioned': 'natGatewayProvisioned', 'nlb_limit_total': 'nlbLimitTotal', 'nlb_provisioned': 'nlbProvisioned', 'ram_per_contract': 'ramPerContract', 'ram_per_server': 'ramPerServer', 'ram_provisioned': 'ramProvisioned', 'reservable_ips': 'reservableIps', 'reserved_ips_in_use': 'reservedIpsInUse', 'reserved_ips_on_contract': 'reservedIpsOnContract', 'ssd_limit_per_contract': 'ssdLimitPerContract', 'ssd_limit_per_volume': 'ssdLimitPerVolume', 'ssd_volume_provisioned': 'ssdVolumeProvisioned', } def __init__(self, cores_per_contract=None, cores_per_server=None, cores_provisioned=None, das_volume_provisioned=None, hdd_limit_per_contract=None, hdd_limit_per_volume=None, hdd_volume_provisioned=None, k8s_cluster_limit_total=None, k8s_clusters_provisioned=None, nat_gateway_limit_total=None, nat_gateway_provisioned=None, nlb_limit_total=None, nlb_provisioned=None, ram_per_contract=None, ram_per_server=None, ram_provisioned=None, reservable_ips=None, reserved_ips_in_use=None, reserved_ips_on_contract=None, ssd_limit_per_contract=None, ssd_limit_per_volume=None, ssd_volume_provisioned=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_contract = None self._cores_per_server = None self._cores_provisioned = None self._das_volume_provisioned = None self._hdd_limit_per_contract = None self._hdd_limit_per_volume = None self._hdd_volume_provisioned = None self._k8s_cluster_limit_total = None self._k8s_clusters_provisioned = None self._nat_gateway_limit_total = None self._nat_gateway_provisioned = None self._nlb_limit_total = None self._nlb_provisioned = None self._ram_per_contract = None self._ram_per_server = None self._ram_provisioned = None self._reservable_ips = None self._reserved_ips_in_use = None self._reserved_ips_on_contract = None self._ssd_limit_per_contract = None self._ssd_limit_per_volume = None self._ssd_volume_provisioned = None self.discriminator = None self.cores_per_contract = cores_per_contract self.cores_per_server = cores_per_server self.cores_provisioned = cores_provisioned self.das_volume_provisioned = das_volume_provisioned self.hdd_limit_per_contract = hdd_limit_per_contract self.hdd_limit_per_volume = hdd_limit_per_volume self.hdd_volume_provisioned = hdd_volume_provisioned self.k8s_cluster_limit_total = k8s_cluster_limit_total self.k8s_clusters_provisioned = k8s_clusters_provisioned self.nat_gateway_limit_total = nat_gateway_limit_total self.nat_gateway_provisioned = nat_gateway_provisioned self.nlb_limit_total = nlb_limit_total self.nlb_provisioned = nlb_provisioned self.ram_per_contract = ram_per_contract self.ram_per_server = ram_per_server self.ram_provisioned = ram_provisioned self.reservable_ips = reservable_ips self.reserved_ips_in_use = reserved_ips_in_use self.reserved_ips_on_contract = reserved_ips_on_contract self.ssd_limit_per_contract = ssd_limit_per_contract self.ssd_limit_per_volume = ssd_limit_per_volume self.ssd_volume_provisioned = ssd_volume_provisioned @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_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_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 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 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_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_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 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 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 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 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_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_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 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_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 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 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_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_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 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() sdk-python-6.1.9/ionoscloud/models/resource_properties.py000066400000000000000000000123141454002221500237410ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/resource_reference.py000066400000000000000000000123071454002221500235050ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'type': 'type', } def __init__(self, href=None, id=None, type=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._href = None self._id = None self._type = None self.discriminator = None if href is not None: self.href = href self.id = id if type is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/resources.py000066400000000000000000000131611454002221500216510ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Resource]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/resources_users.py000066400000000000000000000133251454002221500230740ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Resource]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/s3_bucket.py000066400000000000000000000073221454002221500215230ustar00rootroot00000000000000# 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 S3 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 S3 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() sdk-python-6.1.9/ionoscloud/models/s3_key.py000066400000000000000000000145331454002221500210400ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'S3KeyMetadata', 'properties': 'S3KeyProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/s3_key_metadata.py000066400000000000000000000114641454002221500227000ustar00rootroot00000000000000# 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 = { 'created_date': 'datetime', 'etag': 'str', } attribute_map = { 'created_date': 'createdDate', 'etag': 'etag', } def __init__(self, created_date=None, etag=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._created_date = None self._etag = None self.discriminator = None if created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag @property def created_date(self): """Gets the created_date of this S3KeyMetadata. # noqa: E501 The time when the S3 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 S3 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 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 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() sdk-python-6.1.9/ionoscloud/models/s3_key_properties.py000066400000000000000000000107341454002221500233130ustar00rootroot00000000000000# 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 = { 'active': 'bool', 'secret_key': 'str', } attribute_map = { 'active': 'active', 'secret_key': 'secretKey', } def __init__(self, active=None, secret_key=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._active = None self._secret_key = None self.discriminator = None if active is not None: self.active = active if secret_key is not None: self.secret_key = secret_key @property def active(self): """Gets the active of this S3KeyProperties. # noqa: E501 Denotes weather the S3 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 S3 key is active. # noqa: E501 :param active: The active of this S3KeyProperties. # noqa: E501 :type active: bool """ self._active = active @property def secret_key(self): """Gets the secret_key of this S3KeyProperties. # noqa: E501 Secret of the S3 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 S3 key. # noqa: E501 :param secret_key: The secret_key of this S3KeyProperties. # noqa: E501 :type secret_key: str """ self._secret_key = secret_key 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() sdk-python-6.1.9/ionoscloud/models/s3_keys.py000066400000000000000000000130541454002221500212200ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[S3Key]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/s3_object_storage_sso.py000066400000000000000000000073421454002221500241260ustar00rootroot00000000000000# 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 S3 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 S3 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() sdk-python-6.1.9/ionoscloud/models/server.py000066400000000000000000000161371454002221500211530ustar00rootroot00000000000000# 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 = { 'entities': 'ServerEntities', 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'ServerProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/server_entities.py000066400000000000000000000114771454002221500230610ustar00rootroot00000000000000# 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', 'nics': 'Nics', 'volumes': 'AttachedVolumes', } attribute_map = { 'cdroms': 'cdroms', 'nics': 'nics', 'volumes': 'volumes', } def __init__(self, cdroms=None, nics=None, volumes=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._nics = None self._volumes = None self.discriminator = None if cdroms is not None: self.cdroms = cdroms if nics is not None: self.nics = nics if volumes is not None: self.volumes = volumes @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/server_properties.py000066400000000000000000000314141454002221500234220ustar00rootroot00000000000000# 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 = { 'availability_zone': 'str', 'boot_cdrom': 'ResourceReference', 'boot_volume': 'ResourceReference', 'cores': 'int', 'cpu_family': 'str', 'name': 'str', 'ram': 'int', 'template_uuid': 'str', 'type': 'str', 'vm_state': 'str', } attribute_map = { 'availability_zone': 'availabilityZone', 'boot_cdrom': 'bootCdrom', 'boot_volume': 'bootVolume', 'cores': 'cores', 'cpu_family': 'cpuFamily', 'name': 'name', 'ram': 'ram', 'template_uuid': 'templateUuid', 'type': 'type', 'vm_state': 'vmState', } def __init__(self, availability_zone=None, boot_cdrom=None, boot_volume=None, cores=None, cpu_family=None, name=None, ram=None, template_uuid=None, type=None, vm_state=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._availability_zone = None self._boot_cdrom = None self._boot_volume = None self._cores = None self._cpu_family = None self._name = None self._ram = None self._template_uuid = None self._type = None self._vm_state = None self.discriminator = None if availability_zone is not None: self.availability_zone = availability_zone if boot_cdrom is not None: self.boot_cdrom = boot_cdrom if boot_volume is not None: self.boot_volume = boot_volume if cores is not None: self.cores = cores if cpu_family is not None: self.cpu_family = cpu_family if name is not None: self.name = name if ram is not None: self.ram = ram if template_uuid is not None: self.template_uuid = template_uuid if type is not None: self.type = type if vm_state is not None: self.vm_state = vm_state @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 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 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 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 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 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 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 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 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 type(self): """Gets the type of this ServerProperties. # noqa: E501 Server type: CUBE or ENTERPRISE. # 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 or ENTERPRISE. # noqa: E501 :param type: The type of this ServerProperties. # noqa: E501 :type type: str """ self._type = type @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 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() sdk-python-6.1.9/ionoscloud/models/servers.py000066400000000000000000000172021454002221500213300ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Server]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/snapshot.py000066400000000000000000000147601454002221500215040ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'SnapshotProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/snapshot_properties.py000066400000000000000000000443771454002221500237670ustar00rootroot00000000000000# 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 = { 'cpu_hot_plug': 'bool', 'cpu_hot_unplug': 'bool', 'description': 'str', 'disc_scsi_hot_plug': 'bool', 'disc_scsi_hot_unplug': 'bool', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'licence_type': 'str', 'location': 'str', 'name': 'str', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'ram_hot_plug': 'bool', 'ram_hot_unplug': 'bool', 'sec_auth_protection': 'bool', 'size': 'float', } attribute_map = { 'cpu_hot_plug': 'cpuHotPlug', 'cpu_hot_unplug': 'cpuHotUnplug', 'description': 'description', 'disc_scsi_hot_plug': 'discScsiHotPlug', 'disc_scsi_hot_unplug': 'discScsiHotUnplug', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'licence_type': 'licenceType', 'location': 'location', 'name': 'name', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'ram_hot_plug': 'ramHotPlug', 'ram_hot_unplug': 'ramHotUnplug', 'sec_auth_protection': 'secAuthProtection', 'size': 'size', } def __init__(self, cpu_hot_plug=None, cpu_hot_unplug=None, description=None, disc_scsi_hot_plug=None, disc_scsi_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, licence_type=None, location=None, name=None, nic_hot_plug=None, nic_hot_unplug=None, ram_hot_plug=None, ram_hot_unplug=None, sec_auth_protection=None, size=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._cpu_hot_plug = None self._cpu_hot_unplug = None self._description = None self._disc_scsi_hot_plug = None self._disc_scsi_hot_unplug = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._licence_type = None self._location = None self._name = None self._nic_hot_plug = None self._nic_hot_unplug = None self._ram_hot_plug = None self._ram_hot_unplug = None self._sec_auth_protection = None self._size = None self.discriminator = None 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 description is not None: self.description = description 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 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 licence_type is not None: self.licence_type = licence_type if location is not None: self.location = location if name is not None: self.name = name 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 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 sec_auth_protection is not None: self.sec_auth_protection = sec_auth_protection if size is not None: self.size = size @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 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 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 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 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 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", "WINDOWS2022", "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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/snapshots.py000066400000000000000000000132211454002221500216560ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Snapshot]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/target_group.py000066400000000000000000000151111454002221500223360ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'TargetGroupProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/target_group_health_check.py000066400000000000000000000143421454002221500250250ustar00rootroot00000000000000# 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_interval': 'int', 'check_timeout': 'int', 'retries': 'int', } attribute_map = { 'check_interval': 'checkInterval', 'check_timeout': 'checkTimeout', 'retries': 'retries', } def __init__(self, check_interval=None, check_timeout=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_interval = None self._check_timeout = None self._retries = None self.discriminator = None if check_interval is not None: self.check_interval = check_interval if check_timeout is not None: self.check_timeout = check_timeout if retries is not None: self.retries = retries @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 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 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() sdk-python-6.1.9/ionoscloud/models/target_group_http_health_check.py000066400000000000000000000227631454002221500260720ustar00rootroot00000000000000# 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 = { 'match_type': 'str', 'method': 'str', 'negate': 'bool', 'path': 'str', 'regex': 'bool', 'response': 'str', } attribute_map = { 'match_type': 'matchType', 'method': 'method', 'negate': 'negate', 'path': 'path', 'regex': 'regex', 'response': 'response', } def __init__(self, match_type=None, method=None, negate=None, path=None, regex=None, response=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._match_type = None self._method = None self._negate = None self._path = None self._regex = None self._response = None self.discriminator = None self.match_type = match_type if method is not None: self.method = method if negate is not None: self.negate = negate if path is not None: self.path = path if regex is not None: self.regex = regex self.response = response @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 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 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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/target_group_properties.py000066400000000000000000000237741454002221500246300ustar00rootroot00000000000000# 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 = { 'algorithm': 'str', 'health_check': 'TargetGroupHealthCheck', 'http_health_check': 'TargetGroupHttpHealthCheck', 'name': 'str', 'protocol': 'str', 'targets': 'list[TargetGroupTarget]', } attribute_map = { 'algorithm': 'algorithm', 'health_check': 'healthCheck', 'http_health_check': 'httpHealthCheck', 'name': 'name', 'protocol': 'protocol', 'targets': 'targets', } def __init__(self, algorithm=None, health_check=None, http_health_check=None, name=None, protocol=None, targets=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._algorithm = None self._health_check = None self._http_health_check = None self._name = None self._protocol = None self._targets = None self.discriminator = None self.algorithm = algorithm 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 self.name = name self.protocol = protocol if targets is not None: self.targets = targets @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 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 @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/target_group_put.py000066400000000000000000000136531454002221500232370ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'properties': 'TargetGroupProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, properties=None, type=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._href = None self._id = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/target_group_target.py000066400000000000000000000244571454002221500237210ustar00rootroot00000000000000# 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 = { 'health_check_enabled': 'bool', 'ip': 'str', 'maintenance_enabled': 'bool', 'port': 'int', 'weight': 'int', 'proxy_protocol': 'str', } attribute_map = { 'health_check_enabled': 'healthCheckEnabled', 'ip': 'ip', 'maintenance_enabled': 'maintenanceEnabled', 'port': 'port', 'weight': 'weight', 'proxy_protocol': 'proxyProtocol', } def __init__(self, health_check_enabled=None, ip=None, maintenance_enabled=None, port=None, weight=None, proxy_protocol='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._health_check_enabled = None self._ip = None self._maintenance_enabled = None self._port = None self._weight = None self._proxy_protocol = None self.discriminator = None if health_check_enabled is not None: self.health_check_enabled = health_check_enabled self.ip = ip if maintenance_enabled is not None: self.maintenance_enabled = maintenance_enabled self.port = port self.weight = weight if proxy_protocol is not None: 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 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 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 @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 ProxyProtocol is used to set the 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. ProxyProtocol is used to set the 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 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() sdk-python-6.1.9/ionoscloud/models/target_groups.py000066400000000000000000000200111454002221500225140ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[TargetGroup]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/target_port_range.py000066400000000000000000000106561454002221500233530ustar00rootroot00000000000000# 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 = { 'end': 'int', 'start': 'int', } attribute_map = { 'end': 'end', 'start': 'start', } def __init__(self, end=None, start=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._end = None self._start = None self.discriminator = None if end is not None: self.end = end if start is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/template.py000066400000000000000000000147701454002221500214610ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'TemplateProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/template_properties.py000066400000000000000000000147071454002221500237350ustar00rootroot00000000000000# 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 = { 'cores': 'float', 'name': 'str', 'ram': 'float', 'storage_size': 'float', } attribute_map = { 'cores': 'cores', 'name': 'name', 'ram': 'ram', 'storage_size': 'storageSize', } def __init__(self, cores=None, name=None, ram=None, storage_size=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._cores = None self._name = None self._ram = None self._storage_size = None self.discriminator = None self.cores = cores self.name = name self.ram = ram self.storage_size = storage_size @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 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 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 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() sdk-python-6.1.9/ionoscloud/models/templates.py000066400000000000000000000132311454002221500216330ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'items': 'list[Template]', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'items': 'items', 'type': 'type', } def __init__(self, href=None, id=None, items=None, type=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._href = None self._id = None self._items = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if type is not None: 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 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 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 @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 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() sdk-python-6.1.9/ionoscloud/models/token.py000066400000000000000000000070671454002221500207670ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/type.py000066400000000000000000000102771454002221500206250ustar00rootroot00000000000000# 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" 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] # 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() sdk-python-6.1.9/ionoscloud/models/user.py000066400000000000000000000157671454002221500206330ustar00rootroot00000000000000# 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 = { 'entities': 'UsersEntities', 'href': 'str', 'id': 'str', 'metadata': 'UserMetadata', 'properties': 'UserProperties', 'type': 'Type', } attribute_map = { 'entities': 'entities', 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, entities=None, href=None, id=None, metadata=None, properties=None, type=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._entities = None self._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if entities is not None: self.entities = entities if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: self.type = type @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 @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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/user_metadata.py000066400000000000000000000131521454002221500224550ustar00rootroot00000000000000# 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 = { 'created_date': 'datetime', 'etag': 'str', 'last_login': 'datetime', } attribute_map = { 'created_date': 'createdDate', 'etag': 'etag', 'last_login': 'lastLogin', } def __init__(self, created_date=None, etag=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._created_date = None self._etag = None self._last_login = None self.discriminator = None if created_date is not None: self.created_date = created_date if etag is not None: self.etag = etag if last_login is not None: self.last_login = last_login @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 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 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() sdk-python-6.1.9/ionoscloud/models/user_post.py000066400000000000000000000074411454002221500216660ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/user_properties.py000066400000000000000000000233731454002221500230770ustar00rootroot00000000000000# 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 = { 'active': 'bool', 'administrator': 'bool', 'email': 'str', 'firstname': 'str', 'force_sec_auth': 'bool', 'lastname': 'str', 's3_canonical_user_id': 'str', 'sec_auth_active': 'bool', } attribute_map = { 'active': 'active', 'administrator': 'administrator', 'email': 'email', 'firstname': 'firstname', 'force_sec_auth': 'forceSecAuth', 'lastname': 'lastname', 's3_canonical_user_id': 's3CanonicalUserId', 'sec_auth_active': 'secAuthActive', } def __init__(self, active=None, administrator=None, email=None, firstname=None, force_sec_auth=None, lastname=None, s3_canonical_user_id=None, sec_auth_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._active = None self._administrator = None self._email = None self._firstname = None self._force_sec_auth = None self._lastname = None self._s3_canonical_user_id = None self._sec_auth_active = None self.discriminator = None if active is not None: self.active = active if administrator is not None: self.administrator = administrator if email is not None: self.email = email if firstname is not None: self.firstname = firstname if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if lastname is not None: self.lastname = lastname if s3_canonical_user_id is not None: self.s3_canonical_user_id = s3_canonical_user_id if sec_auth_active is not None: self.sec_auth_active = sec_auth_active @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 @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 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 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 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 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 s3_canonical_user_id(self): """Gets the s3_canonical_user_id of this UserProperties. # noqa: E501 Canonical (S3) 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 (S3) 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 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 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() sdk-python-6.1.9/ionoscloud/models/user_properties_post.py000066400000000000000000000231101454002221500241310ustar00rootroot00000000000000# 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 = { 'active': 'bool', 'administrator': 'bool', 'email': 'str', 'firstname': 'str', 'force_sec_auth': 'bool', 'lastname': 'str', 'password': 'str', 'sec_auth_active': 'bool', } attribute_map = { 'active': 'active', 'administrator': 'administrator', 'email': 'email', 'firstname': 'firstname', 'force_sec_auth': 'forceSecAuth', 'lastname': 'lastname', 'password': 'password', 'sec_auth_active': 'secAuthActive', } def __init__(self, active=None, administrator=None, email=None, firstname=None, force_sec_auth=None, lastname=None, password=None, sec_auth_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._active = None self._administrator = None self._email = None self._firstname = None self._force_sec_auth = None self._lastname = None self._password = None self._sec_auth_active = None self.discriminator = None if active is not None: self.active = active if administrator is not None: self.administrator = administrator if email is not None: self.email = email if firstname is not None: self.firstname = firstname if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if lastname is not None: self.lastname = lastname if password is not None: self.password = password if sec_auth_active is not None: self.sec_auth_active = sec_auth_active @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 @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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/user_properties_put.py000066400000000000000000000230601454002221500237600ustar00rootroot00000000000000# 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 = { 'active': 'bool', 'administrator': 'bool', 'email': 'str', 'firstname': 'str', 'force_sec_auth': 'bool', 'lastname': 'str', 'password': 'str', 'sec_auth_active': 'bool', } attribute_map = { 'active': 'active', 'administrator': 'administrator', 'email': 'email', 'firstname': 'firstname', 'force_sec_auth': 'forceSecAuth', 'lastname': 'lastname', 'password': 'password', 'sec_auth_active': 'secAuthActive', } def __init__(self, active=None, administrator=None, email=None, firstname=None, force_sec_auth=None, lastname=None, password=None, sec_auth_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._active = None self._administrator = None self._email = None self._firstname = None self._force_sec_auth = None self._lastname = None self._password = None self._sec_auth_active = None self.discriminator = None if active is not None: self.active = active if administrator is not None: self.administrator = administrator if email is not None: self.email = email if firstname is not None: self.firstname = firstname if force_sec_auth is not None: self.force_sec_auth = force_sec_auth if lastname is not None: self.lastname = lastname if password is not None: self.password = password if sec_auth_active is not None: 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 @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 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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/user_put.py000066400000000000000000000106201454002221500215020ustar00rootroot00000000000000# 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() sdk-python-6.1.9/ionoscloud/models/users.py000066400000000000000000000170741454002221500210070ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[User]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/users_entities.py000066400000000000000000000102521454002221500227020ustar00rootroot00000000000000# 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 = { 'groups': 'GroupUsers', 'owns': 'ResourcesUsers', } attribute_map = { 'groups': 'groups', 'owns': 'owns', } def __init__(self, groups=None, owns=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._groups = None self._owns = None self.discriminator = None if groups is not None: self.groups = groups if owns is not None: 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 @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 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() sdk-python-6.1.9/ionoscloud/models/volume.py000066400000000000000000000147021454002221500211500ustar00rootroot00000000000000# 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 = { 'href': 'str', 'id': 'str', 'metadata': 'DatacenterElementMetadata', 'properties': 'VolumeProperties', 'type': 'Type', } attribute_map = { 'href': 'href', 'id': 'id', 'metadata': 'metadata', 'properties': 'properties', 'type': 'type', } def __init__(self, href=None, id=None, metadata=None, properties=None, type=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._href = None self._id = None self._metadata = None self._properties = None self._type = None self.discriminator = None if href is not None: self.href = href if id is not None: self.id = id if metadata is not None: self.metadata = metadata self.properties = properties if type is not None: 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 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 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 """ 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 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 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() sdk-python-6.1.9/ionoscloud/models/volume_properties.py000066400000000000000000000654761454002221500234420ustar00rootroot00000000000000# 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 = { 'availability_zone': 'str', 'backupunit_id': 'str', 'boot_order': 'str', 'boot_server': 'str', 'bus': 'str', 'cpu_hot_plug': 'bool', 'device_number': 'int', 'disc_virtio_hot_plug': 'bool', 'disc_virtio_hot_unplug': 'bool', 'image': 'str', 'image_alias': 'str', 'image_password': 'str', 'licence_type': 'str', 'name': 'str', 'nic_hot_plug': 'bool', 'nic_hot_unplug': 'bool', 'pci_slot': 'int', 'ram_hot_plug': 'bool', 'size': 'float', 'ssh_keys': 'list[str]', 'type': 'str', 'user_data': 'str', } attribute_map = { 'availability_zone': 'availabilityZone', 'backupunit_id': 'backupunitId', 'boot_order': 'bootOrder', 'boot_server': 'bootServer', 'bus': 'bus', 'cpu_hot_plug': 'cpuHotPlug', 'device_number': 'deviceNumber', 'disc_virtio_hot_plug': 'discVirtioHotPlug', 'disc_virtio_hot_unplug': 'discVirtioHotUnplug', 'image': 'image', 'image_alias': 'imageAlias', 'image_password': 'imagePassword', 'licence_type': 'licenceType', 'name': 'name', 'nic_hot_plug': 'nicHotPlug', 'nic_hot_unplug': 'nicHotUnplug', 'pci_slot': 'pciSlot', 'ram_hot_plug': 'ramHotPlug', 'size': 'size', 'ssh_keys': 'sshKeys', 'type': 'type', 'user_data': 'userData', } def __init__(self, availability_zone=None, backupunit_id=None, boot_order='AUTO', boot_server=None, bus=None, cpu_hot_plug=None, device_number=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, image=None, image_alias=None, image_password=None, licence_type=None, name=None, nic_hot_plug=None, nic_hot_unplug=None, pci_slot=None, ram_hot_plug=None, size=None, ssh_keys=None, type=None, user_data=None, 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._availability_zone = None self._backupunit_id = None self._boot_order = None self._boot_server = None self._bus = None self._cpu_hot_plug = None self._device_number = None self._disc_virtio_hot_plug = None self._disc_virtio_hot_unplug = None self._image = None self._image_alias = None self._image_password = None self._licence_type = None self._name = None self._nic_hot_plug = None self._nic_hot_unplug = None self._pci_slot = None self._ram_hot_plug = None self._size = None self._ssh_keys = None self._type = None self._user_data = None self.discriminator = None if availability_zone is not None: self.availability_zone = availability_zone if backupunit_id is not None: self.backupunit_id = backupunit_id self.boot_order = boot_order if boot_server is not None: self.boot_server = boot_server if bus is not None: self.bus = bus if cpu_hot_plug is not None: self.cpu_hot_plug = cpu_hot_plug if device_number is not None: self.device_number = device_number 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 image is not None: self.image = image if image_alias is not None: self.image_alias = image_alias if image_password is not None: self.image_password = image_password if licence_type is not None: self.licence_type = licence_type if name is not None: self.name = name 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 pci_slot is not None: self.pci_slot = pci_slot if ram_hot_plug is not None: self.ram_hot_plug = ram_hot_plug self.size = size if ssh_keys is not None: self.ssh_keys = ssh_keys if type is not None: self.type = type if user_data is not None: self.user_data = user_data @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 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 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 @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 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 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 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 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 image(self): """Gets the image of this VolumeProperties. # noqa: E501 Image or snapshot ID to be used as template for this volume. # 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. # noqa: E501 :param image: The image of this VolumeProperties. # noqa: E501 :type image: str """ self._image = image @property def image_alias(self): """Gets the image_alias of this VolumeProperties. # 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. :param image_alias: The image_alias of this VolumeProperties. # noqa: E501 :type image_alias: str """ self._image_alias = image_alias @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 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", "WINDOWS2022", "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 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 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 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 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 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 """ 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/models/volumes.py000066400000000000000000000172021454002221500213310ustar00rootroot00000000000000# 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 = { 'links': 'PaginationLinks', 'href': 'str', 'id': 'str', 'items': 'list[Volume]', 'limit': 'float', 'offset': 'float', 'type': 'Type', } attribute_map = { 'links': '_links', 'href': 'href', 'id': 'id', 'items': 'items', 'limit': 'limit', 'offset': 'offset', 'type': 'type', } def __init__(self, links=None, href=None, id=None, items=None, limit=None, offset=None, type=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._links = None self._href = None self._id = None self._items = None self._limit = None self._offset = None self._type = None self.discriminator = None if links is not None: self.links = links if href is not None: self.href = href if id is not None: self.id = id if items is not None: self.items = items if limit is not None: self.limit = limit if offset is not None: self.offset = offset if type is not None: self.type = type @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 @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 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 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 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 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 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 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() sdk-python-6.1.9/ionoscloud/rest.py000066400000000000000000000330471454002221500173360ustar00rootroot00000000000000# 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) sdk-python-6.1.9/requirements.txt000066400000000000000000000002201454002221500171000ustar00rootroot00000000000000certifi >= 14.05.14 future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.15.1 asn1crypto>=1.5.1 sdk-python-6.1.9/setup.cfg000066400000000000000000000000341454002221500154400ustar00rootroot00000000000000[flake8] max-line-length=99 sdk-python-6.1.9/setup.py000066400000000000000000000042631454002221500153410ustar00rootroot00000000000000# 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.9" # 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'] ) sdk-python-6.1.9/sonar-project.properties000066400000000000000000000006101454002221500205230ustar00rootroot00000000000000sonar.projectKey=ionos-cloud_sdk-python sonar.organization=ionos-cloud # This is the name and version displayed in the SonarCloud UI. #sonar.projectName=sdk-python #sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. #sonar.sources=. # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 sdk-python-6.1.9/test-requirements.txt000066400000000000000000000001571454002221500200660ustar00rootroot00000000000000pytest~=4.6.7 # needed for python 2.7+3.4 pytest-cov>=2.8.1 pytest-randomly==1.2.3 # needed for python 2.7+3.4 sdk-python-6.1.9/tox.ini000066400000000000000000000002301454002221500151300ustar00rootroot00000000000000[tox] envlist = py27, py3 [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= pytest --cov=ionoscloud