Compare commits

..

13 Commits
2.9.0 ... main

Author SHA1 Message Date
Miguel Pragosa
e4068d6142
[GitHub Bot] Generated python SDK (#119)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-12-02 11:32:03 +00:00
Miguel Pragosa
ebbdbcbac7
[GitHub Bot] Generated python SDK (#117)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-11-11 12:19:25 +00:00
Miguel Pragosa
d44cc6b392
[GitHub Bot] Generated python SDK (#116)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-10-21 16:42:32 +01:00
Ting
df1bc2ab2f
[GitHub Bot] Generated python SDK (#114)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-09-30 14:36:04 +01:00
Ting
99f801db6d
[GitHub Bot] Generated python SDK (#113)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-09-16 14:58:43 +01:00
Miguel Pragosa
b34d33213f
[GitHub Bot] Generated python SDK (#111)
Some checks failed
Python CI / build (push) Has been cancelled
2025-08-27 15:39:09 +01:00
Miguel Pragosa
fbbbc0ca7d
[GitHub Bot] Generated python SDK (#110)
Some checks failed
Python CI / build (push) Has been cancelled
2025-08-19 12:25:22 +01:00
Miguel Pragosa
40c19e2879
[GitHub Bot] Generated python SDK (#108)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-07-22 15:07:05 +01:00
Miguel Pragosa
b2a190c19c
[GitHub Bot] Generated python SDK (#107)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-07-15 15:34:45 +01:00
Miguel Pragosa
cd1d84e1a4
[GitHub Bot] Generated python SDK (#106)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-06-20 12:31:19 +01:00
Miguel Pragosa
601dbe3a38
[GitHub Bot] Generated python SDK (#100)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-05-05 13:14:34 +01:00
Miguel Pragosa
4aeaaa4924
[GitHub Bot] Generated python SDK (#97)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2025-04-04 15:41:26 +01:00
Miguel Pragosa
1cbf139fbc
Make sure a GH release is created when a release is done (#98)
* CP-2898 Make sure a GH release is created when a release is done

* Code review
2025-04-04 15:36:27 +01:00
631 changed files with 11781 additions and 924 deletions

View File

@ -58,14 +58,10 @@ jobs:
runs-on: ubuntu-latest
needs: deployment
steps:
- name: Checkout latest code
uses: actions/checkout@v4
- name: Add tag and push to the repository
run: |
git config user.name "API Team"
git config user.email "api-team@thousandeyes.com"
git tag ${{ inputs.releaseVersion }}
git push origin ${{ inputs.releaseVersion }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.releaseVersion }}
prerelease: false
draft: false
generate_release_notes: true

View File

@ -14,6 +14,7 @@ docs/AuditUserEvents.md
docs/BaseRole.md
docs/CloudEnterpriseAgentType.md
docs/ClusterMember.md
docs/Coordinates.md
docs/CreatedAccountGroup.md
docs/CreatedUser.md
docs/EnterpriseAgent.md
@ -39,6 +40,11 @@ docs/Roles.md
docs/RolesApi.md
docs/SelfLinks.md
docs/SimpleAgent.md
docs/SimpleTest.md
docs/TestInterval.md
docs/TestLinks.md
docs/TestSelfLink.md
docs/TestType.md
docs/UnauthorizedError.md
docs/User.md
docs/UserAccountGroup.md
@ -73,6 +79,7 @@ src/thousandeyes_sdk/administrative/models/audit_user_events.py
src/thousandeyes_sdk/administrative/models/base_role.py
src/thousandeyes_sdk/administrative/models/cloud_enterprise_agent_type.py
src/thousandeyes_sdk/administrative/models/cluster_member.py
src/thousandeyes_sdk/administrative/models/coordinates.py
src/thousandeyes_sdk/administrative/models/created_account_group.py
src/thousandeyes_sdk/administrative/models/created_user.py
src/thousandeyes_sdk/administrative/models/enterprise_agent.py
@ -96,6 +103,11 @@ src/thousandeyes_sdk/administrative/models/role_request_body.py
src/thousandeyes_sdk/administrative/models/roles.py
src/thousandeyes_sdk/administrative/models/self_links.py
src/thousandeyes_sdk/administrative/models/simple_agent.py
src/thousandeyes_sdk/administrative/models/simple_test.py
src/thousandeyes_sdk/administrative/models/test_interval.py
src/thousandeyes_sdk/administrative/models/test_links.py
src/thousandeyes_sdk/administrative/models/test_self_link.py
src/thousandeyes_sdk/administrative/models/test_type.py
src/thousandeyes_sdk/administrative/models/unauthorized_error.py
src/thousandeyes_sdk/administrative/models/user.py
src/thousandeyes_sdk/administrative/models/user_account_group.py

View File

@ -12,7 +12,7 @@ This API provides the following operations to manage your organization:
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -138,6 +138,7 @@ Class | Method | HTTP request | Description
- [BaseRole](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/BaseRole.md)
- [CloudEnterpriseAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CloudEnterpriseAgentType.md)
- [ClusterMember](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ClusterMember.md)
- [Coordinates](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Coordinates.md)
- [CreatedAccountGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CreatedAccountGroup.md)
- [CreatedUser](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CreatedUser.md)
- [EnterpriseAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/EnterpriseAgent.md)
@ -161,6 +162,11 @@ Class | Method | HTTP request | Description
- [Roles](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Roles.md)
- [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SelfLinks.md)
- [SimpleAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SimpleAgent.md)
- [SimpleTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SimpleTest.md)
- [TestInterval](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestInterval.md)
- [TestLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestLinks.md)
- [TestSelfLink](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestSelfLink.md)
- [TestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestType.md)
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UnauthorizedError.md)
- [User](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/User.md)
- [UserAccountGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserAccountGroup.md)

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]

View File

@ -0,0 +1,31 @@
# Coordinates
Geographic coordinates for agent location.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**latitude** | **float** | The latitude of the agent location in decimal degrees | [optional] [readonly]
**longitude** | **float** | The longitude of the agent location in decimal degrees | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
# TODO update the JSON string below
json = "{}"
# create an instance of Coordinates from a JSON string
coordinates_instance = Coordinates.from_json(json)
# print the JSON string representation of the object
print(Coordinates.to_json())
# convert the object into a dict
coordinates_dict = coordinates_instance.to_dict()
# create an instance of Coordinates from a dict
coordinates_from_dict = Coordinates.from_dict(coordinates_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,9 +13,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -28,7 +31,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -5,6 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -17,7 +19,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]

View File

@ -0,0 +1,43 @@
# SimpleTest
Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**interval** | [**TestInterval**](TestInterval.md) | | [optional]
**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional]
**enabled** | **bool** | Test is enabled. | [optional] [default to True]
**created_by** | **str** | User that created the test. | [optional] [readonly]
**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly]
**description** | **str** | A description of the test. | [optional]
**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly]
**modified_by** | **str** | User that modified the test. | [optional] [readonly]
**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly]
**saved_event** | **bool** | Indicates if the test is a saved event. **Note**: **Saved Events** are now called **Private Snapshots** in the user interface. This change does not affect API. | [optional] [readonly]
**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly]
**test_name** | **str** | The name of the test. Test name must be unique. | [optional]
**type** | [**TestType**](TestType.md) | | [optional]
**links** | [**TestLinks**](TestLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
# TODO update the JSON string below
json = "{}"
# create an instance of SimpleTest from a JSON string
simple_test_instance = SimpleTest.from_json(json)
# print the JSON string representation of the object
print(SimpleTest.to_json())
# convert the object into a dict
simple_test_dict = simple_test_instance.to_dict()
# create an instance of SimpleTest from a dict
simple_test_from_dict = SimpleTest.from_dict(simple_test_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,6 +1,6 @@
# EndpointIpVersionTemplate
# TestInterval
IP version the test should use for network tests.
Interval between test runs in seconds.
## Properties

View File

@ -0,0 +1,31 @@
# TestLinks
A list of links that can be accessed to get more information
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_self** | [**TestSelfLink**](TestSelfLink.md) | | [optional]
**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional]
## Example
```python
from thousandeyes_sdk.administrative.models.test_links import TestLinks
# TODO update the JSON string below
json = "{}"
# create an instance of TestLinks from a JSON string
test_links_instance = TestLinks.from_json(json)
# print the JSON string representation of the object
print(TestLinks.to_json())
# convert the object into a dict
test_links_dict = test_links_instance.to_dict()
# create an instance of TestLinks from a dict
test_links_from_dict = TestLinks.from_dict(test_links_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,36 @@
# TestSelfLink
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. |
**templated** | **bool** | Should be true when the link object&#39;s \&quot;href\&quot; property is a URI template. | [optional]
**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional]
**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional]
**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional]
**profile** | **str** | A URI that hints about the profile of the target resource. | [optional]
**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional]
**hreflang** | **str** | Indicates the language of the target resource | [optional]
## Example
```python
from thousandeyes_sdk.administrative.models.test_self_link import TestSelfLink
# TODO update the JSON string below
json = "{}"
# create an instance of TestSelfLink from a JSON string
test_self_link_instance = TestSelfLink.from_json(json)
# print the JSON string representation of the object
print(TestSelfLink.to_json())
# convert the object into a dict
test_self_link_dict = test_self_link_instance.to_dict()
# create an instance of TestSelfLink from a dict
test_self_link_from_dict = TestSelfLink.from_dict(test_self_link_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# TestType
This is a read only value, as test type is implicit in the test creation url.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -34,6 +34,7 @@ from thousandeyes_sdk.administrative.models.audit_user_events import AuditUserEv
from thousandeyes_sdk.administrative.models.base_role import BaseRole
from thousandeyes_sdk.administrative.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.administrative.models.cluster_member import ClusterMember
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
from thousandeyes_sdk.administrative.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.administrative.models.created_user import CreatedUser
from thousandeyes_sdk.administrative.models.enterprise_agent import EnterpriseAgent
@ -57,6 +58,11 @@ from thousandeyes_sdk.administrative.models.role_request_body import RoleRequest
from thousandeyes_sdk.administrative.models.roles import Roles
from thousandeyes_sdk.administrative.models.self_links import SelfLinks
from thousandeyes_sdk.administrative.models.simple_agent import SimpleAgent
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
from thousandeyes_sdk.administrative.models.test_interval import TestInterval
from thousandeyes_sdk.administrative.models.test_links import TestLinks
from thousandeyes_sdk.administrative.models.test_self_link import TestSelfLink
from thousandeyes_sdk.administrative.models.test_type import TestType
from thousandeyes_sdk.administrative.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.administrative.models.user import User
from thousandeyes_sdk.administrative.models.user_account_group import UserAccountGroup

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.administrative.models.audit_user_events import AuditUserEv
from thousandeyes_sdk.administrative.models.base_role import BaseRole
from thousandeyes_sdk.administrative.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.administrative.models.cluster_member import ClusterMember
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
from thousandeyes_sdk.administrative.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.administrative.models.created_user import CreatedUser
from thousandeyes_sdk.administrative.models.enterprise_agent import EnterpriseAgent
@ -48,6 +49,11 @@ from thousandeyes_sdk.administrative.models.role_request_body import RoleRequest
from thousandeyes_sdk.administrative.models.roles import Roles
from thousandeyes_sdk.administrative.models.self_links import SelfLinks
from thousandeyes_sdk.administrative.models.simple_agent import SimpleAgent
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
from thousandeyes_sdk.administrative.models.test_interval import TestInterval
from thousandeyes_sdk.administrative.models.test_links import TestLinks
from thousandeyes_sdk.administrative.models.test_self_link import TestSelfLink
from thousandeyes_sdk.administrative.models.test_type import TestType
from thousandeyes_sdk.administrative.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.administrative.models.user import User
from thousandeyes_sdk.administrative.models.user_account_group import UserAccountGroup

View File

@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.administrative.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
from typing import Optional, Set
from typing_extensions import Self
@ -33,11 +34,12 @@ class AgentResponse(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType"]
model_config = ConfigDict(
populate_by_name=True,
@ -95,6 +97,9 @@ class AgentResponse(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
return _dict
@classmethod
@ -114,6 +119,7 @@ class AgentResponse(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),

View File

@ -0,0 +1,93 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class Coordinates(BaseModel):
"""
Geographic coordinates for agent location.
""" # noqa: E501
latitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The latitude of the agent location in decimal degrees")
longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The longitude of the agent location in decimal degrees")
__properties: ClassVar[List[str]] = ["latitude", "longitude"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Coordinates from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"latitude",
"longitude",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Coordinates from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"latitude": obj.get("latitude"),
"longitude": obj.get("longitude")
})
return _obj

View File

@ -22,10 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.administrative.models.account_group import AccountGroup
from thousandeyes_sdk.administrative.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.administrative.models.cluster_member import ClusterMember
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
from thousandeyes_sdk.administrative.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.administrative.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.administrative.models.error_detail import ErrorDetail
from thousandeyes_sdk.administrative.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
from typing import Optional, Set
from typing_extensions import Self
@ -41,9 +43,12 @@ class EnterpriseAgent(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -56,8 +61,8 @@ class EnterpriseAgent(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping"]
model_config = ConfigDict(
populate_by_name=True,
@ -105,6 +110,7 @@ class EnterpriseAgent(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
@ -115,13 +121,14 @@ class EnterpriseAgent(BaseModel):
"country_id",
"prefix",
"verify_ssl_certificates",
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
])
_dict = self.model_dump(
@ -129,6 +136,16 @@ class EnterpriseAgent(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -150,13 +167,13 @@ class EnterpriseAgent(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
_dict['interfaceIpMapping'] = _items
return _dict
@classmethod
@ -177,9 +194,12 @@ class EnterpriseAgent(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -192,7 +212,7 @@ class EnterpriseAgent(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
})
return _obj

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.administrative.models.enterprise_agent_ipv6_policy import
from thousandeyes_sdk.administrative.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.administrative.models.error_detail import ErrorDetail
from thousandeyes_sdk.administrative.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
from typing import Optional, Set
from typing_extensions import Self
@ -32,6 +33,8 @@ class EnterpriseAgentData(BaseModel):
"""
EnterpriseAgentData
""" # noqa: E501
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -44,8 +47,8 @@ class EnterpriseAgentData(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
__properties: ClassVar[List[str]] = ["testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping"]
model_config = ConfigDict(
populate_by_name=True,
@ -85,15 +88,17 @@ class EnterpriseAgentData(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
])
_dict = self.model_dump(
@ -101,6 +106,13 @@ class EnterpriseAgentData(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -122,13 +134,13 @@ class EnterpriseAgentData(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
_dict['interfaceIpMapping'] = _items
return _dict
@classmethod
@ -141,6 +153,8 @@ class EnterpriseAgentData(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -153,7 +167,7 @@ class EnterpriseAgentData(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
})
return _obj

View File

@ -18,6 +18,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.administrative.models.coordinates import Coordinates
from typing import Optional, Set
from typing_extensions import Self
@ -32,10 +33,11 @@ class SimpleAgent(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates"]
model_config = ConfigDict(
populate_by_name=True,
@ -93,6 +95,9 @@ class SimpleAgent(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
return _dict
@classmethod
@ -112,6 +117,7 @@ class SimpleAgent(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates")

View File

@ -0,0 +1,147 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.administrative.models.test_interval import TestInterval
from thousandeyes_sdk.administrative.models.test_links import TestLinks
from thousandeyes_sdk.administrative.models.test_type import TestType
from typing import Optional, Set
from typing_extensions import Self
class SimpleTest(BaseModel):
"""
Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`.
""" # noqa: E501
interval: Optional[TestInterval] = None
alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled")
enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.")
created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event. **Note**: **Saved Events** are now called **Private Snapshots** in the user interface. This change does not affect API. ", alias="savedEvent")
test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId")
test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
type: Optional[TestType] = None
links: Optional[TestLinks] = Field(default=None, alias="_links")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SimpleTest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* Fields in `self.additional_properties` are added to the output dict.
"""
excluded_fields: Set[str] = set([
"created_by",
"created_date",
"live_share",
"modified_by",
"modified_date",
"saved_event",
"test_id",
"additional_properties",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
# puts key-value pairs in additional_properties in the top level
if self.additional_properties is not None:
for _key, _value in self.additional_properties.items():
_dict[_key] = _value
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SimpleTest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"interval": obj.get("interval"),
"alertsEnabled": obj.get("alertsEnabled"),
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
"createdBy": obj.get("createdBy"),
"createdDate": obj.get("createdDate"),
"description": obj.get("description"),
"liveShare": obj.get("liveShare"),
"modifiedBy": obj.get("modifiedBy"),
"modifiedDate": obj.get("modifiedDate"),
"savedEvent": obj.get("savedEvent"),
"testId": obj.get("testId"),
"testName": obj.get("testName"),
"type": obj.get("type"),
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
if _key not in cls.__properties:
_obj.additional_properties[_key] = obj.get(_key)
return _obj

View File

@ -0,0 +1,46 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class TestInterval(int, Enum):
"""
Interval between test runs in seconds.
"""
"""
allowed enum values
"""
NUMBER_60 = 60
NUMBER_120 = 120
NUMBER_300 = 300
NUMBER_600 = 600
NUMBER_900 = 900
NUMBER_1800 = 1800
NUMBER_3600 = 3600
NUMBER_11184809 = 11184809
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of TestInterval from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,101 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.administrative.models.link import Link
from thousandeyes_sdk.administrative.models.test_self_link import TestSelfLink
from typing import Optional, Set
from typing_extensions import Self
class TestLinks(BaseModel):
"""
A list of links that can be accessed to get more information
""" # noqa: E501
var_self: Optional[TestSelfLink] = Field(default=None, alias="self")
test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults")
__properties: ClassVar[List[str]] = ["self", "testResults"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of TestLinks from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of var_self
if self.var_self:
_dict['self'] = self.var_self.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in test_results (list)
_items = []
if self.test_results:
for _item in self.test_results:
if _item:
_items.append(_item.to_dict())
_dict['testResults'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of TestLinks from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"self": TestSelfLink.from_dict(obj["self"]) if obj.get("self") is not None else None,
"testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None
})
return _obj

View File

@ -0,0 +1,101 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class TestSelfLink(BaseModel):
"""
TestSelfLink
""" # noqa: E501
href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].")
templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.")
type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.")
deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.")
name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.")
profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.")
title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier")
hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource")
__properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of TestSelfLink from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of TestSelfLink from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"href": obj.get("href"),
"templated": obj.get("templated"),
"type": obj.get("type"),
"deprecation": obj.get("deprecation"),
"name": obj.get("name"),
"profile": obj.get("profile"),
"title": obj.get("title"),
"hreflang": obj.get("hreflang")
})
return _obj

View File

@ -0,0 +1,52 @@
# coding: utf-8
"""
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class TestType(str, Enum):
"""
This is a read only value, as test type is implicit in the test creation url.
"""
"""
allowed enum values
"""
API = 'api'
AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent'
AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server'
BGP = 'bgp'
HTTP_MINUS_SERVER = 'http-server'
PAGE_MINUS_LOAD = 'page-load'
WEB_MINUS_TRANSACTIONS = 'web-transactions'
FTP_MINUS_SERVER = 'ftp-server'
DNS_MINUS_TRACE = 'dns-trace'
DNS_MINUS_SERVER = 'dns-server'
DNSSEC = 'dnssec'
SIP_MINUS_SERVER = 'sip-server'
VOICE = 'voice'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of TestType from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -165,16 +165,24 @@ class TestAccountGroupsApi(unittest.TestCase):
"dateRegistered" : "2022-07-17T22:00:54Z"
} ],
"agents" : [ {
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"ipv6Policy" : "force-ipv4",
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"hostname" : "thousandeyes.com",
"keepBrowserCache" : true,
"agentState" : "online",
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"testIds" : [ 281474976710706 ],
"clusterMembers" : [ {
"lastSeen" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
@ -210,19 +218,79 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
} ],
"hostname" : "thousandeyes.com",
"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" : 60,
"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" : 60,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"lastSeen" : "2022-07-17T22:00:54Z",
"createdDate" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"keepBrowserCache" : true,
"interfaceIpMappings" : [ {
"interfaceIpMapping" : [ {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
}, {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
} ],
"agentState" : "online",
"targetForTests" : "1.1.1.1",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -242,16 +310,24 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
}, {
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"ipv6Policy" : "force-ipv4",
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"hostname" : "thousandeyes.com",
"keepBrowserCache" : true,
"agentState" : "online",
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"testIds" : [ 281474976710706 ],
"clusterMembers" : [ {
"lastSeen" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
@ -287,19 +363,79 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
} ],
"hostname" : "thousandeyes.com",
"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" : 60,
"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" : 60,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"lastSeen" : "2022-07-17T22:00:54Z",
"createdDate" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"keepBrowserCache" : true,
"interfaceIpMappings" : [ {
"interfaceIpMapping" : [ {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
}, {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
} ],
"agentState" : "online",
"targetForTests" : "1.1.1.1",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -432,16 +568,24 @@ class TestAccountGroupsApi(unittest.TestCase):
"dateRegistered" : "2022-07-17T22:00:54Z"
} ],
"agents" : [ {
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"ipv6Policy" : "force-ipv4",
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"hostname" : "thousandeyes.com",
"keepBrowserCache" : true,
"agentState" : "online",
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"testIds" : [ 281474976710706 ],
"clusterMembers" : [ {
"lastSeen" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
@ -477,19 +621,79 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
} ],
"hostname" : "thousandeyes.com",
"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" : 60,
"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" : 60,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"lastSeen" : "2022-07-17T22:00:54Z",
"createdDate" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"keepBrowserCache" : true,
"interfaceIpMappings" : [ {
"interfaceIpMapping" : [ {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
}, {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
} ],
"agentState" : "online",
"targetForTests" : "1.1.1.1",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -509,16 +713,24 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
}, {
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"agentId" : "281474976710706",
"agentType" : "enterprise-cluster",
"ipv6Policy" : "force-ipv4",
"prefix" : "99.128.0.0/11",
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"countryId" : "US",
"enabled" : true,
"network" : "AT&T Services, Inc. (AS 7018)",
"hostname" : "thousandeyes.com",
"keepBrowserCache" : true,
"agentState" : "online",
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"utilization" : 25,
"testIds" : [ 281474976710706 ],
"clusterMembers" : [ {
"lastSeen" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
@ -554,19 +766,79 @@ class TestAccountGroupsApi(unittest.TestCase):
"description" : "Agent Version 0.1.1 (latest: 1.0.0)"
} ]
} ],
"hostname" : "thousandeyes.com",
"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" : 60,
"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" : 60,
"modifiedBy" : "user@user.com",
"testId" : "281474976710706",
"alertsEnabled" : true,
"testName" : "ThousandEyes Test"
} ],
"lastSeen" : "2022-07-17T22:00:54Z",
"createdDate" : "2022-07-17T22:00:54Z",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"keepBrowserCache" : true,
"interfaceIpMappings" : [ {
"interfaceIpMapping" : [ {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
}, {
"ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ],
"interfaceName" : "wlp4s0"
} ],
"agentState" : "online",
"targetForTests" : "1.1.1.1",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",

View File

@ -16,6 +16,7 @@ docs/AgentProxiesApi.md
docs/AgentProxy.md
docs/AgentRequest.md
docs/AgentResponse.md
docs/AgentTestsAssignRequest.md
docs/AlertEmail.md
docs/AlertIntegrationBase.md
docs/AlertIntegrationType.md
@ -26,6 +27,7 @@ docs/CloudEnterpriseAgent.md
docs/CloudEnterpriseAgentType.md
docs/CloudEnterpriseAgents.md
docs/ClusterMember.md
docs/Coordinates.md
docs/EnterpriseAgent.md
docs/EnterpriseAgentClusterApi.md
docs/EnterpriseAgentClusterDetail.md
@ -53,6 +55,7 @@ docs/TestInterval.md
docs/TestLinks.md
docs/TestSelfLink.md
docs/TestType.md
docs/TestsAssignmentOnAgentsApi.md
docs/UnauthorizedError.md
docs/ValidationError.md
docs/ValidationErrorItem.md
@ -64,6 +67,7 @@ src/thousandeyes_sdk/agents/api/agent_proxies_api.py
src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py
src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py
src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py
src/thousandeyes_sdk/agents/api/tests_assignment_on_agents_api.py
src/thousandeyes_sdk/agents/models/__init__.py
src/thousandeyes_sdk/agents/models/account_group.py
src/thousandeyes_sdk/agents/models/agent_base.py
@ -79,6 +83,7 @@ src/thousandeyes_sdk/agents/models/agent_proxies.py
src/thousandeyes_sdk/agents/models/agent_proxy.py
src/thousandeyes_sdk/agents/models/agent_request.py
src/thousandeyes_sdk/agents/models/agent_response.py
src/thousandeyes_sdk/agents/models/agent_tests_assign_request.py
src/thousandeyes_sdk/agents/models/alert_email.py
src/thousandeyes_sdk/agents/models/alert_integration_base.py
src/thousandeyes_sdk/agents/models/alert_integration_type.py
@ -87,6 +92,7 @@ src/thousandeyes_sdk/agents/models/cloud_enterprise_agent.py
src/thousandeyes_sdk/agents/models/cloud_enterprise_agent_type.py
src/thousandeyes_sdk/agents/models/cloud_enterprise_agents.py
src/thousandeyes_sdk/agents/models/cluster_member.py
src/thousandeyes_sdk/agents/models/coordinates.py
src/thousandeyes_sdk/agents/models/enterprise_agent.py
src/thousandeyes_sdk/agents/models/enterprise_agent_cluster_detail.py
src/thousandeyes_sdk/agents/models/enterprise_agent_data.py
@ -122,4 +128,5 @@ test/test_agent_proxies_api.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_tests_assignment_on_agents_api.py
test/test_utils.py

View File

@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -105,6 +105,9 @@ Class | Method | HTTP request | Description
*CloudAndEnterpriseAgentsApi* | [**update_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /agents/{agentId} | Update Enterprise Agent
*EnterpriseAgentClusterApi* | [**assign_agent_to_cluster**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster
*EnterpriseAgentClusterApi* | [**unassign_agent_from_cluster**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster
*TestsAssignmentOnAgentsApi* | [**assign_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/TestsAssignmentOnAgentsApi.md#assign_tests) | **POST** /agents/{agentId}/tests/assign | Assign tests to an agent
*TestsAssignmentOnAgentsApi* | [**overwrite_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/TestsAssignmentOnAgentsApi.md#overwrite_tests) | **POST** /agents/{agentId}/tests/override | Overwrite tests assigned to an agent
*TestsAssignmentOnAgentsApi* | [**unassign_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/TestsAssignmentOnAgentsApi.md#unassign_tests) | **POST** /agents/{agentId}/tests/unassign | Unassign tests from an agent
## Documentation For Models
@ -123,6 +126,7 @@ Class | Method | HTTP request | Description
- [AgentProxy](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AgentProxy.md)
- [AgentRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AgentRequest.md)
- [AgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AgentResponse.md)
- [AgentTestsAssignRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AgentTestsAssignRequest.md)
- [AlertEmail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AlertEmail.md)
- [AlertIntegrationBase](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AlertIntegrationBase.md)
- [AlertIntegrationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/AlertIntegrationType.md)
@ -131,6 +135,7 @@ Class | Method | HTTP request | Description
- [CloudEnterpriseAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/CloudEnterpriseAgentType.md)
- [CloudEnterpriseAgents](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/CloudEnterpriseAgents.md)
- [ClusterMember](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/ClusterMember.md)
- [Coordinates](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/Coordinates.md)
- [EnterpriseAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/EnterpriseAgent.md)
- [EnterpriseAgentClusterDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterDetail.md)
- [EnterpriseAgentData](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/EnterpriseAgentData.md)

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
@ -19,6 +20,7 @@ Name | Type | Description | Notes
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels. See &#x60;/labels&#x60; for more information. | [optional] [readonly]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -31,7 +33,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
## Example

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]

View File

@ -0,0 +1,29 @@
# AgentTestsAssignRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**test_ids** | **List[str]** | List of test IDs to assign. You can retrieve available &#x60;testIds&#x60; using the &#x60;/agents&#x60; endpoint with the &#x60;expand&#x3D;testIds&#x60; query parameter. | [optional]
## Example
```python
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
# TODO update the JSON string below
json = "{}"
# create an instance of AgentTestsAssignRequest from a JSON string
agent_tests_assign_request_instance = AgentTestsAssignRequest.from_json(json)
# print the JSON string representation of the object
print(AgentTestsAssignRequest.to_json())
# convert the object into a dict
agent_tests_assign_request_dict = agent_tests_assign_request_instance.to_dict()
# create an instance of AgentTestsAssignRequest from a dict
agent_tests_assign_request_from_dict = AgentTestsAssignRequest.from_dict(agent_tests_assign_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]

View File

@ -185,7 +185,7 @@ 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_agents**
> CloudEnterpriseAgents get_agents(aid=aid, expand=expand, agent_types=agent_types)
> CloudEnterpriseAgents get_agents(aid=aid, expand=expand, agent_types=agent_types, labels=labels)
List Cloud and Enterprise Agents
@ -226,10 +226,11 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
aid = '1234' # str | 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. (optional)
expand = [thousandeyes_sdk.agents.AgentListExpand()] # List[AgentListExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional)
agent_types = [thousandeyes_sdk.agents.CloudEnterpriseAgentType()] # List[CloudEnterpriseAgentType] | Specifies the type of agent to request. (optional)
labels = ['[\"myCustomLabeledAgent\"]'] # List[str] | Specifies the labels of the agents to request. (optional)
try:
# List Cloud and Enterprise Agents
api_response = api_instance.get_agents(aid=aid, expand=expand, agent_types=agent_types)
api_response = api_instance.get_agents(aid=aid, expand=expand, agent_types=agent_types, labels=labels)
print("The response of CloudAndEnterpriseAgentsApi->get_agents:\n")
pprint(api_response)
except Exception as e:
@ -246,6 +247,7 @@ Name | Type | Description | Notes
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; 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. | [optional]
**expand** | [**List[AgentListExpand]**](AgentListExpand.md)| Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the &#x60;clusterMembers&#x60; sub-resource, pass the &#x60;?expand&#x3D;cluster-member&#x60; query. | [optional]
**agent_types** | [**List[CloudEnterpriseAgentType]**](CloudEnterpriseAgentType.md)| Specifies the type of agent to request. | [optional]
**labels** | [**List[str]**](str.md)| Specifies the labels of the agents to request. | [optional]
### Return type

View File

@ -13,9 +13,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -28,7 +31,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -0,0 +1,31 @@
# Coordinates
Geographic coordinates for agent location.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**latitude** | **float** | The latitude of the agent location in decimal degrees | [optional] [readonly]
**longitude** | **float** | The longitude of the agent location in decimal degrees | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.agents.models.coordinates import Coordinates
# TODO update the JSON string below
json = "{}"
# create an instance of Coordinates from a JSON string
coordinates_instance = Coordinates.from_json(json)
# print the JSON string representation of the object
print(Coordinates.to_json())
# convert the object into a dict
coordinates_dict = coordinates_instance.to_dict()
# create an instance of Coordinates from a dict
coordinates_from_dict = Coordinates.from_dict(coordinates_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,9 +13,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -28,7 +31,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -13,7 +13,7 @@ Method | HTTP request | Description
Add member to Enterprise Agent cluster
Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This operation requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
Assigns agents to an Enterprise Agent cluster. If the agent specified by `agentId` in the URL path is not already part of a cluster, this operation creates a new cluster with that agent as the base member. This operation requires the `Edit agents in account group` permission. A JSON request body is required for this operation, even when creating a cluster with a single agent. To create a cluster from a single standalone agent, pass an empty `agents` array in the request body: ``` { \"agents\": [] } ``` If no body is provided, the server returns a 400 Bad Request error. The response is a single Enterprise Agent Cluster. The assigned agents become cluster members and can be returned using the `?expand=cluster-member` parameter. Upon successful cluster creation, the response includes: * Information about the new or updated cluster. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is specified in the request URL. **Example: Creating a cluster from a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` **Example: Adding multiple agents to a cluster** When adding multiple agents, the `{agentId}` specified in the URL path must not be included in the `agents` array. Only include additional agent IDs in the array. ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
### Example

View File

@ -12,9 +12,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -27,8 +30,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels. See &#x60;/labels&#x60; for more information. | [optional] [readonly]
**agent_type** | **str** | Enterprise Cluster agent type. |

View File

@ -5,6 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -17,7 +19,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -12,9 +12,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -27,8 +30,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels. See &#x60;/labels&#x60; for more information. | [optional] [readonly]
**agent_type** | **str** | Enterprise agent type. |

View File

@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels. See &#x60;/labels&#x60; for more information. | [optional] [readonly]

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]

View File

@ -12,9 +12,12 @@ Name | Type | Description | Notes
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**test_ids** | **List[int]** | List of test IDs assigned to the agent. | [optional] [readonly]
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See &#x60;/tests&#x60; for more information. | [optional]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
@ -27,7 +30,7 @@ Name | Type | Description | Notes
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
**interface_ip_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example

View File

@ -0,0 +1,284 @@
# thousandeyes_sdk.agents.TestsAssignmentOnAgentsApi
All URIs are relative to *https://api.thousandeyes.com/v7*
Method | HTTP request | Description
------------- | ------------- | -------------
[**assign_tests**](TestsAssignmentOnAgentsApi.md#assign_tests) | **POST** /agents/{agentId}/tests/assign | Assign tests to an agent
[**overwrite_tests**](TestsAssignmentOnAgentsApi.md#overwrite_tests) | **POST** /agents/{agentId}/tests/override | Overwrite tests assigned to an agent
[**unassign_tests**](TestsAssignmentOnAgentsApi.md#unassign_tests) | **POST** /agents/{agentId}/tests/unassign | Unassign tests from an agent
# **assign_tests**
> AgentDetails assign_tests(agent_id, agent_tests_assign_request, aid=aid)
Assign tests to an agent
Assign tests to a specific Agent. Existing assigned tests are not removed. **Important notes:** * The operation fails if the specified agent does not exist. * If any provided test ID is invalid, the entire operation is canceled. * Already assigned tests are ignored; other valid tests will be assigned. * This operation does not overwrite existing assignments.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.agents
from thousandeyes_sdk.agents.models.agent_details import AgentDetails
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
from thousandeyes_sdk.agents.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com/v7"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.agents.TestsAssignmentOnAgentsApi(api_client)
agent_id = '281474976710706' # str | Unique ID for the Enterprise Agent cluster to add new agents to.
agent_tests_assign_request = thousandeyes_sdk.agents.AgentTestsAssignRequest() # AgentTestsAssignRequest |
aid = '1234' # str | 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. (optional)
try:
# Assign tests to an agent
api_response = api_instance.assign_tests(agent_id, agent_tests_assign_request, aid=aid)
print("The response of TestsAssignmentOnAgentsApi->assign_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestsAssignmentOnAgentsApi->assign_tests: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**agent_id** | **str**| Unique ID for the Enterprise Agent cluster to add new agents to. |
**agent_tests_assign_request** | [**AgentTestsAssignRequest**](AgentTestsAssignRequest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; 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. | [optional]
### Return type
[**AgentDetails**](AgentDetails.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[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)
# **overwrite_tests**
> AgentDetails overwrite_tests(agent_id, agent_tests_assign_request, aid=aid)
Overwrite tests assigned to an agent
Replaces all tests assigned to a specific agent with the new set of test IDs provided. **Important notes:** * The operation fails if the specified agent does not exist. * If any test ID is invalid, the operation is canceled and no changes are made. * Already assigned tests that are also in the request are ignored. * Previously assigned tests not included in the request will be removed.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.agents
from thousandeyes_sdk.agents.models.agent_details import AgentDetails
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
from thousandeyes_sdk.agents.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com/v7"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.agents.TestsAssignmentOnAgentsApi(api_client)
agent_id = '281474976710706' # str | Unique ID for the Enterprise Agent cluster to add new agents to.
agent_tests_assign_request = thousandeyes_sdk.agents.AgentTestsAssignRequest() # AgentTestsAssignRequest |
aid = '1234' # str | 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. (optional)
try:
# Overwrite tests assigned to an agent
api_response = api_instance.overwrite_tests(agent_id, agent_tests_assign_request, aid=aid)
print("The response of TestsAssignmentOnAgentsApi->overwrite_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestsAssignmentOnAgentsApi->overwrite_tests: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**agent_id** | **str**| Unique ID for the Enterprise Agent cluster to add new agents to. |
**agent_tests_assign_request** | [**AgentTestsAssignRequest**](AgentTestsAssignRequest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; 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. | [optional]
### Return type
[**AgentDetails**](AgentDetails.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[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_tests**
> AgentDetails unassign_tests(agent_id, agent_tests_assign_request, aid=aid)
Unassign tests from an agent
Unassigns the specified tests from a specific agent. **Important notes:** * The operation fails if the specified agent does not exist. * If any test ID is invalid, the operation is canceled and no changes are made.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.agents
from thousandeyes_sdk.agents.models.agent_details import AgentDetails
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
from thousandeyes_sdk.agents.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com/v7"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.agents.TestsAssignmentOnAgentsApi(api_client)
agent_id = '281474976710706' # str | Unique ID for the Enterprise Agent cluster to add new agents to.
agent_tests_assign_request = thousandeyes_sdk.agents.AgentTestsAssignRequest() # AgentTestsAssignRequest |
aid = '1234' # str | 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. (optional)
try:
# Unassign tests from an agent
api_response = api_instance.unassign_tests(agent_id, agent_tests_assign_request, aid=aid)
print("The response of TestsAssignmentOnAgentsApi->unassign_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TestsAssignmentOnAgentsApi->unassign_tests: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**agent_id** | **str**| Unique ID for the Enterprise Agent cluster to add new agents to. |
**agent_tests_assign_request** | [**AgentTestsAssignRequest**](AgentTestsAssignRequest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; 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. | [optional]
### Return type
[**AgentDetails**](AgentDetails.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[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)

View File

@ -18,6 +18,7 @@ from thousandeyes_sdk.agents.api.agent_proxies_api import AgentProxiesApi
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
from thousandeyes_sdk.agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi
from thousandeyes_sdk.agents.api.tests_assignment_on_agents_api import TestsAssignmentOnAgentsApi
# import models into sdk package
@ -35,6 +36,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies
from thousandeyes_sdk.agents.models.agent_proxy import AgentProxy
from thousandeyes_sdk.agents.models.agent_request import AgentRequest
from thousandeyes_sdk.agents.models.agent_response import AgentResponse
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
from thousandeyes_sdk.agents.models.alert_email import AlertEmail
from thousandeyes_sdk.agents.models.alert_integration_base import AlertIntegrationBase
from thousandeyes_sdk.agents.models.alert_integration_type import AlertIntegrationType
@ -43,6 +45,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agent import CloudEnterpris
from thousandeyes_sdk.agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpriseAgents
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent import EnterpriseAgent
from thousandeyes_sdk.agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail
from thousandeyes_sdk.agents.models.enterprise_agent_data import EnterpriseAgentData

View File

@ -5,4 +5,5 @@ from thousandeyes_sdk.agents.api.agent_proxies_api import AgentProxiesApi
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
from thousandeyes_sdk.agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi
from thousandeyes_sdk.agents.api.tests_assignment_on_agents_api import TestsAssignmentOnAgentsApi

View File

@ -664,6 +664,7 @@ class CloudAndEnterpriseAgentsApi:
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,
expand: Annotated[Optional[List[AgentListExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None,
agent_types: Annotated[Optional[List[CloudEnterpriseAgentType]], Field(description="Specifies the type of agent to request.")] = None,
labels: Annotated[Optional[List[StrictStr]], Field(description="Specifies the labels of the agents to request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -687,6 +688,8 @@ class CloudAndEnterpriseAgentsApi:
:type expand: List[AgentListExpand]
:param agent_types: Specifies the type of agent to request.
:type agent_types: List[CloudEnterpriseAgentType]
:param labels: Specifies the labels of the agents to request.
:type labels: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -713,6 +716,7 @@ class CloudAndEnterpriseAgentsApi:
aid=aid,
expand=expand,
agent_types=agent_types,
labels=labels,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -746,6 +750,7 @@ class CloudAndEnterpriseAgentsApi:
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,
expand: Annotated[Optional[List[AgentListExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None,
agent_types: Annotated[Optional[List[CloudEnterpriseAgentType]], Field(description="Specifies the type of agent to request.")] = None,
labels: Annotated[Optional[List[StrictStr]], Field(description="Specifies the labels of the agents to request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -769,6 +774,8 @@ class CloudAndEnterpriseAgentsApi:
:type expand: List[AgentListExpand]
:param agent_types: Specifies the type of agent to request.
:type agent_types: List[CloudEnterpriseAgentType]
:param labels: Specifies the labels of the agents to request.
:type labels: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -795,6 +802,7 @@ class CloudAndEnterpriseAgentsApi:
aid=aid,
expand=expand,
agent_types=agent_types,
labels=labels,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -828,6 +836,7 @@ class CloudAndEnterpriseAgentsApi:
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,
expand: Annotated[Optional[List[AgentListExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None,
agent_types: Annotated[Optional[List[CloudEnterpriseAgentType]], Field(description="Specifies the type of agent to request.")] = None,
labels: Annotated[Optional[List[StrictStr]], Field(description="Specifies the labels of the agents to request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -851,6 +860,8 @@ class CloudAndEnterpriseAgentsApi:
:type expand: List[AgentListExpand]
:param agent_types: Specifies the type of agent to request.
:type agent_types: List[CloudEnterpriseAgentType]
:param labels: Specifies the labels of the agents to request.
:type labels: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -877,6 +888,7 @@ class CloudAndEnterpriseAgentsApi:
aid=aid,
expand=expand,
agent_types=agent_types,
labels=labels,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -904,6 +916,7 @@ class CloudAndEnterpriseAgentsApi:
aid,
expand,
agent_types,
labels,
_request_auth,
_content_type,
_headers,
@ -915,6 +928,7 @@ class CloudAndEnterpriseAgentsApi:
_collection_formats: Dict[str, str] = {
'expand': 'csv',
'agentTypes': 'csv',
'labels': 'csv',
}
_path_params: Dict[str, str] = {}
@ -938,6 +952,10 @@ class CloudAndEnterpriseAgentsApi:
_query_params.append(('agentTypes', agent_types))
if labels is not None:
_query_params.append(('labels', labels))
# process the header parameters
# process the form parameters
# process the body parameter

View File

@ -68,7 +68,7 @@ class EnterpriseAgentClusterApi:
) -> AgentDetails:
"""Add member to Enterprise Agent cluster
Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This operation requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
Assigns agents to an Enterprise Agent cluster. If the agent specified by `agentId` in the URL path is not already part of a cluster, this operation creates a new cluster with that agent as the base member. This operation requires the `Edit agents in account group` permission. A JSON request body is required for this operation, even when creating a cluster with a single agent. To create a cluster from a single standalone agent, pass an empty `agents` array in the request body: ``` { \"agents\": [] } ``` If no body is provided, the server returns a 400 Bad Request error. The response is a single Enterprise Agent Cluster. The assigned agents become cluster members and can be returned using the `?expand=cluster-member` parameter. Upon successful cluster creation, the response includes: * Information about the new or updated cluster. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is specified in the request URL. **Example: Creating a cluster from a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` **Example: Adding multiple agents to a cluster** When adding multiple agents, the `{agentId}` specified in the URL path must not be included in the `agents` array. Only include additional agent IDs in the array. ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
:param agent_id: Unique ID for the Enterprise Agent cluster to add new agents to. (required)
:type agent_id: str
@ -155,7 +155,7 @@ class EnterpriseAgentClusterApi:
) -> ApiResponse[AgentDetails]:
"""Add member to Enterprise Agent cluster
Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This operation requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
Assigns agents to an Enterprise Agent cluster. If the agent specified by `agentId` in the URL path is not already part of a cluster, this operation creates a new cluster with that agent as the base member. This operation requires the `Edit agents in account group` permission. A JSON request body is required for this operation, even when creating a cluster with a single agent. To create a cluster from a single standalone agent, pass an empty `agents` array in the request body: ``` { \"agents\": [] } ``` If no body is provided, the server returns a 400 Bad Request error. The response is a single Enterprise Agent Cluster. The assigned agents become cluster members and can be returned using the `?expand=cluster-member` parameter. Upon successful cluster creation, the response includes: * Information about the new or updated cluster. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is specified in the request URL. **Example: Creating a cluster from a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` **Example: Adding multiple agents to a cluster** When adding multiple agents, the `{agentId}` specified in the URL path must not be included in the `agents` array. Only include additional agent IDs in the array. ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
:param agent_id: Unique ID for the Enterprise Agent cluster to add new agents to. (required)
:type agent_id: str
@ -242,7 +242,7 @@ class EnterpriseAgentClusterApi:
) -> RESTResponseType:
"""Add member to Enterprise Agent cluster
Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This operation requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
Assigns agents to an Enterprise Agent cluster. If the agent specified by `agentId` in the URL path is not already part of a cluster, this operation creates a new cluster with that agent as the base member. This operation requires the `Edit agents in account group` permission. A JSON request body is required for this operation, even when creating a cluster with a single agent. To create a cluster from a single standalone agent, pass an empty `agents` array in the request body: ``` { \"agents\": [] } ``` If no body is provided, the server returns a 400 Bad Request error. The response is a single Enterprise Agent Cluster. The assigned agents become cluster members and can be returned using the `?expand=cluster-member` parameter. Upon successful cluster creation, the response includes: * Information about the new or updated cluster. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is specified in the request URL. **Example: Creating a cluster from a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` **Example: Adding multiple agents to a cluster** When adding multiple agents, the `{agentId}` specified in the URL path must not be included in the `agents` array. Only include additional agent IDs in the array. ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ````
:param agent_id: Unique ID for the Enterprise Agent cluster to add new agents to. (required)
:type agent_id: str

View File

@ -27,6 +27,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies
from thousandeyes_sdk.agents.models.agent_proxy import AgentProxy
from thousandeyes_sdk.agents.models.agent_request import AgentRequest
from thousandeyes_sdk.agents.models.agent_response import AgentResponse
from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTestsAssignRequest
from thousandeyes_sdk.agents.models.alert_email import AlertEmail
from thousandeyes_sdk.agents.models.alert_integration_base import AlertIntegrationBase
from thousandeyes_sdk.agents.models.alert_integration_type import AlertIntegrationType
@ -35,6 +36,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agent import CloudEnterpris
from thousandeyes_sdk.agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpriseAgents
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent import EnterpriseAgent
from thousandeyes_sdk.agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail
from thousandeyes_sdk.agents.models.enterprise_agent_data import EnterpriseAgentData

View File

@ -27,6 +27,7 @@ class AgentDetailsExpand(str, Enum):
"""
CLUSTER_MINUS_MEMBER = 'cluster-member'
TEST = 'test'
TEST_MINUS_IDS = 'test-ids'
NOTIFICATION_MINUS_RULE = 'notification-rule'
UNKNOWN = 'unknown'

View File

@ -26,6 +26,8 @@ class AgentListExpand(str, Enum):
allowed enum values
"""
CLUSTER_MINUS_MEMBER = 'cluster-member'
TEST = 'test'
TEST_MINUS_IDS = 'test-ids'
UNKNOWN = 'unknown'
@classmethod

View File

@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from typing import Optional, Set
from typing_extensions import Self
@ -33,11 +34,12 @@ class AgentResponse(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType"]
model_config = ConfigDict(
populate_by_name=True,
@ -95,6 +97,9 @@ class AgentResponse(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
return _dict
@classmethod
@ -114,6 +119,7 @@ class AgentResponse(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),

View File

@ -0,0 +1,87 @@
# coding: utf-8
"""
Agents API
## Overview Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
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
class AgentTestsAssignRequest(BaseModel):
"""
AgentTestsAssignRequest
""" # noqa: E501
test_ids: Optional[List[StrictStr]] = Field(default=None, description="List of test IDs to assign. You can retrieve available `testIds` using the `/agents` endpoint with the `expand=testIds` query parameter. ", alias="testIds")
__properties: ClassVar[List[str]] = ["testIds"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AgentTestsAssignRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AgentTestsAssignRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"testIds": obj.get("testIds")
})
return _obj

View File

@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from thousandeyes_sdk.agents.models.agent_label import AgentLabel
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.self_links import SelfLinks
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
from typing import Optional, Set
@ -36,6 +37,7 @@ class CloudAgentDetail(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
@ -43,7 +45,7 @@ class CloudAgentDetail(BaseModel):
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
labels: Optional[List[AgentLabel]] = Field(default=None, description="List of labels - see `/labels` for more information.")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType", "tests", "labels", "_links"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType", "tests", "labels", "_links"]
@field_validator('agent_type')
def agent_type_validate_regular_expression(cls, value):
@ -110,6 +112,9 @@ class CloudAgentDetail(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
@ -146,6 +151,7 @@ class CloudAgentDetail(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),

View File

@ -0,0 +1,93 @@
# coding: utf-8
"""
Agents API
## Overview Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class Coordinates(BaseModel):
"""
Geographic coordinates for agent location.
""" # noqa: E501
latitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The latitude of the agent location in decimal degrees")
longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The longitude of the agent location in decimal degrees")
__properties: ClassVar[List[str]] = ["latitude", "longitude"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Coordinates from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"latitude",
"longitude",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Coordinates from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"latitude": obj.get("latitude"),
"longitude": obj.get("longitude")
})
return _obj

View File

@ -22,10 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.agents.models.account_group import AccountGroup
from thousandeyes_sdk.agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.agents.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
from typing import Optional, Set
from typing_extensions import Self
@ -41,9 +43,12 @@ class EnterpriseAgent(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -56,8 +61,8 @@ class EnterpriseAgent(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping"]
model_config = ConfigDict(
populate_by_name=True,
@ -105,6 +110,7 @@ class EnterpriseAgent(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
@ -115,13 +121,14 @@ class EnterpriseAgent(BaseModel):
"country_id",
"prefix",
"verify_ssl_certificates",
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
])
_dict = self.model_dump(
@ -129,6 +136,16 @@ class EnterpriseAgent(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -150,13 +167,13 @@ class EnterpriseAgent(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
_dict['interfaceIpMapping'] = _items
return _dict
@classmethod
@ -177,9 +194,12 @@ class EnterpriseAgent(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -192,7 +212,7 @@ class EnterpriseAgent(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
})
return _obj

View File

@ -23,6 +23,7 @@ from typing_extensions import Annotated
from thousandeyes_sdk.agents.models.account_group import AccountGroup
from thousandeyes_sdk.agents.models.agent_label import AgentLabel
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.agents.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
@ -44,9 +45,12 @@ class EnterpriseAgentClusterDetail(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -59,13 +63,12 @@ class EnterpriseAgentClusterDetail(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules")
labels: Optional[List[AgentLabel]] = Field(default=None, description="List of labels. See `/labels` for more information.")
agent_type: Annotated[str, Field(strict=True)] = Field(description="Enterprise Cluster agent type.", alias="agentType")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "agentType", "_links"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "agentType", "_links"]
@field_validator('agent_type')
def agent_type_validate_regular_expression(cls, value):
@ -121,6 +124,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
@ -131,13 +135,14 @@ class EnterpriseAgentClusterDetail(BaseModel):
"country_id",
"prefix",
"verify_ssl_certificates",
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
"labels",
])
@ -146,6 +151,16 @@ class EnterpriseAgentClusterDetail(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -167,20 +182,13 @@ class EnterpriseAgentClusterDetail(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
_dict['interfaceIpMapping'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list)
_items = []
if self.notification_rules:
@ -217,9 +225,12 @@ class EnterpriseAgentClusterDetail(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -232,8 +243,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None,
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None,
"notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None,
"labels": [AgentLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
"agentType": obj.get("agentType"),

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.agents.models.enterprise_agent_ipv6_policy import Enterpri
from thousandeyes_sdk.agents.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
from typing import Optional, Set
from typing_extensions import Self
@ -32,6 +33,8 @@ class EnterpriseAgentData(BaseModel):
"""
EnterpriseAgentData
""" # noqa: E501
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -44,8 +47,8 @@ class EnterpriseAgentData(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
__properties: ClassVar[List[str]] = ["testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping"]
model_config = ConfigDict(
populate_by_name=True,
@ -85,15 +88,17 @@ class EnterpriseAgentData(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
])
_dict = self.model_dump(
@ -101,6 +106,13 @@ class EnterpriseAgentData(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -122,13 +134,13 @@ class EnterpriseAgentData(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
_dict['interfaceIpMapping'] = _items
return _dict
@classmethod
@ -141,6 +153,8 @@ class EnterpriseAgentData(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -153,7 +167,7 @@ class EnterpriseAgentData(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
})
return _obj

View File

@ -23,6 +23,7 @@ from typing_extensions import Annotated
from thousandeyes_sdk.agents.models.account_group import AccountGroup
from thousandeyes_sdk.agents.models.agent_label import AgentLabel
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.agents.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
@ -44,9 +45,12 @@ class EnterpriseAgentDetail(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -59,13 +63,12 @@ class EnterpriseAgentDetail(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules")
labels: Optional[List[AgentLabel]] = Field(default=None, description="List of labels. See `/labels` for more information.")
agent_type: Annotated[str, Field(strict=True)] = Field(description="Enterprise agent type.", alias="agentType")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "agentType", "_links"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "agentType", "_links"]
@field_validator('agent_type')
def agent_type_validate_regular_expression(cls, value):
@ -121,6 +124,7 @@ class EnterpriseAgentDetail(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
@ -131,13 +135,14 @@ class EnterpriseAgentDetail(BaseModel):
"country_id",
"prefix",
"verify_ssl_certificates",
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
"labels",
])
@ -146,6 +151,16 @@ class EnterpriseAgentDetail(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -167,20 +182,13 @@ class EnterpriseAgentDetail(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
_dict['interfaceIpMapping'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list)
_items = []
if self.notification_rules:
@ -217,9 +225,12 @@ class EnterpriseAgentDetail(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -232,8 +243,7 @@ class EnterpriseAgentDetail(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None,
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None,
"notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None,
"labels": [AgentLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
"agentType": obj.get("agentType"),

View File

@ -16,7 +16,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.agents.models.agent_label import AgentLabel
from thousandeyes_sdk.agents.models.notification_rules import NotificationRules
@ -28,10 +28,11 @@ class EnterpriseAgentResponseExpands(BaseModel):
"""
EnterpriseAgentResponseExpands
""" # noqa: E501
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules")
labels: Optional[List[AgentLabel]] = Field(default=None, description="List of labels. See `/labels` for more information.")
__properties: ClassVar[List[str]] = ["tests", "notificationRules", "labels"]
__properties: ClassVar[List[str]] = ["testIds", "tests", "notificationRules", "labels"]
model_config = ConfigDict(
populate_by_name=True,
@ -65,8 +66,10 @@ class EnterpriseAgentResponseExpands(BaseModel):
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"test_ids",
"labels",
])
@ -108,6 +111,7 @@ class EnterpriseAgentResponseExpands(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None,
"labels": [AgentLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None

View File

@ -18,6 +18,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from typing import Optional, Set
from typing_extensions import Self
@ -32,10 +33,11 @@ class SimpleAgent(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates"]
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates"]
model_config = ConfigDict(
populate_by_name=True,
@ -93,6 +95,9 @@ class SimpleAgent(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
return _dict
@classmethod
@ -112,6 +117,7 @@ class SimpleAgent(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates")

View File

@ -21,10 +21,12 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.agents.models.account_group import AccountGroup
from thousandeyes_sdk.agents.models.cluster_member import ClusterMember
from thousandeyes_sdk.agents.models.coordinates import Coordinates
from thousandeyes_sdk.agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.agents.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
from typing import Optional, Set
from typing_extensions import Self
@ -39,9 +41,12 @@ class SimpleEnterpriseAgent(BaseModel):
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
coordinates: Optional[Coordinates] = None
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
test_ids: Optional[List[StrictInt]] = Field(default=None, description="List of test IDs assigned to the agent.", alias="testIds")
tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
@ -54,8 +59,8 @@ class SimpleEnterpriseAgent(BaseModel):
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
interface_ip_mapping: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMapping")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping"]
model_config = ConfigDict(
populate_by_name=True,
@ -103,6 +108,7 @@ class SimpleEnterpriseAgent(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
@ -113,13 +119,14 @@ class SimpleEnterpriseAgent(BaseModel):
"country_id",
"prefix",
"verify_ssl_certificates",
"test_ids",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
"interface_ip_mapping",
])
_dict = self.model_dump(
@ -127,6 +134,16 @@ class SimpleEnterpriseAgent(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of coordinates
if self.coordinates:
_dict['coordinates'] = self.coordinates.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
_items = []
if self.tests:
for _item in self.tests:
if _item:
_items.append(_item.to_dict())
_dict['tests'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
@ -148,13 +165,13 @@ class SimpleEnterpriseAgent(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mapping (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if self.interface_ip_mapping:
for _item in self.interface_ip_mapping:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
_dict['interfaceIpMapping'] = _items
return _dict
@classmethod
@ -174,9 +191,12 @@ class SimpleEnterpriseAgent(BaseModel):
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"testIds": obj.get("testIds"),
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
@ -189,7 +209,7 @@ class SimpleEnterpriseAgent(BaseModel):
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
})
return _obj

View File

@ -99,6 +99,10 @@ class TestCloudAndEnterpriseAgentNotificationRulesApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -111,6 +115,10 @@ class TestCloudAndEnterpriseAgentNotificationRulesApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",

View File

@ -52,6 +52,10 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
}
},
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,
@ -158,6 +162,10 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -170,6 +178,10 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -219,6 +231,10 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
}
},
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,

View File

@ -56,6 +56,10 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
}
},
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"countryId" : "US",
"enabled" : true,
@ -170,6 +174,10 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",
@ -182,6 +190,10 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
"agentType" : "enterprise-cluster",
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
"prefix" : "99.128.0.0/11",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"agentName" : "thousandeyes-stg-va-254",
"ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
"location" : "San Francisco Bay Area",

View File

@ -0,0 +1,381 @@
# coding: utf-8
"""
Agents API
## Overview Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
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.tests_assignment_on_agents_api import TestsAssignmentOnAgentsApi
class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
"""TestsAssignmentOnAgentsApi unit test stubs"""
def setUp(self) -> None:
self.api = TestsAssignmentOnAgentsApi()
def tearDown(self) -> None:
pass
def test_assign_tests_models_validation(self) -> None:
"""Test case for assign_tests request and response models"""
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.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",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"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" : 60,
"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" : 60,
"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_overwrite_tests_models_validation(self) -> None:
"""Test case for overwrite_tests request and response models"""
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.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",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"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" : 60,
"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" : 60,
"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_tests_models_validation(self) -> None:
"""Test case for unassign_tests request and response models"""
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.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",
"coordinates" : {
"latitude" : 37.77493,
"longitude" : -122.41942
},
"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" : 60,
"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" : 60,
"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

@ -4,6 +4,7 @@ README.md
docs/Alert.md
docs/AlertDetail.md
docs/AlertDirection.md
docs/AlertEmbedded.md
docs/AlertGroupType.md
docs/AlertLinks.md
docs/AlertMeta.md
@ -22,6 +23,7 @@ docs/AlertTestType.md
docs/AlertType.md
docs/Alerts.md
docs/AlertsApi.md
docs/Asn.md
docs/BaseAlert.md
docs/BaseAlertSuppressionWindow.md
docs/BaseRule.md
@ -34,6 +36,7 @@ docs/Error.md
docs/ExpandAlertTestOptions.md
docs/IntervalType.md
docs/LegacyAlert.md
docs/LegacyAlertDetail.md
docs/Link.md
docs/NotificationCustomWebhook.md
docs/NotificationEmail.md
@ -72,6 +75,7 @@ src/thousandeyes_sdk/alerts/models/__init__.py
src/thousandeyes_sdk/alerts/models/alert.py
src/thousandeyes_sdk/alerts/models/alert_detail.py
src/thousandeyes_sdk/alerts/models/alert_direction.py
src/thousandeyes_sdk/alerts/models/alert_embedded.py
src/thousandeyes_sdk/alerts/models/alert_group_type.py
src/thousandeyes_sdk/alerts/models/alert_links.py
src/thousandeyes_sdk/alerts/models/alert_meta.py
@ -87,6 +91,7 @@ src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py
src/thousandeyes_sdk/alerts/models/alert_test_type.py
src/thousandeyes_sdk/alerts/models/alert_type.py
src/thousandeyes_sdk/alerts/models/alerts.py
src/thousandeyes_sdk/alerts/models/asn.py
src/thousandeyes_sdk/alerts/models/base_alert.py
src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py
src/thousandeyes_sdk/alerts/models/base_rule.py
@ -99,6 +104,7 @@ src/thousandeyes_sdk/alerts/models/error.py
src/thousandeyes_sdk/alerts/models/expand_alert_test_options.py
src/thousandeyes_sdk/alerts/models/interval_type.py
src/thousandeyes_sdk/alerts/models/legacy_alert.py
src/thousandeyes_sdk/alerts/models/legacy_alert_detail.py
src/thousandeyes_sdk/alerts/models/link.py
src/thousandeyes_sdk/alerts/models/notification_custom_webhook.py
src/thousandeyes_sdk/alerts/models/notification_email.py

View File

@ -12,7 +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.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -123,6 +123,7 @@ Class | Method | HTTP request | Description
- [Alert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Alert.md)
- [AlertDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDetail.md)
- [AlertDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDirection.md)
- [AlertEmbedded](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertEmbedded.md)
- [AlertGroupType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertGroupType.md)
- [AlertLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertLinks.md)
- [AlertMeta](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertMeta.md)
@ -138,6 +139,7 @@ Class | Method | HTTP request | Description
- [AlertTestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertTestType.md)
- [AlertType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertType.md)
- [Alerts](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Alerts.md)
- [Asn](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Asn.md)
- [BaseAlert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseAlert.md)
- [BaseAlertSuppressionWindow](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseAlertSuppressionWindow.md)
- [BaseRule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseRule.md)
@ -150,6 +152,7 @@ Class | Method | HTTP request | Description
- [ExpandAlertTestOptions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/ExpandAlertTestOptions.md)
- [IntervalType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/IntervalType.md)
- [LegacyAlert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/LegacyAlert.md)
- [LegacyAlertDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/LegacyAlertDetail.md)
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Link.md)
- [NotificationCustomWebhook](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/NotificationCustomWebhook.md)
- [NotificationEmail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/NotificationEmail.md)

View File

@ -16,7 +16,10 @@ Name | Type | Description | Notes
**links** | [**AlertLinks**](AlertLinks.md) | | [optional]
**state** | [**State**](State.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]
**alert_state** | [**State**](State.md) | | [optional]
**alert_severity** | [**Severity**](Severity.md) | | [optional]
**details** | [**List[AlertMetricDetail]**](AlertMetricDetail.md) | | [optional]
**embedded** | [**AlertEmbedded**](AlertEmbedded.md) | | [optional]
## Example

View File

@ -0,0 +1,30 @@
# AlertEmbedded
Container for embedded resources in alert responses (HATEOAS).
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asn** | [**Asn**](Asn.md) | | [optional]
## Example
```python
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
# TODO update the JSON string below
json = "{}"
# create an instance of AlertEmbedded from a JSON string
alert_embedded_instance = AlertEmbedded.from_json(json)
# print the JSON string representation of the object
print(AlertEmbedded.to_json())
# convert the object into a dict
alert_embedded_dict = alert_embedded_instance.to_dict()
# create an instance of AlertEmbedded from a dict
alert_embedded_from_dict = AlertEmbedded.from_dict(alert_embedded_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,7 +13,7 @@ Name | Type | Description | Notes
**duration** | **int** | Duration in seconds the suppression window is active. | [optional]
**repeat** | [**Repeat**](Repeat.md) | | [optional]
**end_repeat** | [**EndRepeat**](EndRepeat.md) | | [optional]
**tests** | **List[str]** | List of tests to assign to the alert suppression window. | [optional]
**test_ids** | **List[str]** | List of test IDs to assign to the alert suppression window. | [optional]
## Example

View File

@ -0,0 +1,32 @@
# Asn
Autonomous System Number (ASN) information for network outage alerts.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | ASN identifier. | [optional]
**name** | **str** | Autonomous system name. | [optional]
**type** | **str** | Resource type. | [optional]
## Example
```python
from thousandeyes_sdk.alerts.models.asn import Asn
# TODO update the JSON string below
json = "{}"
# create an instance of Asn from a JSON string
asn_instance = Asn.from_json(json)
# print the JSON string representation of the object
print(Asn.to_json())
# convert the object into a dict
asn_dict = asn_instance.to_dict()
# create an instance of Asn from a dict
asn_from_dict = Asn.from_dict(asn_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,7 @@ Name | Type | Description | Notes
**rule_id** | **str** | Unique ID of the rule. | [optional] [readonly]
**rule_name** | **str** | Name of the alert rule. |
**expression** | **str** | The expression of the alert rule. |
**description** | **str** | A description of the alert rule. | [optional]
**direction** | [**AlertDirection**](AlertDirection.md) | | [optional]
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to &#x60;true&#x60;, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
@ -17,7 +18,7 @@ Name | Type | Description | Notes
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
**rounds_violating_out_of** | **int** | Specifies the divisor (y value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. | [optional]
**include_covered_prefixes** | **bool** | Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules. | [optional]
**sensitivity_level** | [**SensitivityLevel**](SensitivityLevel.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]

View File

@ -0,0 +1,30 @@
# LegacyAlertDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**state** | [**State**](State.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]
## Example
```python
from thousandeyes_sdk.alerts.models.legacy_alert_detail import LegacyAlertDetail
# TODO update the JSON string below
json = "{}"
# create an instance of LegacyAlertDetail from a JSON string
legacy_alert_detail_instance = LegacyAlertDetail.from_json(json)
# print the JSON string representation of the object
print(LegacyAlertDetail.to_json())
# convert the object into a dict
legacy_alert_detail_dict = legacy_alert_detail_instance.to_dict()
# create an instance of LegacyAlertDetail from a dict
legacy_alert_detail_from_dict = LegacyAlertDetail.from_dict(legacy_alert_detail_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,7 @@ Name | Type | Description | Notes
**rule_id** | **str** | Unique ID of the rule. | [optional] [readonly]
**rule_name** | **str** | Name of the alert rule. |
**expression** | **str** | The expression of the alert rule. |
**description** | **str** | A description of the alert rule. | [optional]
**direction** | [**AlertDirection**](AlertDirection.md) | | [optional]
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to &#x60;true&#x60;, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
@ -17,7 +18,7 @@ Name | Type | Description | Notes
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
**rounds_violating_out_of** | **int** | Specifies the divisor (y value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. | [optional]
**include_covered_prefixes** | **bool** | Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules. | [optional]
**sensitivity_level** | [**SensitivityLevel**](SensitivityLevel.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]

View File

@ -8,6 +8,7 @@ Name | Type | Description | Notes
**rule_id** | **str** | Unique ID of the rule. | [optional] [readonly]
**rule_name** | **str** | Name of the alert rule. |
**expression** | **str** | The expression of the alert rule. |
**description** | **str** | A description of the alert rule. | [optional]
**direction** | [**AlertDirection**](AlertDirection.md) | | [optional]
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to &#x60;true&#x60;, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
@ -17,7 +18,7 @@ Name | Type | Description | Notes
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
**rounds_violating_out_of** | **int** | Specifies the divisor (y value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. | [optional]
**include_covered_prefixes** | **bool** | Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules. | [optional]
**sensitivity_level** | [**SensitivityLevel**](SensitivityLevel.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]

View File

@ -8,6 +8,7 @@ Name | Type | Description | Notes
**rule_id** | **str** | Unique ID of the rule. | [optional] [readonly]
**rule_name** | **str** | Name of the alert rule. |
**expression** | **str** | The expression of the alert rule. |
**description** | **str** | A description of the alert rule. | [optional]
**direction** | [**AlertDirection**](AlertDirection.md) | | [optional]
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to &#x60;true&#x60;, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
@ -17,7 +18,7 @@ Name | Type | Description | Notes
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
**rounds_violating_out_of** | **int** | Specifies the divisor (y value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. |
**rounds_violating_required** | **int** | Specifies the numerator (x value) in the “X of Y times” condition. | [optional]
**include_covered_prefixes** | **bool** | Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules. | [optional]
**sensitivity_level** | [**SensitivityLevel**](SensitivityLevel.md) | | [optional]
**severity** | [**Severity**](Severity.md) | | [optional]

View File

@ -23,6 +23,7 @@ from thousandeyes_sdk.alerts.api.alerts_api import AlertsApi
from thousandeyes_sdk.alerts.models.alert import Alert
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
@ -38,6 +39,7 @@ from thousandeyes_sdk.alerts.models.alert_suppression_windows import AlertSuppre
from thousandeyes_sdk.alerts.models.alert_test_type import AlertTestType
from thousandeyes_sdk.alerts.models.alert_type import AlertType
from thousandeyes_sdk.alerts.models.alerts import Alerts
from thousandeyes_sdk.alerts.models.asn import Asn
from thousandeyes_sdk.alerts.models.base_alert import BaseAlert
from thousandeyes_sdk.alerts.models.base_alert_suppression_window import BaseAlertSuppressionWindow
from thousandeyes_sdk.alerts.models.base_rule import BaseRule
@ -50,6 +52,7 @@ from thousandeyes_sdk.alerts.models.error import Error
from thousandeyes_sdk.alerts.models.expand_alert_test_options import ExpandAlertTestOptions
from thousandeyes_sdk.alerts.models.interval_type import IntervalType
from thousandeyes_sdk.alerts.models.legacy_alert import LegacyAlert
from thousandeyes_sdk.alerts.models.legacy_alert_detail import LegacyAlertDetail
from thousandeyes_sdk.alerts.models.link import Link
from thousandeyes_sdk.alerts.models.notification_custom_webhook import NotificationCustomWebhook
from thousandeyes_sdk.alerts.models.notification_email import NotificationEmail

View File

@ -16,6 +16,7 @@
from thousandeyes_sdk.alerts.models.alert import Alert
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
@ -31,6 +32,7 @@ from thousandeyes_sdk.alerts.models.alert_suppression_windows import AlertSuppre
from thousandeyes_sdk.alerts.models.alert_test_type import AlertTestType
from thousandeyes_sdk.alerts.models.alert_type import AlertType
from thousandeyes_sdk.alerts.models.alerts import Alerts
from thousandeyes_sdk.alerts.models.asn import Asn
from thousandeyes_sdk.alerts.models.base_alert import BaseAlert
from thousandeyes_sdk.alerts.models.base_alert_suppression_window import BaseAlertSuppressionWindow
from thousandeyes_sdk.alerts.models.base_rule import BaseRule
@ -43,6 +45,7 @@ from thousandeyes_sdk.alerts.models.error import Error
from thousandeyes_sdk.alerts.models.expand_alert_test_options import ExpandAlertTestOptions
from thousandeyes_sdk.alerts.models.interval_type import IntervalType
from thousandeyes_sdk.alerts.models.legacy_alert import LegacyAlert
from thousandeyes_sdk.alerts.models.legacy_alert_detail import LegacyAlertDetail
from thousandeyes_sdk.alerts.models.link import Link
from thousandeyes_sdk.alerts.models.notification_custom_webhook import NotificationCustomWebhook
from thousandeyes_sdk.alerts.models.notification_email import NotificationEmail

View File

@ -19,6 +19,7 @@ import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
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
@ -43,8 +44,11 @@ class AlertDetail(BaseModel):
links: Optional[AlertLinks] = Field(default=None, alias="_links")
state: Optional[State] = None
severity: Optional[Severity] = None
alert_state: Optional[State] = Field(default=None, alias="alertState")
alert_severity: Optional[Severity] = Field(default=None, alias="alertSeverity")
details: Optional[List[AlertMetricDetail]] = None
__properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "state", "severity", "details"]
embedded: Optional[AlertEmbedded] = Field(default=None, alias="_embedded")
__properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "state", "severity", "alertState", "alertSeverity", "details", "_embedded"]
model_config = ConfigDict(
populate_by_name=True,
@ -105,6 +109,9 @@ class AlertDetail(BaseModel):
if _item:
_items.append(_item.to_dict())
_dict['details'] = _items
# override the default output from pydantic by calling `to_dict()` of embedded
if self.embedded:
_dict['_embedded'] = self.embedded.to_dict()
return _dict
@classmethod
@ -128,7 +135,10 @@ class AlertDetail(BaseModel):
"_links": AlertLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
"state": obj.get("state"),
"severity": obj.get("severity"),
"details": [AlertMetricDetail.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None
"alertState": obj.get("alertState"),
"alertSeverity": obj.get("alertSeverity"),
"details": [AlertMetricDetail.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None,
"_embedded": AlertEmbedded.from_dict(obj["_embedded"]) if obj.get("_embedded") is not None else None
})
return _obj

View File

@ -0,0 +1,91 @@
# coding: utf-8
"""
Alerts API
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).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.asn import Asn
from typing import Optional, Set
from typing_extensions import Self
class AlertEmbedded(BaseModel):
"""
Container for embedded resources in alert responses (HATEOAS).
""" # noqa: E501
asn: Optional[Asn] = None
__properties: ClassVar[List[str]] = ["asn"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlertEmbedded from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of asn
if self.asn:
_dict['asn'] = self.asn.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlertEmbedded from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"asn": Asn.from_dict(obj["asn"]) if obj.get("asn") is not None else None
})
return _obj

View File

@ -37,8 +37,8 @@ class AlertSuppressionWindowRequest(BaseModel):
duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.")
repeat: Optional[Repeat] = None
end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat")
tests: Optional[List[StrictStr]] = Field(default=None, description="List of tests to assign to the alert suppression window.")
__properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests"]
test_ids: Optional[List[StrictStr]] = Field(default=None, description="List of test IDs to assign to the alert suppression window.", alias="testIds")
__properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "testIds"]
model_config = ConfigDict(
populate_by_name=True,
@ -108,7 +108,7 @@ class AlertSuppressionWindowRequest(BaseModel):
"duration": obj.get("duration"),
"repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None,
"endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None,
"tests": obj.get("tests")
"testIds": obj.get("testIds")
})
return _obj

View File

@ -0,0 +1,91 @@
# coding: utf-8
"""
Alerts API
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).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
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
class Asn(BaseModel):
"""
Autonomous System Number (ASN) information for network outage alerts.
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="ASN identifier.")
name: Optional[StrictStr] = Field(default=None, description="Autonomous system name.")
type: Optional[StrictStr] = Field(default=None, description="Resource type.")
__properties: ClassVar[List[str]] = ["id", "name", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Asn from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Asn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type")
})
return _obj

View File

@ -34,6 +34,7 @@ class BaseRule(BaseModel):
rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId")
rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName")
expression: StrictStr = Field(description="The expression of the alert rule.")
description: Optional[StrictStr] = Field(default=None, description="A description of the alert rule.")
direction: Optional[AlertDirection] = None
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
@ -43,14 +44,14 @@ class BaseRule(BaseModel):
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf")
rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes")
sensitivity_level: Optional[SensitivityLevel] = Field(default=None, alias="sensitivityLevel")
severity: Optional[Severity] = None
endpoint_agent_ids: Optional[List[StrictStr]] = Field(default=None, description="An array of endpoint agent IDs associated with the rule (get `id` from `/endpoint/agents` API). This is applicable when `alertGroupType` is `browser-session`.", alias="endpointAgentIds")
endpoint_label_ids: Optional[List[StrictStr]] = Field(default=None, description="An array of label IDs used to assign specific Endpoint Agents to the test (get `id` from `/endpoint/labels`). This is applicable when `alertGroupType` is `browser-session`.", alias="endpointLabelIds")
visited_sites_filter: Optional[List[StrictStr]] = Field(default=None, description="A list of website domains visited during the session. This is applicable when `alertGroupType` is `browser-session`.", alias="visitedSitesFilter")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter"]
model_config = ConfigDict(
populate_by_name=True,
@ -109,6 +110,7 @@ class BaseRule(BaseModel):
"ruleId": obj.get("ruleId"),
"ruleName": obj.get("ruleName"),
"expression": obj.get("expression"),
"description": obj.get("description"),
"direction": obj.get("direction"),
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),

View File

@ -0,0 +1,91 @@
# coding: utf-8
"""
Alerts API
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).
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.severity import Severity
from thousandeyes_sdk.alerts.models.state import State
from typing import Optional, Set
from typing_extensions import Self
class LegacyAlertDetail(BaseModel):
"""
LegacyAlertDetail
""" # noqa: E501
state: Optional[State] = None
severity: Optional[Severity] = None
__properties: ClassVar[List[str]] = ["state", "severity"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
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 self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LegacyAlertDetail from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LegacyAlertDetail from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"state": obj.get("state"),
"severity": obj.get("severity")
})
return _obj

View File

@ -36,6 +36,7 @@ class Rule(BaseModel):
rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId")
rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName")
expression: StrictStr = Field(description="The expression of the alert rule.")
description: Optional[StrictStr] = Field(default=None, description="A description of the alert rule.")
direction: Optional[AlertDirection] = None
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
@ -45,7 +46,7 @@ class Rule(BaseModel):
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf")
rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes")
sensitivity_level: Optional[SensitivityLevel] = Field(default=None, alias="sensitivityLevel")
severity: Optional[Severity] = None
@ -55,7 +56,7 @@ class Rule(BaseModel):
notifications: Optional[AlertNotification] = None
test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "testIds", "_links"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "testIds", "_links"]
model_config = ConfigDict(
populate_by_name=True,
@ -120,6 +121,7 @@ class Rule(BaseModel):
"ruleId": obj.get("ruleId"),
"ruleName": obj.get("ruleName"),
"expression": obj.get("expression"),
"description": obj.get("description"),
"direction": obj.get("direction"),
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),

View File

@ -37,6 +37,7 @@ class RuleDetail(BaseModel):
rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId")
rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName")
expression: StrictStr = Field(description="The expression of the alert rule.")
description: Optional[StrictStr] = Field(default=None, description="A description of the alert rule.")
direction: Optional[AlertDirection] = None
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
@ -46,7 +47,7 @@ class RuleDetail(BaseModel):
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf")
rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes")
sensitivity_level: Optional[SensitivityLevel] = Field(default=None, alias="sensitivityLevel")
severity: Optional[Severity] = None
@ -56,7 +57,7 @@ class RuleDetail(BaseModel):
notifications: Optional[AlertNotification] = None
tests: Optional[List[AlertSimpleTest]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "_links"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "_links"]
model_config = ConfigDict(
populate_by_name=True,
@ -130,6 +131,7 @@ class RuleDetail(BaseModel):
"ruleId": obj.get("ruleId"),
"ruleName": obj.get("ruleName"),
"expression": obj.get("expression"),
"description": obj.get("description"),
"direction": obj.get("direction"),
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),

View File

@ -35,6 +35,7 @@ class RuleDetailUpdate(BaseModel):
rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId")
rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName")
expression: StrictStr = Field(description="The expression of the alert rule.")
description: Optional[StrictStr] = Field(default=None, description="A description of the alert rule.")
direction: Optional[AlertDirection] = None
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
@ -44,7 +45,7 @@ class RuleDetailUpdate(BaseModel):
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf")
rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired")
include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes")
sensitivity_level: Optional[SensitivityLevel] = Field(default=None, alias="sensitivityLevel")
severity: Optional[Severity] = None
@ -53,7 +54,7 @@ class RuleDetailUpdate(BaseModel):
visited_sites_filter: Optional[List[StrictStr]] = Field(default=None, description="A list of website domains visited during the session. This is applicable when `alertGroupType` is `browser-session`.", alias="visitedSitesFilter")
notifications: Optional[AlertNotification] = None
test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "testIds"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "testIds"]
model_config = ConfigDict(
populate_by_name=True,
@ -115,6 +116,7 @@ class RuleDetailUpdate(BaseModel):
"ruleId": obj.get("ruleId"),
"ruleName": obj.get("ruleName"),
"expression": obj.get("expression"),
"description": obj.get("description"),
"direction": obj.get("direction"),
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),

View File

@ -37,6 +37,7 @@ class TestAlertRulesApi(unittest.TestCase):
"alertType" : "http-server",
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -112,6 +113,7 @@ class TestAlertRulesApi(unittest.TestCase):
},
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -194,6 +196,7 @@ class TestAlertRulesApi(unittest.TestCase):
},
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -335,6 +338,7 @@ class TestAlertRulesApi(unittest.TestCase):
"alertType" : "http-server",
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -355,6 +359,7 @@ class TestAlertRulesApi(unittest.TestCase):
"alertType" : "http-server",
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -385,6 +390,7 @@ class TestAlertRulesApi(unittest.TestCase):
"alertType" : "http-server",
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
@ -460,6 +466,7 @@ class TestAlertRulesApi(unittest.TestCase):
},
"includeCoveredPrefixes" : true,
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
"description" : "A rule description string",
"roundsViolatingMode" : "exact",
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",

View File

@ -33,8 +33,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase):
request_body_json = """
{
"duration" : 0,
"testIds" : [ "71687", "71687" ],
"alertSuppressionWindowId" : "2411",
"tests" : [ "71687", "71687" ],
"isEnabled" : false,
"repeat" : {
"intervalType" : "day",
@ -352,8 +352,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase):
request_body_json = """
{
"duration" : 0,
"testIds" : [ "71687", "71687" ],
"alertSuppressionWindowId" : "2411",
"tests" : [ "71687", "71687" ],
"isEnabled" : false,
"repeat" : {
"intervalType" : "day",

View File

@ -33,10 +33,8 @@ class TestAlertsApi(unittest.TestCase):
response_body_json = """
{
"duration" : 60,
"severity" : "major",
"alertType" : "http-server",
"violationCount" : 2,
"endDate" : "2022-07-18T22:00:54Z",
"_links" : {
"appLink" : {
@ -80,6 +78,16 @@ class TestAlertsApi(unittest.TestCase):
"title" : "title"
}
},
"alertSeverity" : "major",
"duration" : 60,
"violationCount" : 2,
"_embedded" : {
"asn" : {
"name" : "Cisco Webex LLC",
"id" : "13445",
"type" : "asn"
}
},
"meta" : {
"version" : 1
},
@ -109,6 +117,7 @@ class TestAlertsApi(unittest.TestCase):
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
"suppressed" : false,
"state" : "trigger",
"alertState" : "trigger",
"startDate" : "2022-07-17T22:00:54Z"
}"""

View File

@ -9,7 +9,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -32,6 +32,7 @@ docs/ApiDuration.md
docs/ApiGeoMapWidget.md
docs/ApiGraphletPoint.md
docs/ApiGroupedBarchartWidget.md
docs/ApiListWidget.md
docs/ApiMultiMetricColumn.md
docs/ApiMultiMetricColumnData.md
docs/ApiMultiMetricTableWidget.md
@ -93,6 +94,7 @@ docs/LegacyDurationUnit.md
docs/LegacyWidgetSortDirection.md
docs/LegacyWidgetSortProperty.md
docs/Link.md
docs/ListDatasource.md
docs/MetricGroup.md
docs/MultiMetricsTableDatasource.md
docs/NumbersCardDatasource.md
@ -154,6 +156,7 @@ src/thousandeyes_sdk/dashboards/models/api_duration.py
src/thousandeyes_sdk/dashboards/models/api_geo_map_widget.py
src/thousandeyes_sdk/dashboards/models/api_graphlet_point.py
src/thousandeyes_sdk/dashboards/models/api_grouped_barchart_widget.py
src/thousandeyes_sdk/dashboards/models/api_list_widget.py
src/thousandeyes_sdk/dashboards/models/api_multi_metric_column.py
src/thousandeyes_sdk/dashboards/models/api_multi_metric_column_data.py
src/thousandeyes_sdk/dashboards/models/api_multi_metric_table_widget.py
@ -212,6 +215,7 @@ src/thousandeyes_sdk/dashboards/models/legacy_duration_unit.py
src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_direction.py
src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_property.py
src/thousandeyes_sdk/dashboards/models/link.py
src/thousandeyes_sdk/dashboards/models/list_datasource.py
src/thousandeyes_sdk/dashboards/models/metric_group.py
src/thousandeyes_sdk/dashboards/models/multi_metrics_table_datasource.py
src/thousandeyes_sdk/dashboards/models/numbers_card_datasource.py

View File

@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.41
- API version: 7.0.68
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -106,6 +106,8 @@ Class | Method | HTTP request | Description
*DashboardsApi* | [**get_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard) | **GET** /dashboards/{dashboardId} | Retrieve dashboard
*DashboardsApi* | [**get_dashboard_widget_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard_widget_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data
*DashboardsApi* | [**get_dashboards**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboards) | **GET** /dashboards | List dashboards
*DashboardsApi* | [**get_individual_card_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_card_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId} | Retrieve individual card data from numbers widget
*DashboardsApi* | [**get_individual_column_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_column_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId} | Retrieve individual column data from multi-metric table widget
*DashboardsApi* | [**update_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#update_dashboard) | **PUT** /dashboards/{dashboardId} | Update dashboard
*DashboardsFiltersApi* | [**create_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#create_dashboard_filter) | **POST** /dashboards/filters | Create dashboard filter
*DashboardsFiltersApi* | [**delete_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#delete_dashboard_filter) | **DELETE** /dashboards/filters/{id} | Delete dashboard filter
@ -147,6 +149,7 @@ Class | Method | HTTP request | Description
- [ApiGeoMapWidget](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiGeoMapWidget.md)
- [ApiGraphletPoint](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiGraphletPoint.md)
- [ApiGroupedBarchartWidget](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiGroupedBarchartWidget.md)
- [ApiListWidget](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiListWidget.md)
- [ApiMultiMetricColumn](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiMultiMetricColumn.md)
- [ApiMultiMetricColumnData](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiMultiMetricColumnData.md)
- [ApiMultiMetricTableWidget](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ApiMultiMetricTableWidget.md)
@ -205,6 +208,7 @@ Class | Method | HTTP request | Description
- [LegacyWidgetSortDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/LegacyWidgetSortDirection.md)
- [LegacyWidgetSortProperty](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/LegacyWidgetSortProperty.md)
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/Link.md)
- [ListDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ListDatasource.md)
- [MetricGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/MetricGroup.md)
- [MultiMetricsTableDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/MultiMetricsTableDatasource.md)
- [NumbersCardDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/NumbersCardDatasource.md)

View File

@ -1,5 +1,6 @@
# ApiAlertListWidget
A widget that displays a list of alerts based on specified criteria, such as alert type and time frame.
## Properties

View File

@ -30,6 +30,8 @@ Name | Type | Description | Notes
**limit** | **int** | Limit configured in the widget. | [optional]
**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional]
**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional]
**sort_group_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional]
**sort_group_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional]
**data_source** | [**ColorGridDatasource**](ColorGridDatasource.md) | | [optional]
## Example

View File

@ -0,0 +1,47 @@
# ApiListWidget
A widget that displays a list of items, such as events. It can use a time range to limit the items shown.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Identifier of the widget. | [optional] [readonly]
**title** | **str** | Title of the widget | [optional]
**visual_mode** | [**VisualMode**](VisualMode.md) | | [optional]
**embed_url** | **str** | When &#x60;isEmbedded&#x60; is set to &#x60;true&#x60;, an &#x60;embedUrl&#x60; is provided. | [optional] [readonly]
**is_embedded** | **bool** | Set to &#x60;true&#x60; if widget is marked as embedded; otherwise, set to &#x60;false&#x60;. | [optional]
**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional]
**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional]
**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional]
**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the &#x60;filters&#x60; property displays. Each filter object has two properties: &#x60;filterProperty&#x60; and &#x60;filterValue&#x60;. The &#x60;filterProperty&#x60; can be values like &#x60;AGENT&#x60;, &#x60;ENDPOINT_MACHINE_ID&#x60;, &#x60;TEST&#x60;, &#x60;MONITOR&#x60;, etc. The &#x60;filterValue&#x60; represents an identifier array of the selected property. | [optional]
**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional]
**fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional]
**api_link** | **str** | | [optional] [readonly]
**should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to &#x60;true&#x60;. | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
**type** | **str** | List widget type. Currently supports only &#x60;List&#x60;. |
**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional]
**active_within** | [**ActiveWithin**](ActiveWithin.md) | | [optional]
**data_source** | [**ListDatasource**](ListDatasource.md) | | [optional]
## Example
```python
from thousandeyes_sdk.dashboards.models.api_list_widget import ApiListWidget
# TODO update the JSON string below
json = "{}"
# create an instance of ApiListWidget from a JSON string
api_list_widget_instance = ApiListWidget.from_json(json)
# print the JSON string representation of the object
print(ApiListWidget.to_json())
# convert the object into a dict
api_list_widget_dict = api_list_widget_instance.to_dict()
# create an instance of ApiListWidget from a dict
api_list_widget_from_dict = ApiListWidget.from_dict(api_list_widget_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional]
**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the &#x60;filters&#x60; property displays. Each filter object has two properties: &#x60;filterProperty&#x60; and &#x60;filterValue&#x60;. The &#x60;filterProperty&#x60; can be values like &#x60;AGENT&#x60;, &#x60;ENDPOINT_MACHINE_ID&#x60;, &#x60;TEST&#x60;, &#x60;MONITOR&#x60;, etc. The &#x60;filterValue&#x60; represents an identifier array of the selected property. | [optional]
**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example

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