CP-2189 Change client to core

This commit is contained in:
Shahid Hussain Khan 2024-06-04 12:55:57 +01:00
parent f2703c256f
commit af4ffe5014
1371 changed files with 50483 additions and 16690 deletions

View File

@ -14,7 +14,6 @@ This API provides the following endpoints that define the operations to manage y
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.6
- Package version: 1.0.0
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -28,9 +27,9 @@ Python 3.7+
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative`)
Then import the package:
```python
@ -61,14 +60,14 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
import thousandeyes_sdk.client
import thousandeyes_sdk.core
import thousandeyes_sdk.admin
from thousandeyes_sdk.client.exceptions import ApiException
from thousandeyes_sdk.core.exceptions import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -78,13 +77,13 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.client.ApiClient(configuration) as api_client:
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest |

View File

@ -32,7 +32,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -42,7 +42,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -117,7 +117,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -127,7 +127,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -200,7 +200,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -210,7 +210,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -286,7 +286,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -296,7 +296,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -372,7 +372,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -382,7 +382,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

View File

@ -26,7 +26,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -36,7 +36,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

View File

@ -31,7 +31,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -41,7 +41,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -116,7 +116,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -126,7 +126,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -200,7 +200,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -210,7 +210,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -286,7 +286,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -296,7 +296,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -371,7 +371,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -381,7 +381,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

View File

@ -26,7 +26,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -36,7 +36,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

View File

@ -31,7 +31,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -41,7 +41,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -116,7 +116,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -126,7 +126,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -200,7 +200,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -210,7 +210,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -286,7 +286,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -296,7 +296,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -371,7 +371,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -381,7 +381,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

View File

@ -1,6 +1,6 @@
[project]
name = "thousandeyes-sdk-administrative"
version = "1.0.0"
dynamic = ["version"]
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
@ -11,9 +11,12 @@ dependencies = [
"python-dateutil >=2.8.2",
"pydantic >=2",
"typing-extensions >=4.7.1",
"thousandeyes-sdk-core==1.0.0",
"thousandeyes-sdk-core",
]
[tool.setuptools.dynamic]
version = {attr = "thousandeyes_sdk.core.__version__"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",

View File

@ -14,8 +14,6 @@
""" # noqa: E501
__version__ = "1.0.0"
# import apis into sdk package
from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi
from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi

View File

@ -27,9 +27,10 @@ from thousandeyes_sdk.admin.models.account_groups import AccountGroups
from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class AccountGroupsApi:
@ -42,6 +43,7 @@ class AccountGroupsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client

View File

@ -23,9 +23,10 @@ from typing import Optional
from typing_extensions import Annotated
from thousandeyes_sdk.admin.models.permissions import Permissions
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class PermissionsApi:
@ -38,6 +39,7 @@ class PermissionsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client

View File

@ -25,9 +25,10 @@ from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
from thousandeyes_sdk.admin.models.roles import Roles
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class RolesApi:
@ -40,6 +41,7 @@ class RolesApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client

View File

@ -24,9 +24,10 @@ from typing import Optional
from typing_extensions import Annotated
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class UserEventsApi:
@ -39,6 +40,7 @@ class UserEventsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client

View File

@ -26,9 +26,10 @@ from thousandeyes_sdk.admin.models.user_detail import UserDetail
from thousandeyes_sdk.admin.models.user_request import UserRequest
from thousandeyes_sdk.admin.models.users import Users
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class UsersApi:
@ -41,6 +42,7 @@ class UsersApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client

View File

@ -117,54 +117,8 @@ src/thousandeyes_sdk/agents/models/validation_error.py
src/thousandeyes_sdk/agents/models/validation_error_item.py
src/thousandeyes_sdk/agents/py.typed
test/__init__.py
test/test_account_group.py
test/test_agent.py
test/test_agent_base.py
test/test_agent_cluster_assign_request.py
test/test_agent_cluster_unassign_request.py
test/test_agent_details.py
test/test_agent_details_expand.py
test/test_agent_ipv6_policy.py
test/test_agent_list_expand.py
test/test_agent_proxies.py
test/test_agent_proxy.py
test/test_agent_request.py
test/test_alert_email.py
test/test_alert_integration_base.py
test/test_alert_integration_type.py
test/test_cloud_agent_detail.py
test/test_cloud_enterprise_agent.py
test/test_cloud_enterprise_agent_type.py
test/test_cloud_enterprise_agents.py
test/test_cluster_member.py
test/test_enterprise_agent.py
test/test_enterprise_agent_cluster_detail.py
test/test_enterprise_agent_data.py
test/test_enterprise_agent_detail.py
test/test_enterprise_agent_ipv6_policy.py
test/test_enterprise_agent_response_expands.py
test/test_enterprise_agent_state.py
test/test_error.py
test/test_error_detail.py
test/test_error_detail_code.py
test/test_interface_ip_mapping.py
test/test_labels.py
test/test_link.py
test/test_list_notification_rules_response.py
test/test_notification.py
test/test_notification_rule.py
test/test_notification_rule_detail.py
test/test_notification_rules.py
test/test_proxy_auth_type.py
test/test_proxy_type.py
test/test_self_links.py
test/test_simple_agent.py
test/test_simple_enterprise_agent.py
test/test_simple_test.py
test/test_test_interval.py
test/test_test_links.py
test/test_test_self_link.py
test/test_test_type.py
test/test_unauthorized_error.py
test/test_validation_error.py
test/test_validation_error_item.py
test/test_cloud_and_enterprise_agent_notification_rules_api.py
test/test_cloud_and_enterprise_agents_api.py
test/test_enterprise_agent_cluster_api.py
test/test_proxies_api.py
test/test_utils.py

View File

@ -5,8 +5,7 @@ Manage all agents available to your account in ThousandEyes, including both Clou
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.4
- Package version: 1.0.0
- API version: 7.0.6
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -20,9 +19,9 @@ Python 3.7+
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents`)
Then import the package:
```python
@ -53,14 +52,14 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
import thousandeyes_sdk.client
import thousandeyes_sdk.core
import thousandeyes_sdk.agents
from thousandeyes_sdk.client.exceptions import ApiException
from thousandeyes_sdk.core.exceptions import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -70,13 +69,13 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.client.ApiClient(configuration) as api_client:
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.agents.CloudAndEnterpriseAgentNotificationRulesApi(api_client)
notification_rule_id = '281474976710706' # str | Unique ID for the agent notification rule.
@ -100,13 +99,13 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rule**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rule) | **GET** /v7/agents/notification-rules/{notificationRuleId} | Retrieve agent notification rule
*CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rules**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rules) | **GET** /v7/agents/notification-rules | List agent notification rules
*CloudAndEnterpriseAgentsApi* | [**delete_enterprise_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
*CloudAndEnterpriseAgentsApi* | [**get_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
*CloudAndEnterpriseAgentsApi* | [**delete_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
*CloudAndEnterpriseAgentsApi* | [**get_agent**](docs/CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
*CloudAndEnterpriseAgentsApi* | [**get_agents**](docs/CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents
*CloudAndEnterpriseAgentsApi* | [**update_enterprise_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
*EnterpriseAgentClusterApi* | [**assign_enterprise_agent_cluster**](docs/EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
*EnterpriseAgentClusterApi* | [**unassign_enterprise_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
*ProxiesApi* | [**get_agent_proxies**](docs/ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies
*CloudAndEnterpriseAgentsApi* | [**update_agent**](docs/CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
*EnterpriseAgentClusterApi* | [**assign_agent_to_cluster**](docs/EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
*EnterpriseAgentClusterApi* | [**unassign_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
*ProxiesApi* | [**get_agents_proxies**](docs/ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies
## Documentation For Models

View File

@ -27,7 +27,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -37,7 +37,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -78,7 +78,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -114,7 +114,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -124,7 +124,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -163,7 +163,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -4,14 +4,14 @@ All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_enterprise_agent**](CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
[**get_agent_details**](CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
[**delete_agent**](CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent
[**get_agent**](CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent
[**get_agents**](CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents
[**update_enterprise_agent_details**](CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
[**update_agent**](CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent
# **delete_enterprise_agent**
> delete_enterprise_agent(agent_id, aid=aid)
# **delete_agent**
> delete_agent(agent_id, aid=aid)
Delete Enterprise Agent
@ -28,7 +28,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -38,7 +38,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -51,9 +51,9 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# Delete Enterprise Agent
api_instance.delete_enterprise_agent(agent_id, aid=aid)
api_instance.delete_agent(agent_id, aid=aid)
except Exception as e:
print("Exception when calling CloudAndEnterpriseAgentsApi->delete_enterprise_agent: %s\n" % e)
print("Exception when calling CloudAndEnterpriseAgentsApi->delete_agent: %s\n" % e)
```
@ -77,7 +77,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/problem+json
- **Accept**: application/json, application/problem+json
### HTTP response details
@ -94,8 +94,8 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_agent_details**
> AgentDetails get_agent_details(agent_id, aid=aid, expand=expand)
# **get_agent**
> AgentDetails get_agent(agent_id, aid=aid, expand=expand)
Retrieve Cloud and Enterprise Agent
@ -114,7 +114,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -124,7 +124,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -138,11 +138,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# Retrieve Cloud and Enterprise Agent
api_response = api_instance.get_agent_details(agent_id, aid=aid, expand=expand)
print("The response of CloudAndEnterpriseAgentsApi->get_agent_details:\n")
api_response = api_instance.get_agent(agent_id, aid=aid, expand=expand)
print("The response of CloudAndEnterpriseAgentsApi->get_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent_details: %s\n" % e)
print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent: %s\n" % e)
```
@ -167,7 +167,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -205,7 +205,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -215,7 +215,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -258,7 +258,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -275,8 +275,8 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_enterprise_agent_details**
> AgentDetails update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand)
# **update_agent**
> AgentDetails update_agent(agent_id, agent_request, aid=aid, expand=expand)
Update Enterprise Agent
@ -296,7 +296,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -306,7 +306,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -321,11 +321,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# Update Enterprise Agent
api_response = api_instance.update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand)
print("The response of CloudAndEnterpriseAgentsApi->update_enterprise_agent_details:\n")
api_response = api_instance.update_agent(agent_id, agent_request, aid=aid, expand=expand)
print("The response of CloudAndEnterpriseAgentsApi->update_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CloudAndEnterpriseAgentsApi->update_enterprise_agent_details: %s\n" % e)
print("Exception when calling CloudAndEnterpriseAgentsApi->update_agent: %s\n" % e)
```
@ -351,7 +351,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**assign_enterprise_agent_cluster**](EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
[**unassign_enterprise_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
[**assign_agent_to_cluster**](EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
[**unassign_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
# **assign_enterprise_agent_cluster**
> AgentDetails assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
# **assign_agent_to_cluster**
> AgentDetails assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
Add member to Enterprise Agent cluster
@ -29,7 +29,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -39,7 +39,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -54,11 +54,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# Add member to Enterprise Agent cluster
api_response = api_instance.assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
print("The response of EnterpriseAgentClusterApi->assign_enterprise_agent_cluster:\n")
api_response = api_instance.assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand)
print("The response of EnterpriseAgentClusterApi->assign_agent_to_cluster:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnterpriseAgentClusterApi->assign_enterprise_agent_cluster: %s\n" % e)
print("Exception when calling EnterpriseAgentClusterApi->assign_agent_to_cluster: %s\n" % e)
```
@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -102,8 +102,8 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **unassign_enterprise_agent_from_cluster**
> CloudEnterpriseAgents unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
# **unassign_agent_from_cluster**
> CloudEnterpriseAgents unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
Remove member from Enterprise Agent cluster
@ -123,7 +123,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -133,7 +133,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -148,11 +148,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# Remove member from Enterprise Agent cluster
api_response = api_instance.unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
print("The response of EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster:\n")
api_response = api_instance.unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand)
print("The response of EnterpriseAgentClusterApi->unassign_agent_from_cluster:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster: %s\n" % e)
print("Exception when calling EnterpriseAgentClusterApi->unassign_agent_from_cluster: %s\n" % e)
```
@ -178,7 +178,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_agent_proxies**](ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies
[**get_agents_proxies**](ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies
# **get_agent_proxies**
> AgentProxies get_agent_proxies(aid=aid)
# **get_agents_proxies**
> AgentProxies get_agents_proxies(aid=aid)
List agent proxies
@ -26,7 +26,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -36,7 +36,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -48,11 +48,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client:
try:
# List agent proxies
api_response = api_instance.get_agent_proxies(aid=aid)
print("The response of ProxiesApi->get_agent_proxies:\n")
api_response = api_instance.get_agents_proxies(aid=aid)
print("The response of ProxiesApi->get_agents_proxies:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProxiesApi->get_agent_proxies: %s\n" % e)
print("Exception when calling ProxiesApi->get_agents_proxies: %s\n" % e)
```
@ -75,7 +75,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
**var_field** | **int** | Identifies the field that triggered this particular error. | [optional]
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
**message** | **str** | A short, human-readable summary of the error. | [optional]
## Example

View File

@ -1,6 +1,6 @@
[project]
name = "thousandeyes-sdk-agents"
version = "1.0.0"
dynamic = ["version"]
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
@ -11,9 +11,12 @@ dependencies = [
"python-dateutil >=2.8.2",
"pydantic >=2",
"typing-extensions >=4.7.1",
"thousandeyes-sdk-core==1.0.0",
"thousandeyes-sdk-core",
]
[tool.setuptools.dynamic]
version = {attr = "thousandeyes_sdk.core.__version__"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",

View File

@ -7,15 +7,13 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
__version__ = "1.0.0"
# import apis into sdk package
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -24,9 +24,10 @@ from typing_extensions import Annotated
from thousandeyes_sdk.agents.models.list_notification_rules_response import ListNotificationRulesResponse
from thousandeyes_sdk.agents.models.notification_rule_detail import NotificationRuleDetail
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class CloudAndEnterpriseAgentNotificationRulesApi:
@ -39,6 +40,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@ -310,6 +312,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -591,6 +594,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -28,9 +28,10 @@ from thousandeyes_sdk.agents.models.agent_request import AgentRequest
from thousandeyes_sdk.agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpriseAgents
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class CloudAndEnterpriseAgentsApi:
@ -43,11 +44,12 @@ class CloudAndEnterpriseAgentsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def delete_enterprise_agent(
def delete_agent(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -94,7 +96,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_enterprise_agent_serialize(
_param = self._delete_agent_serialize(
agent_id=agent_id,
aid=aid,
_request_auth=_request_auth,
@ -125,7 +127,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def delete_enterprise_agent_with_http_info(
def delete_agent_with_http_info(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -172,7 +174,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_enterprise_agent_serialize(
_param = self._delete_agent_serialize(
agent_id=agent_id,
aid=aid,
_request_auth=_request_auth,
@ -203,7 +205,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def delete_enterprise_agent_without_preload_content(
def delete_agent_without_preload_content(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -250,7 +252,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_enterprise_agent_serialize(
_param = self._delete_agent_serialize(
agent_id=agent_id,
aid=aid,
_request_auth=_request_auth,
@ -275,7 +277,7 @@ class CloudAndEnterpriseAgentsApi:
return response_data.response
def _delete_enterprise_agent_serialize(
def _delete_agent_serialize(
self,
agent_id,
aid,
@ -313,6 +315,7 @@ class CloudAndEnterpriseAgentsApi:
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json',
'application/problem+json'
]
)
@ -342,7 +345,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def get_agent_details(
def get_agent(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -392,7 +395,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_details_serialize(
_param = self._get_agent_serialize(
agent_id=agent_id,
aid=aid,
expand=expand,
@ -424,7 +427,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def get_agent_details_with_http_info(
def get_agent_with_http_info(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -474,7 +477,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_details_serialize(
_param = self._get_agent_serialize(
agent_id=agent_id,
aid=aid,
expand=expand,
@ -506,7 +509,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def get_agent_details_without_preload_content(
def get_agent_without_preload_content(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -556,7 +559,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_details_serialize(
_param = self._get_agent_serialize(
agent_id=agent_id,
aid=aid,
expand=expand,
@ -582,7 +585,7 @@ class CloudAndEnterpriseAgentsApi:
return response_data.response
def _get_agent_details_serialize(
def _get_agent_serialize(
self,
agent_id,
aid,
@ -627,6 +630,7 @@ class CloudAndEnterpriseAgentsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -944,6 +948,7 @@ class CloudAndEnterpriseAgentsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -973,7 +978,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def update_enterprise_agent_details(
def update_agent(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
agent_request: AgentRequest,
@ -1026,7 +1031,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_enterprise_agent_details_serialize(
_param = self._update_agent_serialize(
agent_id=agent_id,
agent_request=agent_request,
aid=aid,
@ -1060,7 +1065,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def update_enterprise_agent_details_with_http_info(
def update_agent_with_http_info(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
agent_request: AgentRequest,
@ -1113,7 +1118,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_enterprise_agent_details_serialize(
_param = self._update_agent_serialize(
agent_id=agent_id,
agent_request=agent_request,
aid=aid,
@ -1147,7 +1152,7 @@ class CloudAndEnterpriseAgentsApi:
@validate_call
def update_enterprise_agent_details_without_preload_content(
def update_agent_without_preload_content(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")],
agent_request: AgentRequest,
@ -1200,7 +1205,7 @@ class CloudAndEnterpriseAgentsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_enterprise_agent_details_serialize(
_param = self._update_agent_serialize(
agent_id=agent_id,
agent_request=agent_request,
aid=aid,
@ -1228,7 +1233,7 @@ class CloudAndEnterpriseAgentsApi:
return response_data.response
def _update_enterprise_agent_details_serialize(
def _update_agent_serialize(
self,
agent_id,
agent_request,
@ -1276,6 +1281,7 @@ class CloudAndEnterpriseAgentsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -27,9 +27,10 @@ from thousandeyes_sdk.agents.models.agent_details import AgentDetails
from thousandeyes_sdk.agents.models.agent_details_expand import AgentDetailsExpand
from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpriseAgents
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class EnterpriseAgentClusterApi:
@ -42,11 +43,12 @@ class EnterpriseAgentClusterApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def assign_enterprise_agent_cluster(
def assign_agent_to_cluster(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
agent_cluster_assign_request: AgentClusterAssignRequest,
@ -99,7 +101,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._assign_enterprise_agent_cluster_serialize(
_param = self._assign_agent_to_cluster_serialize(
agent_id=agent_id,
agent_cluster_assign_request=agent_cluster_assign_request,
aid=aid,
@ -133,7 +135,7 @@ class EnterpriseAgentClusterApi:
@validate_call
def assign_enterprise_agent_cluster_with_http_info(
def assign_agent_to_cluster_with_http_info(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
agent_cluster_assign_request: AgentClusterAssignRequest,
@ -186,7 +188,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._assign_enterprise_agent_cluster_serialize(
_param = self._assign_agent_to_cluster_serialize(
agent_id=agent_id,
agent_cluster_assign_request=agent_cluster_assign_request,
aid=aid,
@ -220,7 +222,7 @@ class EnterpriseAgentClusterApi:
@validate_call
def assign_enterprise_agent_cluster_without_preload_content(
def assign_agent_to_cluster_without_preload_content(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")],
agent_cluster_assign_request: AgentClusterAssignRequest,
@ -273,7 +275,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._assign_enterprise_agent_cluster_serialize(
_param = self._assign_agent_to_cluster_serialize(
agent_id=agent_id,
agent_cluster_assign_request=agent_cluster_assign_request,
aid=aid,
@ -301,7 +303,7 @@ class EnterpriseAgentClusterApi:
return response_data.response
def _assign_enterprise_agent_cluster_serialize(
def _assign_agent_to_cluster_serialize(
self,
agent_id,
agent_cluster_assign_request,
@ -349,6 +351,7 @@ class EnterpriseAgentClusterApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -391,7 +394,7 @@ class EnterpriseAgentClusterApi:
@validate_call
def unassign_enterprise_agent_from_cluster(
def unassign_agent_from_cluster(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
agent_cluster_unassign_request: AgentClusterUnassignRequest,
@ -444,7 +447,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._unassign_enterprise_agent_from_cluster_serialize(
_param = self._unassign_agent_from_cluster_serialize(
agent_id=agent_id,
agent_cluster_unassign_request=agent_cluster_unassign_request,
aid=aid,
@ -478,7 +481,7 @@ class EnterpriseAgentClusterApi:
@validate_call
def unassign_enterprise_agent_from_cluster_with_http_info(
def unassign_agent_from_cluster_with_http_info(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
agent_cluster_unassign_request: AgentClusterUnassignRequest,
@ -531,7 +534,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._unassign_enterprise_agent_from_cluster_serialize(
_param = self._unassign_agent_from_cluster_serialize(
agent_id=agent_id,
agent_cluster_unassign_request=agent_cluster_unassign_request,
aid=aid,
@ -565,7 +568,7 @@ class EnterpriseAgentClusterApi:
@validate_call
def unassign_enterprise_agent_from_cluster_without_preload_content(
def unassign_agent_from_cluster_without_preload_content(
self,
agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")],
agent_cluster_unassign_request: AgentClusterUnassignRequest,
@ -618,7 +621,7 @@ class EnterpriseAgentClusterApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._unassign_enterprise_agent_from_cluster_serialize(
_param = self._unassign_agent_from_cluster_serialize(
agent_id=agent_id,
agent_cluster_unassign_request=agent_cluster_unassign_request,
aid=aid,
@ -646,7 +649,7 @@ class EnterpriseAgentClusterApi:
return response_data.response
def _unassign_enterprise_agent_from_cluster_serialize(
def _unassign_agent_from_cluster_serialize(
self,
agent_id,
agent_cluster_unassign_request,
@ -694,6 +697,7 @@ class EnterpriseAgentClusterApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -23,9 +23,10 @@ from typing import Optional
from typing_extensions import Annotated
from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class ProxiesApi:
@ -38,11 +39,12 @@ class ProxiesApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def get_agent_proxies(
def get_agents_proxies(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -86,7 +88,7 @@ class ProxiesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_proxies_serialize(
_param = self._get_agents_proxies_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -116,7 +118,7 @@ class ProxiesApi:
@validate_call
def get_agent_proxies_with_http_info(
def get_agents_proxies_with_http_info(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -160,7 +162,7 @@ class ProxiesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_proxies_serialize(
_param = self._get_agents_proxies_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -190,7 +192,7 @@ class ProxiesApi:
@validate_call
def get_agent_proxies_without_preload_content(
def get_agents_proxies_without_preload_content(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -234,7 +236,7 @@ class ProxiesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_agent_proxies_serialize(
_param = self._get_agents_proxies_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -258,7 +260,7 @@ class ProxiesApi:
return response_data.response
def _get_agent_proxies_serialize(
def _get_agents_proxies_serialize(
self,
aid,
_request_auth,
@ -294,6 +296,7 @@ class ProxiesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -6,7 +6,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class AccountGroup(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class AccountGroup(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -44,6 +44,7 @@ class Agent(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -54,7 +55,7 @@ class Agent(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -35,6 +35,7 @@ class AgentBase(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -45,7 +46,7 @@ class AgentBase(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -33,6 +33,7 @@ class AgentClusterAssignRequest(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -43,7 +44,7 @@ class AgentClusterAssignRequest(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -33,6 +33,7 @@ class AgentClusterUnassignRequest(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -43,7 +44,7 @@ class AgentClusterUnassignRequest(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -20,7 +20,7 @@ from typing import Any, List, Optional
from thousandeyes_sdk.agents.models.cloud_agent_detail import CloudAgentDetail
from thousandeyes_sdk.agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail
from thousandeyes_sdk.agents.models.enterprise_agent_detail import EnterpriseAgentDetail
from pydantic import StrictStr, Field
from pydantic import StrictStr, Field, model_serializer
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
@ -126,6 +126,10 @@ class AgentDetails(BaseModel):
else:
return instance
@model_serializer(when_used="json")
def serialize_model(self):
return json.loads(self.to_json())
def to_json(self) -> str:
"""Returns the JSON representation of the actual instance"""
if self.actual_instance is None:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -36,6 +36,7 @@ class AgentProxies(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -46,7 +47,7 @@ class AgentProxies(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -46,6 +46,7 @@ class AgentProxy(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -56,7 +57,7 @@ class AgentProxy(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -41,6 +41,7 @@ class AgentRequest(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -51,7 +52,7 @@ class AgentRequest(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class AlertEmail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class AlertEmail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -41,6 +41,7 @@ class AlertIntegrationBase(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -51,7 +52,7 @@ class AlertIntegrationBase(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -57,6 +57,7 @@ class CloudAgentDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -67,7 +68,7 @@ class CloudAgentDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -23,7 +23,7 @@ from thousandeyes_sdk.agents.models.agent import Agent
from thousandeyes_sdk.agents.models.enterprise_agent import EnterpriseAgent
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
from typing_extensions import Literal, Self
from pydantic import Field
from pydantic import Field, model_serializer
CLOUDENTERPRISEAGENT_ANY_OF_SCHEMAS = ["Agent", "EnterpriseAgent"]
@ -107,6 +107,10 @@ class CloudEnterpriseAgent(BaseModel):
else:
return instance
@model_serializer(when_used="json")
def serialize_model(self):
return json.loads(self.to_json())
def to_json(self) -> str:
"""Returns the JSON representation of the actual instance"""
if self.actual_instance is None:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -36,6 +36,7 @@ class CloudEnterpriseAgents(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -46,7 +47,7 @@ class CloudEnterpriseAgents(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -45,6 +45,7 @@ class ClusterMember(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -55,7 +56,7 @@ class ClusterMember(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -64,6 +64,7 @@ class EnterpriseAgent(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -74,7 +75,7 @@ class EnterpriseAgent(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -79,6 +79,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -89,7 +90,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -52,6 +52,7 @@ class EnterpriseAgentData(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -62,7 +63,7 @@ class EnterpriseAgentData(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -79,6 +79,7 @@ class EnterpriseAgentDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -89,7 +90,7 @@ class EnterpriseAgentDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -38,6 +38,7 @@ class EnterpriseAgentResponseExpands(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -48,7 +49,7 @@ class EnterpriseAgentResponseExpands(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -37,6 +37,7 @@ class Error(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -47,7 +48,7 @@ class Error(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -35,6 +35,7 @@ class ErrorDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -45,7 +46,7 @@ class ErrorDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class InterfaceIpMapping(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class InterfaceIpMapping(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class Labels(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class Labels(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -40,6 +40,7 @@ class Link(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -50,7 +51,7 @@ class Link(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -36,6 +36,7 @@ class ListNotificationRulesResponse(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -46,7 +47,7 @@ class ListNotificationRulesResponse(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -37,6 +37,7 @@ class Notification(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -47,7 +48,7 @@ class Notification(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -37,6 +37,7 @@ class NotificationRule(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -47,7 +48,7 @@ class NotificationRule(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -43,6 +43,7 @@ class NotificationRuleDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -53,7 +54,7 @@ class NotificationRuleDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class NotificationRules(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class NotificationRules(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class SelfLinks(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class SelfLinks(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -42,6 +42,7 @@ class SimpleAgent(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -52,7 +53,7 @@ class SimpleAgent(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -62,6 +62,7 @@ class SimpleEnterpriseAgent(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -72,7 +73,7 @@ class SimpleEnterpriseAgent(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -51,6 +51,7 @@ class SimpleTest(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -61,7 +62,7 @@ class SimpleTest(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -36,6 +36,7 @@ class TestLinks(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -46,7 +47,7 @@ class TestLinks(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -40,6 +40,7 @@ class TestSelfLink(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -50,7 +51,7 @@ class TestSelfLink(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -26,6 +26,7 @@ class TestType(str, Enum):
"""
allowed enum values
"""
API = 'api'
AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent'
AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server'
BGP = 'bgp'

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -39,6 +39,7 @@ class ValidationError(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -49,7 +50,7 @@ class ValidationError(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel):
ValidationErrorItem
""" # noqa: E501
code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.")
var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.")
__properties: ClassVar[List[str]] = ["code", "field", "message"]
@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -0,0 +1,167 @@
# coding: utf-8
"""
Agents API
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.agents.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi
class TestCloudAndEnterpriseAgentNotificationRulesApi(unittest.TestCase):
"""CloudAndEnterpriseAgentNotificationRulesApi unit test stubs"""
def setUp(self) -> None:
self.api = CloudAndEnterpriseAgentNotificationRulesApi()
def tearDown(self) -> None:
pass
def test_get_agents_notification_rule_models_validation(self) -> None:
"""Test case for get_agents_notification_rule request and response models"""
response_body_json = """
{
"isDefault" : false,
"expression" : "((lastContact >= 30 min))",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"ruleName" : "Default Agent Offline Notification",
"ruleId" : "281474976710706",
"notifications" : {
"thirdParty" : [ {
"integrationType" : "slack",
"integrationName" : "integrationSlack1",
"authToken" : "0VqDYEpidpHVAK397x8PBsmZ",
"channel" : "#slackChannel",
"integrationId" : "wb-78",
"authMethod" : "Basic",
"authUser" : "user123",
"target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ"
}, {
"integrationType" : "slack",
"integrationName" : "integrationSlack1",
"authToken" : "0VqDYEpidpHVAK397x8PBsmZ",
"channel" : "#slackChannel",
"integrationId" : "wb-78",
"authMethod" : "Basic",
"authUser" : "user123",
"target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ"
} ],
"webhook" : [ {
"integrationType" : "slack",
"integrationName" : "integrationSlack1",
"authToken" : "0VqDYEpidpHVAK397x8PBsmZ",
"channel" : "#slackChannel",
"integrationId" : "wb-78",
"authMethod" : "Basic",
"authUser" : "user123",
"target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ"
}, {
"integrationType" : "slack",
"integrationName" : "integrationSlack1",
"authToken" : "0VqDYEpidpHVAK397x8PBsmZ",
"channel" : "#slackChannel",
"integrationId" : "wb-78",
"authMethod" : "Basic",
"authUser" : "user123",
"target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ"
} ],
"email" : {
"recipients" : [ "user1@thousandeyes.com", "user2@cisco.com" ],
"message" : "This test is failing, check as soon as possible."
}
},
"notifyOnClear" : true,
"agents" : [ {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
}, {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.NotificationRuleDetail.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_get_agents_notification_rules_models_validation(self) -> None:
"""Test case for get_agents_notification_rules request and response models"""
response_body_json = """
{
"agentAlertRules" : [ {
"ruleId" : "281474976710706",
"ruleName" : "Default Agent Offline Notification",
"expression" : "((lastContact >= 30 min))",
"notifyOnClear" : true,
"isDefault" : false
}, {
"ruleId" : "281474976710709",
"ruleName" : "Test Rule",
"expression" : "((lastContact >= 40 min))",
"notifyOnClear" : true,
"isDefault" : true
} ],
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
}
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.ListNotificationRulesResponse.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,309 @@
# coding: utf-8
"""
Agents API
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.agents.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi
class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
"""CloudAndEnterpriseAgentsApi unit test stubs"""
def setUp(self) -> None:
self.api = CloudAndEnterpriseAgentsApi()
def tearDown(self) -> None:
pass
def test_delete_agent_models_validation(self) -> None:
"""Test case for delete_agent request and response models"""
def test_get_agent_models_validation(self) -> None:
"""Test case for get_agent request and response models"""
response_body_json = """
{
"agentId" : "281474976710706",
"agentType" : "cloud",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"labels" : [ {
"labelId" : "11",
"name" : "Label name"
}, {
"labelId" : "11",
"name" : "Label name"
} ],
"tests" : [ {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
}, {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"verifySslCertificates" : true
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_get_agents_models_validation(self) -> None:
"""Test case for get_agents request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"agents" : [ {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
}, {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_update_agent_models_validation(self) -> None:
"""Test case for update_agent request and response models"""
request_body_json = """
{
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/25" ],
"tests" : [ "12313145", "12345" ],
"ipv6Policy" : "force-ipv4",
"keepBrowserCache" : true,
"targetForTests" : "1.1.1.1",
"agentName" : "thousandeyes-stg-va-254",
"enabled" : true,
"accountGroups" : [ "1234", "1" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentRequest.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"agentId" : "281474976710706",
"agentType" : "cloud",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"labels" : [ {
"labelId" : "11",
"name" : "Label name"
}, {
"labelId" : "11",
"name" : "Label name"
} ],
"tests" : [ {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
}, {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"verifySslCertificates" : true
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,202 @@
# coding: utf-8
"""
Agents API
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.agents.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi
class TestEnterpriseAgentClusterApi(unittest.TestCase):
"""EnterpriseAgentClusterApi unit test stubs"""
def setUp(self) -> None:
self.api = EnterpriseAgentClusterApi()
def tearDown(self) -> None:
pass
def test_assign_agent_to_cluster_models_validation(self) -> None:
"""Test case for assign_agent_to_cluster request and response models"""
request_body_json = """
{
"agents" : [ "281474976710706" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentClusterAssignRequest.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"agentId" : "281474976710706",
"agentType" : "cloud",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"labels" : [ {
"labelId" : "11",
"name" : "Label name"
}, {
"labelId" : "11",
"name" : "Label name"
} ],
"tests" : [ {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
}, {
"_links" : {
"testResults" : [ {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
}, {
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
} ],
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"liveShare" : false,
"savedEvent" : true,
"description" : "ThousandEyes Test",
"type" : "agent-to-server",
"enabled" : true,
"createdDate" : "2022-07-17T22:00:54Z",
"createdBy" : "user@user.com",
"modifiedDate" : "2022-07-17T22:00:54Z",
"interval" : 120,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"verifySslCertificates" : true
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_unassign_agent_from_cluster_models_validation(self) -> None:
"""Test case for unassign_agent_from_cluster request and response models"""
request_body_json = """
{
"members" : [ "281474976710706" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentClusterUnassignRequest.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"agents" : [ {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
}, {
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"verifySslCertificates" : true
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,82 @@
# coding: utf-8
"""
Agents API
## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.agents.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.agents.api.proxies_api import ProxiesApi
class TestProxiesApi(unittest.TestCase):
"""ProxiesApi unit test stubs"""
def setUp(self) -> None:
self.api = ProxiesApi()
def tearDown(self) -> None:
pass
def test_get_agents_proxies_models_validation(self) -> None:
"""Test case for get_agents_proxies request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"agentProxies" : [ {
"password" : "**********",
"isLocalConfigured" : true,
"name" : "Test Proxy - Auth Type - BASIC",
"location" : "proxy.thousandeyes.com:3128",
"lastModified" : "2022-07-17T22:00:54Z",
"authType" : "basic",
"type" : "static",
"aid" : "1234",
"bypassList" : [ "10.0.0.0/16", "*.thousandeyes.com" ],
"user" : "user1",
"proxyId" : "281474976710706"
}, {
"password" : "**********",
"isLocalConfigured" : true,
"name" : "Test Proxy - Auth Type - BASIC",
"location" : "proxy.thousandeyes.com:3128",
"lastModified" : "2022-07-17T22:00:54Z",
"authType" : "basic",
"type" : "static",
"aid" : "1234",
"bypassList" : [ "10.0.0.0/16", "*.thousandeyes.com" ],
"user" : "user1",
"proxyId" : "281474976710706"
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.agents.models.AgentProxies.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,16 @@
# coding: utf-8
import json
import unittest
from pydantic import BaseModel
def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict):
test_case = unittest.TestCase()
test_case.maxDiff = None
test_case.assertIsNotNone(model)
constructed_json = json.loads(model.to_json())
sorted_loaded_json = json.dumps(loaded_json, sort_keys=True)
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)

View File

@ -113,53 +113,7 @@ src/thousandeyes_sdk/alerts/models/validation_error_item.py
src/thousandeyes_sdk/alerts/models/webhook_integration_type.py
src/thousandeyes_sdk/alerts/py.typed
test/__init__.py
test/test_alert.py
test/test_alert_detail.py
test/test_alert_direction.py
test/test_alert_links.py
test/test_alert_meta.py
test/test_alert_metric_detail.py
test/test_alert_rounds_violation_mode.py
test/test_alert_rule.py
test/test_alert_suppression_window.py
test/test_alert_suppression_window_detail.py
test/test_alert_suppression_window_request.py
test/test_alert_suppression_window_state.py
test/test_alert_suppression_windows.py
test/test_alert_type.py
test/test_alerts.py
test/test_base_alert.py
test/test_base_alert_suppression_window.py
test/test_base_rule.py
test/test_base_test.py
test/test_days_of_week.py
test/test_end_alert_metrics.py
test/test_end_repeat.py
test/test_end_repeat_type.py
test/test_error.py
test/test_expand.py
test/test_interval_type.py
test/test_legacy_alert.py
test/test_link.py
test/test_notification.py
test/test_notification_email.py
test/test_notification_third_party.py
test/test_notification_webhook.py
test/test_pagination_links.py
test/test_repeat.py
test/test_repeat_type.py
test/test_rule.py
test/test_rule_detail.py
test/test_rule_detail_update.py
test/test_rules.py
test/test_self_links.py
test/test_severity.py
test/test_start_alert_metrics.py
test/test_state.py
test/test_test_interval.py
test/test_third_party_integration_type.py
test/test_unauthorized_error.py
test/test_unexpanded_test.py
test/test_validation_error.py
test/test_validation_error_item.py
test/test_webhook_integration_type.py
test/test_alert_rules_api.py
test/test_alert_suppression_windows_api.py
test/test_alerts_api.py
test/test_utils.py

View File

@ -12,8 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.4
- Package version: 1.0.0
- API version: 7.0.6
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -27,9 +26,9 @@ Python 3.7+
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-alerts\&subdirectory=thousandeyes-sdk-alerts
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-alerts\&subdirectory=thousandeyes-sdk-alerts`)
Then import the package:
```python
@ -60,14 +59,14 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
import thousandeyes_sdk.client
import thousandeyes_sdk.core
import thousandeyes_sdk.alerts
from thousandeyes_sdk.client.exceptions import ApiException
from thousandeyes_sdk.core.exceptions import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -77,13 +76,13 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.client.ApiClient(configuration) as api_client:
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.alerts.AlertRulesApi(api_client)
rule_detail_update = thousandeyes_sdk.alerts.RuleDetailUpdate() # RuleDetailUpdate |
@ -107,15 +106,15 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AlertRulesApi* | [**create_alert_rule**](docs/AlertRulesApi.md#create_alert_rule) | **POST** /v7/alerts/rules | Create alert rule
*AlertRulesApi* | [**delete_alert_rule**](docs/AlertRulesApi.md#delete_alert_rule) | **DELETE** /v7/alerts/rules/{ruleId} | Delete alert rule
*AlertRulesApi* | [**get_alert_rule_details**](docs/AlertRulesApi.md#get_alert_rule_details) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule
*AlertRulesApi* | [**get_alert_rule**](docs/AlertRulesApi.md#get_alert_rule) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule
*AlertRulesApi* | [**get_alerts_rules**](docs/AlertRulesApi.md#get_alerts_rules) | **GET** /v7/alerts/rules | List alert rules
*AlertRulesApi* | [**update_alert_rule**](docs/AlertRulesApi.md#update_alert_rule) | **PUT** /v7/alerts/rules/{ruleId} | Update alert rule
*AlertSuppressionWindowsApi* | [**create_suppression_windows**](docs/AlertSuppressionWindowsApi.md#create_suppression_windows) | **POST** /v7/alert-suppression-windows | Create alert suppression window
*AlertSuppressionWindowsApi* | [**delete_suppression_window**](docs/AlertSuppressionWindowsApi.md#delete_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window
*AlertSuppressionWindowsApi* | [**get_suppression_window_details**](docs/AlertSuppressionWindowsApi.md#get_suppression_window_details) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window
*AlertSuppressionWindowsApi* | [**get_suppression_windows**](docs/AlertSuppressionWindowsApi.md#get_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows
*AlertSuppressionWindowsApi* | [**update_suppression_window**](docs/AlertSuppressionWindowsApi.md#update_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window
*AlertsApi* | [**get_alert_details**](docs/AlertsApi.md#get_alert_details) | **GET** /v7/alerts/{alertId} | Retrieve alert details
*AlertSuppressionWindowsApi* | [**create_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#create_alert_suppression_window) | **POST** /v7/alert-suppression-windows | Create alert suppression window
*AlertSuppressionWindowsApi* | [**delete_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#delete_alert_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window
*AlertSuppressionWindowsApi* | [**get_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#get_alert_suppression_window) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window
*AlertSuppressionWindowsApi* | [**get_alert_suppression_windows**](docs/AlertSuppressionWindowsApi.md#get_alert_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows
*AlertSuppressionWindowsApi* | [**update_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#update_alert_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window
*AlertsApi* | [**get_alert**](docs/AlertsApi.md#get_alert) | **GET** /v7/alerts/{alertId} | Retrieve alert details
*AlertsApi* | [**get_alerts**](docs/AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**violation_count** | **int** | Number of sources that meet the alert criteria. | [optional]
**duration** | **float** | Duration in seconds the alert was active | [optional]
**duration** | **int** | Duration in seconds the alert was active | [optional]
**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional]
**meta** | [**AlertMeta**](AlertMeta.md) | | [optional]
**links** | [**AlertLinks**](AlertLinks.md) | | [optional]

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**violation_count** | **int** | Number of sources that meet the alert criteria. | [optional]
**duration** | **float** | Duration in seconds the alert was active | [optional]
**duration** | **int** | Duration in seconds the alert was active | [optional]
**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional]
**meta** | [**AlertMeta**](AlertMeta.md) | | [optional]
**links** | [**AlertLinks**](AlertLinks.md) | | [optional]

View File

@ -6,7 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**create_alert_rule**](AlertRulesApi.md#create_alert_rule) | **POST** /v7/alerts/rules | Create alert rule
[**delete_alert_rule**](AlertRulesApi.md#delete_alert_rule) | **DELETE** /v7/alerts/rules/{ruleId} | Delete alert rule
[**get_alert_rule_details**](AlertRulesApi.md#get_alert_rule_details) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule
[**get_alert_rule**](AlertRulesApi.md#get_alert_rule) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule
[**get_alerts_rules**](AlertRulesApi.md#get_alerts_rules) | **GET** /v7/alerts/rules | List alert rules
[**update_alert_rule**](AlertRulesApi.md#update_alert_rule) | **PUT** /v7/alerts/rules/{ruleId} | Update alert rule
@ -31,7 +31,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -41,7 +41,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -82,7 +82,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -116,7 +116,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -126,7 +126,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -165,7 +165,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/problem+json
- **Accept**: application/json, application/problem+json
### HTTP response details
@ -181,8 +181,8 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_alert_rule_details**
> RuleDetail get_alert_rule_details(rule_id, aid=aid)
# **get_alert_rule**
> RuleDetail get_alert_rule(rule_id, aid=aid)
Retrieve alert rule
@ -200,7 +200,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -210,7 +210,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -223,11 +223,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Retrieve alert rule
api_response = api_instance.get_alert_rule_details(rule_id, aid=aid)
print("The response of AlertRulesApi->get_alert_rule_details:\n")
api_response = api_instance.get_alert_rule(rule_id, aid=aid)
print("The response of AlertRulesApi->get_alert_rule:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertRulesApi->get_alert_rule_details: %s\n" % e)
print("Exception when calling AlertRulesApi->get_alert_rule: %s\n" % e)
```
@ -251,7 +251,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -285,7 +285,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -295,7 +295,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -334,7 +334,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -369,7 +369,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -379,7 +379,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -422,7 +422,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -4,15 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_suppression_windows**](AlertSuppressionWindowsApi.md#create_suppression_windows) | **POST** /v7/alert-suppression-windows | Create alert suppression window
[**delete_suppression_window**](AlertSuppressionWindowsApi.md#delete_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window
[**get_suppression_window_details**](AlertSuppressionWindowsApi.md#get_suppression_window_details) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window
[**get_suppression_windows**](AlertSuppressionWindowsApi.md#get_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows
[**update_suppression_window**](AlertSuppressionWindowsApi.md#update_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window
[**create_alert_suppression_window**](AlertSuppressionWindowsApi.md#create_alert_suppression_window) | **POST** /v7/alert-suppression-windows | Create alert suppression window
[**delete_alert_suppression_window**](AlertSuppressionWindowsApi.md#delete_alert_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window
[**get_alert_suppression_window**](AlertSuppressionWindowsApi.md#get_alert_suppression_window) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window
[**get_alert_suppression_windows**](AlertSuppressionWindowsApi.md#get_alert_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows
[**update_alert_suppression_window**](AlertSuppressionWindowsApi.md#update_alert_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window
# **create_suppression_windows**
> AlertSuppressionWindowDetail create_suppression_windows(alert_suppression_window_request, aid=aid, expand=expand)
# **create_alert_suppression_window**
> AlertSuppressionWindowDetail create_alert_suppression_window(alert_suppression_window_request, aid=aid, expand=expand)
Create alert suppression window
@ -32,7 +32,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -42,7 +42,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -56,11 +56,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Create alert suppression window
api_response = api_instance.create_suppression_windows(alert_suppression_window_request, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->create_suppression_windows:\n")
api_response = api_instance.create_alert_suppression_window(alert_suppression_window_request, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->create_alert_suppression_window:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertSuppressionWindowsApi->create_suppression_windows: %s\n" % e)
print("Exception when calling AlertSuppressionWindowsApi->create_alert_suppression_window: %s\n" % e)
```
@ -85,7 +85,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -101,8 +101,8 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_suppression_window**
> delete_suppression_window(window_id, aid=aid)
# **delete_alert_suppression_window**
> delete_alert_suppression_window(window_id, aid=aid)
Delete alert suppression window
@ -119,7 +119,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -129,7 +129,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -142,9 +142,9 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Delete alert suppression window
api_instance.delete_suppression_window(window_id, aid=aid)
api_instance.delete_alert_suppression_window(window_id, aid=aid)
except Exception as e:
print("Exception when calling AlertSuppressionWindowsApi->delete_suppression_window: %s\n" % e)
print("Exception when calling AlertSuppressionWindowsApi->delete_alert_suppression_window: %s\n" % e)
```
@ -168,7 +168,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/problem+json
- **Accept**: application/json, application/problem+json
### HTTP response details
@ -184,8 +184,8 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_suppression_window_details**
> AlertSuppressionWindowDetail get_suppression_window_details(window_id, aid=aid, expand=expand)
# **get_alert_suppression_window**
> AlertSuppressionWindowDetail get_alert_suppression_window(window_id, aid=aid, expand=expand)
Retrieve alert suppression window
@ -204,7 +204,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -214,7 +214,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -228,11 +228,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Retrieve alert suppression window
api_response = api_instance.get_suppression_window_details(window_id, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->get_suppression_window_details:\n")
api_response = api_instance.get_alert_suppression_window(window_id, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->get_alert_suppression_window:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertSuppressionWindowsApi->get_suppression_window_details: %s\n" % e)
print("Exception when calling AlertSuppressionWindowsApi->get_alert_suppression_window: %s\n" % e)
```
@ -257,7 +257,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -272,8 +272,8 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_suppression_windows**
> AlertSuppressionWindows get_suppression_windows(aid=aid)
# **get_alert_suppression_windows**
> AlertSuppressionWindows get_alert_suppression_windows(aid=aid)
List alert suppression windows
@ -291,7 +291,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -301,7 +301,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -313,11 +313,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# List alert suppression windows
api_response = api_instance.get_suppression_windows(aid=aid)
print("The response of AlertSuppressionWindowsApi->get_suppression_windows:\n")
api_response = api_instance.get_alert_suppression_windows(aid=aid)
print("The response of AlertSuppressionWindowsApi->get_alert_suppression_windows:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertSuppressionWindowsApi->get_suppression_windows: %s\n" % e)
print("Exception when calling AlertSuppressionWindowsApi->get_alert_suppression_windows: %s\n" % e)
```
@ -340,7 +340,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -355,8 +355,8 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_suppression_window**
> AlertSuppressionWindowDetail update_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand)
# **update_alert_suppression_window**
> AlertSuppressionWindowDetail update_alert_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand)
Update alert suppression window
@ -376,7 +376,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -386,7 +386,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -401,11 +401,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Update alert suppression window
api_response = api_instance.update_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->update_suppression_window:\n")
api_response = api_instance.update_alert_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand)
print("The response of AlertSuppressionWindowsApi->update_alert_suppression_window:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertSuppressionWindowsApi->update_suppression_window: %s\n" % e)
print("Exception when calling AlertSuppressionWindowsApi->update_alert_suppression_window: %s\n" % e)
```
@ -431,7 +431,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_alert_details**](AlertsApi.md#get_alert_details) | **GET** /v7/alerts/{alertId} | Retrieve alert details
[**get_alert**](AlertsApi.md#get_alert) | **GET** /v7/alerts/{alertId} | Retrieve alert details
[**get_alerts**](AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts
# **get_alert_details**
> AlertDetail get_alert_details(alert_id, aid=aid)
# **get_alert**
> AlertDetail get_alert(alert_id, aid=aid)
Retrieve alert details
@ -27,7 +27,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -37,7 +37,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -50,11 +50,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
try:
# Retrieve alert details
api_response = api_instance.get_alert_details(alert_id, aid=aid)
print("The response of AlertsApi->get_alert_details:\n")
api_response = api_instance.get_alert(alert_id, aid=aid)
print("The response of AlertsApi->get_alert:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlertsApi->get_alert_details: %s\n" % e)
print("Exception when calling AlertsApi->get_alert: %s\n" % e)
```
@ -78,7 +78,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
@ -112,7 +112,7 @@ from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
@ -122,7 +122,7 @@ configuration = thousandeyes_sdk.client.Configuration(
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.client.Configuration(
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
@ -134,7 +134,7 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client:
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
max = 5 # float | (Optional) Maximum number of objects to return. (optional)
max = 5 # int | (Optional) Maximum number of objects to return. (optional)
state = thousandeyes_sdk.alerts.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional)
try:
@ -157,7 +157,7 @@ Name | Type | Description | Notes
**window** | **str**| A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. | [optional]
**start_date** | **datetime**| Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
**end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
**max** | **float**| (Optional) Maximum number of objects to return. | [optional]
**max** | **int**| (Optional) Maximum number of objects to return. | [optional]
**state** | [**State**](.md)| Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. | [optional]
### Return type
@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/problem+json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly]
**violation_count** | **int** | Number of sources that meet the alert criteria. | [optional]
**duration** | **float** | Duration in seconds the alert was active | [optional]
**duration** | **int** | Duration in seconds the alert was active | [optional]
**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional]
**meta** | [**AlertMeta**](AlertMeta.md) | | [optional]
**links** | [**AlertLinks**](AlertLinks.md) | | [optional]

View File

@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
**var_field** | **int** | Identifies the field that triggered this particular error. | [optional]
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
**message** | **str** | A short, human-readable summary of the error. | [optional]
## Example

View File

@ -1,6 +1,6 @@
[project]
name = "thousandeyes-sdk-alerts"
version = "1.0.0"
dynamic = ["version"]
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
@ -11,9 +11,12 @@ dependencies = [
"python-dateutil >=2.8.2",
"pydantic >=2",
"typing-extensions >=4.7.1",
"thousandeyes-sdk-core==1.0.0",
"thousandeyes-sdk-core",
]
[tool.setuptools.dynamic]
version = {attr = "thousandeyes_sdk.core.__version__"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",

View File

@ -7,15 +7,13 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
__version__ = "1.0.0"
# import apis into sdk package
from thousandeyes_sdk.alerts.api.alert_rules_api import AlertRulesApi
from thousandeyes_sdk.alerts.api.alert_suppression_windows_api import AlertSuppressionWindowsApi

View File

@ -5,7 +5,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -26,9 +26,10 @@ from thousandeyes_sdk.alerts.models.rule_detail import RuleDetail
from thousandeyes_sdk.alerts.models.rule_detail_update import RuleDetailUpdate
from thousandeyes_sdk.alerts.models.rules import Rules
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class AlertRulesApi:
@ -41,6 +42,7 @@ class AlertRulesApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@ -312,6 +314,7 @@ class AlertRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -620,6 +623,7 @@ class AlertRulesApi:
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json',
'application/problem+json'
]
)
@ -649,7 +653,7 @@ class AlertRulesApi:
@validate_call
def get_alert_rule_details(
def get_alert_rule(
self,
rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -696,7 +700,7 @@ class AlertRulesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_rule_details_serialize(
_param = self._get_alert_rule_serialize(
rule_id=rule_id,
aid=aid,
_request_auth=_request_auth,
@ -726,7 +730,7 @@ class AlertRulesApi:
@validate_call
def get_alert_rule_details_with_http_info(
def get_alert_rule_with_http_info(
self,
rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -773,7 +777,7 @@ class AlertRulesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_rule_details_serialize(
_param = self._get_alert_rule_serialize(
rule_id=rule_id,
aid=aid,
_request_auth=_request_auth,
@ -803,7 +807,7 @@ class AlertRulesApi:
@validate_call
def get_alert_rule_details_without_preload_content(
def get_alert_rule_without_preload_content(
self,
rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -850,7 +854,7 @@ class AlertRulesApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_rule_details_serialize(
_param = self._get_alert_rule_serialize(
rule_id=rule_id,
aid=aid,
_request_auth=_request_auth,
@ -874,7 +878,7 @@ class AlertRulesApi:
return response_data.response
def _get_alert_rule_details_serialize(
def _get_alert_rule_serialize(
self,
rule_id,
aid,
@ -913,6 +917,7 @@ class AlertRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -1191,6 +1196,7 @@ class AlertRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -1502,6 +1508,7 @@ class AlertRulesApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -5,7 +5,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -26,9 +26,10 @@ from thousandeyes_sdk.alerts.models.alert_suppression_window_request import Aler
from thousandeyes_sdk.alerts.models.alert_suppression_windows import AlertSuppressionWindows
from thousandeyes_sdk.alerts.models.expand import Expand
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class AlertSuppressionWindowsApi:
@ -41,11 +42,12 @@ class AlertSuppressionWindowsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def create_suppression_windows(
def create_alert_suppression_window(
self,
alert_suppression_window_request: AlertSuppressionWindowRequest,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -95,7 +97,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._create_suppression_windows_serialize(
_param = self._create_alert_suppression_window_serialize(
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
expand=expand,
@ -127,7 +129,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def create_suppression_windows_with_http_info(
def create_alert_suppression_window_with_http_info(
self,
alert_suppression_window_request: AlertSuppressionWindowRequest,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -177,7 +179,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._create_suppression_windows_serialize(
_param = self._create_alert_suppression_window_serialize(
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
expand=expand,
@ -209,7 +211,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def create_suppression_windows_without_preload_content(
def create_alert_suppression_window_without_preload_content(
self,
alert_suppression_window_request: AlertSuppressionWindowRequest,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -259,7 +261,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._create_suppression_windows_serialize(
_param = self._create_alert_suppression_window_serialize(
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
expand=expand,
@ -285,7 +287,7 @@ class AlertSuppressionWindowsApi:
return response_data.response
def _create_suppression_windows_serialize(
def _create_alert_suppression_window_serialize(
self,
alert_suppression_window_request,
aid,
@ -330,6 +332,7 @@ class AlertSuppressionWindowsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -372,7 +375,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def delete_suppression_window(
def delete_alert_suppression_window(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -419,7 +422,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_suppression_window_serialize(
_param = self._delete_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
_request_auth=_request_auth,
@ -450,7 +453,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def delete_suppression_window_with_http_info(
def delete_alert_suppression_window_with_http_info(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -497,7 +500,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_suppression_window_serialize(
_param = self._delete_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
_request_auth=_request_auth,
@ -528,7 +531,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def delete_suppression_window_without_preload_content(
def delete_alert_suppression_window_without_preload_content(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -575,7 +578,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_suppression_window_serialize(
_param = self._delete_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
_request_auth=_request_auth,
@ -600,7 +603,7 @@ class AlertSuppressionWindowsApi:
return response_data.response
def _delete_suppression_window_serialize(
def _delete_alert_suppression_window_serialize(
self,
window_id,
aid,
@ -638,6 +641,7 @@ class AlertSuppressionWindowsApi:
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json',
'application/problem+json'
]
)
@ -667,7 +671,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_window_details(
def get_alert_suppression_window(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -717,7 +721,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_window_details_serialize(
_param = self._get_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
expand=expand,
@ -748,7 +752,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_window_details_with_http_info(
def get_alert_suppression_window_with_http_info(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -798,7 +802,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_window_details_serialize(
_param = self._get_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
expand=expand,
@ -829,7 +833,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_window_details_without_preload_content(
def get_alert_suppression_window_without_preload_content(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -879,7 +883,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_window_details_serialize(
_param = self._get_alert_suppression_window_serialize(
window_id=window_id,
aid=aid,
expand=expand,
@ -904,7 +908,7 @@ class AlertSuppressionWindowsApi:
return response_data.response
def _get_suppression_window_details_serialize(
def _get_alert_suppression_window_serialize(
self,
window_id,
aid,
@ -949,6 +953,7 @@ class AlertSuppressionWindowsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -978,7 +983,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_windows(
def get_alert_suppression_windows(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -1022,7 +1027,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_windows_serialize(
_param = self._get_alert_suppression_windows_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -1051,7 +1056,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_windows_with_http_info(
def get_alert_suppression_windows_with_http_info(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -1095,7 +1100,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_windows_serialize(
_param = self._get_alert_suppression_windows_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -1124,7 +1129,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def get_suppression_windows_without_preload_content(
def get_alert_suppression_windows_without_preload_content(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
@ -1168,7 +1173,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_suppression_windows_serialize(
_param = self._get_alert_suppression_windows_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
@ -1191,7 +1196,7 @@ class AlertSuppressionWindowsApi:
return response_data.response
def _get_suppression_windows_serialize(
def _get_alert_suppression_windows_serialize(
self,
aid,
_request_auth,
@ -1227,6 +1232,7 @@ class AlertSuppressionWindowsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -1256,7 +1262,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def update_suppression_window(
def update_alert_suppression_window(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
alert_suppression_window_request: AlertSuppressionWindowRequest,
@ -1309,7 +1315,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_suppression_window_serialize(
_param = self._update_alert_suppression_window_serialize(
window_id=window_id,
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
@ -1342,7 +1348,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def update_suppression_window_with_http_info(
def update_alert_suppression_window_with_http_info(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
alert_suppression_window_request: AlertSuppressionWindowRequest,
@ -1395,7 +1401,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_suppression_window_serialize(
_param = self._update_alert_suppression_window_serialize(
window_id=window_id,
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
@ -1428,7 +1434,7 @@ class AlertSuppressionWindowsApi:
@validate_call
def update_suppression_window_without_preload_content(
def update_alert_suppression_window_without_preload_content(
self,
window_id: Annotated[StrictStr, Field(description="Unique window ID.")],
alert_suppression_window_request: AlertSuppressionWindowRequest,
@ -1481,7 +1487,7 @@ class AlertSuppressionWindowsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._update_suppression_window_serialize(
_param = self._update_alert_suppression_window_serialize(
window_id=window_id,
alert_suppression_window_request=alert_suppression_window_request,
aid=aid,
@ -1508,7 +1514,7 @@ class AlertSuppressionWindowsApi:
return response_data.response
def _update_suppression_window_serialize(
def _update_alert_suppression_window_serialize(
self,
window_id,
alert_suppression_window_request,
@ -1556,6 +1562,7 @@ class AlertSuppressionWindowsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -5,7 +5,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -19,15 +19,16 @@ from typing_extensions import Annotated
import thousandeyes_sdk.alerts.models
from datetime import datetime
from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
from typing import Any, Optional, Union
from pydantic import Field, StrictInt, StrictStr, field_validator
from typing import Any, Optional
from typing_extensions import Annotated
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
from thousandeyes_sdk.alerts.models.alerts import Alerts
from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.client.api_response import ApiResponse
from thousandeyes_sdk.client.rest import RESTResponseType
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class AlertsApi:
@ -40,11 +41,12 @@ class AlertsApi:
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def get_alert_details(
def get_alert(
self,
alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -91,7 +93,7 @@ class AlertsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_details_serialize(
_param = self._get_alert_serialize(
alert_id=alert_id,
aid=aid,
_request_auth=_request_auth,
@ -121,7 +123,7 @@ class AlertsApi:
@validate_call
def get_alert_details_with_http_info(
def get_alert_with_http_info(
self,
alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -168,7 +170,7 @@ class AlertsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_details_serialize(
_param = self._get_alert_serialize(
alert_id=alert_id,
aid=aid,
_request_auth=_request_auth,
@ -198,7 +200,7 @@ class AlertsApi:
@validate_call
def get_alert_details_without_preload_content(
def get_alert_without_preload_content(
self,
alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")],
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
@ -245,7 +247,7 @@ class AlertsApi:
:return: Returns the result object.
""" # noqa: E501
_param = self._get_alert_details_serialize(
_param = self._get_alert_serialize(
alert_id=alert_id,
aid=aid,
_request_auth=_request_auth,
@ -269,7 +271,7 @@ class AlertsApi:
return response_data.response
def _get_alert_details_serialize(
def _get_alert_serialize(
self,
alert_id,
aid,
@ -308,6 +310,7 @@ class AlertsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
@ -343,7 +346,7 @@ class AlertsApi:
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None,
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None,
_request_timeout: Union[
None,
@ -371,7 +374,7 @@ class AlertsApi:
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param max: (Optional) Maximum number of objects to return.
:type max: float
:type max: int
:param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.
:type state: State
:param _request_timeout: timeout setting for this request. If one
@ -436,7 +439,7 @@ class AlertsApi:
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None,
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None,
_request_timeout: Union[
None,
@ -464,7 +467,7 @@ class AlertsApi:
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param max: (Optional) Maximum number of objects to return.
:type max: float
:type max: int
:param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.
:type state: State
:param _request_timeout: timeout setting for this request. If one
@ -529,7 +532,7 @@ class AlertsApi:
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None,
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None,
_request_timeout: Union[
None,
@ -557,7 +560,7 @@ class AlertsApi:
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param max: (Optional) Maximum number of objects to return.
:type max: float
:type max: int
:param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.
:type state: State
:param _request_timeout: timeout setting for this request. If one
@ -689,6 +692,7 @@ class AlertsApi:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)

View File

@ -6,7 +6,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.

View File

@ -5,7 +5,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -18,8 +18,8 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional, Union
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
from thousandeyes_sdk.alerts.models.alert_type import AlertType
@ -37,7 +37,7 @@ class Alert(BaseModel):
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) for querying alerts.", alias="startDate")
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) for querying alerts.", alias="endDate")
violation_count: Optional[StrictInt] = Field(default=None, description="Number of sources that meet the alert criteria.", alias="violationCount")
duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Duration in seconds the alert was active")
duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the alert was active")
suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.")
meta: Optional[AlertMeta] = None
links: Optional[AlertLinks] = Field(default=None, alias="_links")
@ -78,6 +78,7 @@ class Alert(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -88,7 +89,7 @@ class Alert(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

View File

@ -5,7 +5,7 @@
You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rules conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
The version of the OpenAPI document: 7.0.4
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@ -18,8 +18,8 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
from thousandeyes_sdk.alerts.models.alert_metric_detail import AlertMetricDetail
@ -38,7 +38,7 @@ class AlertDetail(BaseModel):
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) for querying alerts.", alias="startDate")
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) for querying alerts.", alias="endDate")
violation_count: Optional[StrictInt] = Field(default=None, description="Number of sources that meet the alert criteria.", alias="violationCount")
duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Duration in seconds the alert was active")
duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the alert was active")
suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.")
meta: Optional[AlertMeta] = None
links: Optional[AlertLinks] = Field(default=None, alias="_links")
@ -51,6 +51,7 @@ class AlertDetail(BaseModel):
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
@ -61,7 +62,7 @@ class AlertDetail(BaseModel):
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:

Some files were not shown because too many files have changed in this diff Show More